api.js 2.25 KB
import request from './request'
import axios from 'axios'
import {
  baseConfig
} from '@/main'

export const BASE_DATA_URL = 'fims.configuration.from.conftype'

// 客户管理
export function customerList(data) {
  data.method = 'customermgr/getCustomerMgrList'
  return request(data)
}

// 重置密码
export function resetPassword(data) {
  data.method = 'customermgr/reset'
  return request(data)
}

// 停用/启用
// 0 停用 1 正常 2 待审核 3 审核未通过
export function customerChangeStatus(data) {
  data.method = 'customermgr/startandstop'
  return request(data, 'post')
}

// 设备管理
export function deviceList(data) {
  data.method = 'devicemgr/getDeviceMgrList'
  return request(data)
}

// 获取客户名称下拉列表
export function userDropList(data) {
  data.method = 'usermgr/getDropDownOptions'
  return request(data)
}

// 获取客户名称、设备类型下拉列表
export function userDeviceDropList(data) {
  data.method = 'devicemgr/getDropDownOptions'
  return request(data)
}

// 用户管理
export function userList(data) {
  data.method = 'usermgr/getUserMgrList'
  return request(data)
}

// API列表
export function apiList(data) {
  data.method = 'apimgr/getApiMgrList'
  return request(data)
}

// API列表-启用/停用
export function apiStartandStartAndStop(data) {
  data.method = 'apimgr/startandstop'
  return request(data, 'post')
}

// API调用记录
export function apiRecordList(data) {
  data.method = 'apicallmgr/getApiCallMgrList'
  return request(data)
}

// APP营销
export function appMarketList(data) {
  data.method = 'admgr/getAdMgrList'
  return request(data)
}

// APP营销-上架/下架
export function appStartandstop(data) {
  data.method = 'admgr/startandstop'
  return request(data, 'post')
}

// 图片上传
export function uploadImg(data) {
  return axios({
    url: baseConfig.axios.baseURL + 'file/uploadFile',
    method: 'post',
    data: data
  })
}

// 图片删除
export function deleteImg(data) {
  data.method = 'file/deleteFile'
  return request(data, 'post')
}

// APP营销 - 新增
export function appAdd(data) {
  data.method = 'admgr/insertAd'
  return request(data, 'post')
}

// APP营销 - 编辑
export function appEdit(data) {
  data.method = 'admgr/updateAd'
  return request(data, 'post')
}