productManage.js
2.38 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
import request from './request'
const path = 'merchants.api.'
export const baseApi = {
// 获取所有产品
getAllProduct(data = {}) {
data.method = `${path}product.findProduct`
return request(data)
},
// 所有字典
getAllDictApi(data = {}) {
data.method = `${path}menu.findAllDictData`
return request(data)
},
// 所有菜单树
getMenuTree(data = {}) {
data.method = `${path}menu.findMerProMenuTree`
return request(data)
},
// 图片上传
upload(url, data = {}) {
data.method = 'glsx.accounts.biz.common.pictureUpload'
return request(data, 'post', ['file'], url)
},
// 获取ICON
getIcon(data = {}) {
data.method = `${path}menu.findMerchantFile`
return request(data)
}
}
// 产品
export const productApi = {
/** 获取财务管理列表*/
getListApi(data = {}) {
data.method = `${path}product.findProductByPage`
return request(data)
},
/** 新增产品 */
saveProApi(data = {}) {
data.method = `${path}product.saveProduct`
return request(data, 'post')
},
/** 编辑产品 */
updateProApi(data = {}) {
data.method = `${path}product.updateProduct`
return request(data, 'post')
}
}
// 菜单
export const menuApi = {
/** 获取财务管理列表*/
getListApi(data = {}) {
data.method = `${path}menu.findMerProMenuByPage`
return request(data)
},
/** 新增菜单 */
saveMenuApi(data = {}) {
data.method = `${path}menu.saveMerchantProductMenu`
return request(data, 'post')
},
// 更新菜单
updateMenuApi(data = {}) {
data.method = `${path}menu.updateMerchantProductMenu`
return request(data, 'post')
},
// 删除菜单
deleteMenuApi(data = {}) {
data.method = `${path}menu.deleteMerchantProductMenu`
return request(data, 'post')
},
// 批量导入菜单
buildVersionMenuFunctionNew(data = {}){
data.method = `${path}menu.buildVersionMenuFunctionNew`
return request(data, 'post')
}
}
// 功能
export const functionApi = {
/** 获取财务管理列表*/
getListApi(data = {}) {
data.method = `${path}menu.findMerchantFunction`
return request(data)
},
/** 新增功能 */
saveFunApi(data = {}) {
data.method = `${path}menu.saveMerchantFunction`
return request(data, 'post')
},
/** 编辑功能 */
updateFunApi(data = {}) {
data.method = `${path}menu.updateMerchantFunction`
return request(data, 'post')
}
}