api.js
2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
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 deviceImport(data) {
return axios({
url: baseConfig.axios.baseURL + 'devicemgr/importDeviceList',
method: 'post',
data: 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)
}
// 获取顶部数据
export function getStatisticData(data) {
data.method = 'index/getStatisticData'
return request(data)
}
// 获取饼状图数据
export function getGraphData(data) {
data.method = 'index/getGraphData'
return request(data)
}
// 获取折线图数据
export function getPolylineData(data) {
data.method = 'index/getPolylineData'
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')
}