import axios from '@/utils/axios'

export default {
  /**
   * 获取自定义字段
   */
  getCustomField(params) {
    return axios.get('/v2/field/custom', { params, loading: false })
  },
  /**
   * 获取系统字段
   */
  getSystemField(params) {
    return axios.get('/v2/field/system', { params, loading: false })
  },
  /**
   * 根据自定义字段ID获取树
   */
  getTreeList(params) {
    return axios.get('/v2/field/tree/' + params)
  },
  /**
   * 获取系统字段V2
   */
  getSystemListV2(params) {
    return axios.get('/v2/patent/field/list', { params })
  },
  /**
   * 获取用户设置字段
   */
  getUserSettingField(params) {
    return axios.get('/v2/patent/field/setting', { params })
  },
  /**
   * 更新用户设置字段
   */
  updateUserSettingField(data) {
    return axios.post('/v2/patent/field/setting', data)
  }
}
