text: import request from '@/utils/request'
  
  /**
   * 加载api列表数据，分页
   * @param {*} data
   */
  export function loadApiListData(data) {
    return request({
      url: '/credits/system/api/list/page',
      method: 'post',
      params: data
    })
  }
  
  /**
   * 根据id删除api接口记录
   * @param {*} apiId
   */
  export function deleteApiById(apiId) {
    // /system/api/remove/{apiId}
    return request({
      url: '/credits/system/api/remove/' + apiId,
      method: 'get'
    })
  }
  
  /**
   * 新增API接口数据
   * @param {*} data
   */
  export function addApiInfo(param) {
    return request({
      url: '/credits/system/api/add',
      method: 'post',
      data: param
    })
  }
  
  /**
   * 获取API分类列表数据
   */
  export function getApiCategoryList() {
    return request({
      url: '/credits/system/api/get/apiCategory',
      method: 'get'
    })
  }
  
  /**
   * 获取分类下的API接口
   */
  export function getApiListByClass(className) {
    return request({
      url: '/credits/system/api/getApi/' + className,
      method: 'get'
    })
  }
  
  /**
   * 获取API接口详情
   */
  export function getApiDetail(apiId) {
    return request({
      url: '/credits/system/api/get/' + apiId,
      method: 'get'
    })
  }
  
  /**
   * 获取角色下配置的API权限数据，根据API分类筛选
   * @param {*} roleId
   * @param {*} apiCategory
   */
  export function getRoleApiList(roleId, apiCategory) {
    return request({
      url: '/credits/system/api/getApiByRoleId',
      method: 'get',
      params: {
        'roleId': roleId,
        'className': apiCategory
      }
    })
  }
  
  /**
   * 更新接口“是否开放”属性
   * @param {*} apiId
   * @param {*} isOPen
   */
  export function updateOpen(apiId, isOPen) {
    return request({
      url: '/credits/system/api/update',
      method: 'post',
      data: {
        'apiId': apiId,
        'isOpen': isOpen
      }
    })
  }
  
  /**
   * 更新接口“是否认证”属性
   * @param {*} apiId
   * @param {*} isAuth
   */
  export function updateAuth(apiId, isAuth) {
    return request({
      url: '/credits/system/api/update',
      method: 'post',
      data: {
        'apiId': apiId,
        'isAuth': isAuth
      }
    })
  }
  
  /**
   * 更新接口“是否保留”属性
   * @param {*} apiId
   * @param {*} isPersist
   */
  export function updatePersist(apiId, isPersist) {
    return request({
      url: '/credits/system/api/update',
      method: 'post',
      data: {
        'apiId': apiId,
        'isPersist': isPersist
      }
    })
  }
  
  /**
   * 远程刷新权限
   */
  export function refreshApi() {
    return request({
      url: '/credits/homeConfigInfo/refresh/api',
      method: 'get'
    })
  }
  