liangjin
2021-04-09 c0d97faf6b21c033a0a11f0b21083eac9dc1b82e
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
/*
 * @Descripttion:该文件用于组织服务器请求,添加请求函数时注意 函数重名!
 * @Author: TM丶
 * @LastEditors: 小明丶
 * @Date: 2019-03-30 08:27:46
 * @LastEditTime: 2021-01-04 09:34:57
 */
 
import $http from './config';
import oldapi from './oldapi';
 
 
const api = {
    ...oldapi,
    // 获取微信配置
    getTokenInfo(data) {
        data.apploading = 1;
        return $http.post('/wechat/getSign', data);
    },
    // 获取微信token
    getWeChatUserInfo(data) {
        return $http.post('/wechat/userInfo', data);
    },
    setUserOpenId(data) {
        return Service.post('/wechat/binding', data);
    },
    //token登陆
    loginByToken(data) {
        return $http.post('/login/loginByToken', data);
    },
    loginByMerToken(data){
        return $http.post('/login/loginByMerToken',data);
    },
    //登陆
    login(data) {
        return $http.post('/login/login', data);
    },
    //登出
    logout(data) {
        return $http.post('/login/logout', data);
    },
    // 获取角色列表
    getRole(data) {
        return $http.post('/user/getUserMgrInfo', data);
    },
    getAgencyMerList(data){
        return $http.post('/user/getAgencyMerList',data)
    },
    // 获取用户信息
    getPowerInfo(mgrId) {
        return $http.post('/user/mgr/powerInfo', {
            mgrId
        });
    },
    // 账户管理——获取用户信息
    getUserDetail(mgrId) {
        return $http.post('/user/mgr/detail', {
            mgrId
        });
    },
    //修改密码
    userUpdatePwd(data) {
      return $http.post('/user/updatePwd', data);
    },
    //获取验证码
    userSendMsg(data) {
      return $http.post('/user/sendMsg', data);
    },
    //忘记密码
      userForgetPwd(data) {
        return $http.post('/user/forgetPwd', data);
      },
 
 
 
    // 获取地区列表
    getArea() {
        let data = {
            apploading:1
        };
        return $http.post('/public/areaList',data);
    },
 
    // 获取机构拥有的地区列表
    getOrgAreaInfo(orgType) {
        let data = {
            apploading:1,
            orgType
        };
        return  $http.post('/public/getOrgAreaInfo', data);
    },
    /**
     * 渠道相关
     */
    //列表
    getChannel() {
        return $http.post('/chan/chanList');
    },
    //添加
    addChan(data) {
        return $http.post('/chan/addChan', data);
    },
    //切换状态
    channSwitchStatus(data) {
        return $http.post('/chan/switchStatus', data);
    },
    //更新渠道详细信息
    updateChan(data) {
        return $http.post('/chan/updateChan', data);
    },
    //查看/加载渠道详细信息
    getChannelInfo(chanId) {
        return $http.post('/chan/viewChanInf', {chanId});
    },
 
    // 获取审批列表
    getAuditList(data) {
        return $http.post('/merchant/auditList', data);
    },
    //审批商户
    merAudit(data){
        return $http.post('/merchant/audit', data);
    },
 
    // /merchant/auditList
 
    getAuditType(data){
        return $http.post('/merchant/auditType', data);
    },
    setAuditType(data){
        return $http.post('/merchant/setAuditType', data);
    },
 
 
    /**
     * 门店管理相关
     */
    //门店列表
    storeStoreList(data) {
        return $http.post('/store/storeList', data);
    },
    //门店详情
    storeDtl(data) {
        return $http.post('/store/dtl', data);
    },
    //编辑门店
    storeEdit(data) {
        return $http.post('/store/edit', data);
    },
    //添加门店
    storeAdd(data) {
        return $http.post('/store/add', data);
    },
 
 
 
 
 
 
 
 
 
 
    // 数据查询相关
    //获取产品列表
    getProductList(data) {
        return $http.post('/prod/typeList', data);
    },
 
    // 获取订单初始化数据
    getOrderInit(data) {
        return $http.post('/order/init', data);
    },
 
 
 
 
 
    // 账号管理——列表
    getMgrList(data) {
        return $http.post('/user/getMgrList', data);
    },
    // 账户管理——冻结账户
    userFreezeMgr(mgrId){
        return $http.post('/user/freezeMgr', {mgrId});
    },
    // 账户管理——增加账户
    userAdd(data){
        return $http.post('/user/add', data);
    },
    // 账户管理——更新账户信息
    userUpdate(data){
        return $http.post('/user/update', data);
    },
 
    // 花呗订单列表
    getHBList(data){
        return $http.post('/order/hbList', data);
    },
    // 获取花呗订单详情
    getHBDetail(orderId){
        return $http.post('/order/hbOrderDtl', {orderId});
    },
    // 花呗订单——退款
    hbOrderRefund(data){
        return $http.post('/hbOrder/refund', data);
    },
    // 花呗——订单导出
    hbExport(data){
        return $http.post('/order/hbExport', data);
    },
    // 获取产品订单金额统计
    getAmtReport(prodId){
        return $http.post('/order/amtReport', {prodId});
    },
    //获取周次商户统计
    getMerWeeksReport(){
        return $http.post('/merchant/weeksReport');
    },
    // 商户统计
    getMerReport(data){
        return $http.post('/merchant/report',data);
    },
    // 获取订单统计
    getOrderReport(data){
        return $http.post('/order/report',data);
    },
 
 
 
 
 
 
    //获取商户列表
    merList(data) {
        return $http.post('/merchant/list', data);
    },
    //商户详情
    merDetail(data) {
        return $http.post('/merchant/merDetail', data);
    },
    //商户照片信息
    merFile(data) {
        return $http.post('/merchant/file', data);
    },
    //商户列表导出
    merExport(data) {
        return $http.post('/merchant/export', data);
    },
    getUnAuditNb(data){
        return $http.post('/merchant/unAuditNb',data);
    },
    // 信用卡分期订单
    getCreditOrderList(data){
        return $http.post('/order/list', data);
    },
    // 信用卡分期 导出
    creditExport(data){
        return $http.post('/order/export', data);
    },
    // 信用卡分期 详情
    getCreditDetail(orderId){
        return $http.post('/order/orderDtl', {orderId});
    },
 
 
 
 
 
    //商户注册
    merRegist(data) {
        return $http.post('/user/regist', data);
    },
    // 商户筛选条件初始化
    merInitFilter(data){
        return $http.post('/merchant/initFilter', data);
    },
 
    // 模板列表
    getTempList(data){
        return $http.post('/temp/tempList', data);
    },
    // 模板 初始化数据
    // getTempInit(){
    //     return $http.post('/temp/init');
    // },
    getTempInit(data){
        return $http.post('/tempManager/init',data);
    },
    // 模板详情
    // getTempDetail(tempId){
    //     return $http.post('/temp/detail',{tempId});
    // },
    getTempDetail(tempId){
        return $http.post('/tempManager/detail',{tempId});
    },
    //模板——保存
    // tempSave(data){
    //     return $http.post('/temp/save',data);
    // },
    tempSave(data){
        return $http.post('/tempManager/save',data);
    },
    tempManagerUpdate(data){
        return $http.post('/tempManager/update',data)
    },
    //模板——商户保存
    tempSaveMerTemp(data){
        return $http.post('/temp/saveMerTemp',data);
    },
    getTempMerRef(data){
        return $http.post('/temp/getTempMerRef',data);
    },
    tempGetMerRef(data){
        return $http.post('/temp/getMerRef',data);
    },
    //模板——商户列表
    getTempMerList(data){
        return $http.post('/temp/tempMerList',data);
    },
    //模板 保存商户分配模板
    saveMerListTemp(data){
        return $http.post('/temp/saveMerListTemp',data);
    },
 
    // 微信扫码登录
    loginByOpenId(data){
        return $http.post('/login/loginByOpenId',data)
    },//openid登录
    checkOpenIdIsBind(data){
        return $http.post('/user/checkOpenIdIsBind',data)
    },//判断是否绑定openId
    userAddStoreManager(data){
        return $http.post('/user/addStoreManager',data)
    },//资料补充
 
 
}
 
export default {
    install(Vue, opt) {
        Vue.prototype.$api = api;
    }
}