goodsEquityManageApi.js
2.84 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
import { http } from '@/main'
/**获取商品权益列表*/
const getGoodsList = (params = {}) => {
params.method = 'scrm.api.equity.goods.group.list'
return http({
data: params,
returnAll: true
})
}
/** 商品首页展示*/
const goodsDisplay = (params = {}) => {
params.method = 'scrm.api.equity.goods.group.main.page.flag.update'
return http({
data: params,
returnAll: true
})
}
/**获取商品权益分类列表*/
const getCategoryList = (params = { pageSize: 9999, pageNum: 1 }) => {
params.method = 'scrm.api.equity.goods.category.list'
return http({
data: params,
returnAll: true
})
}
/** 更新商品权益分类*/
const categoryUpdate = params => {
params.method = 'scrm.api.equity.goods.category.update'
return http({
data: params,
returnAll: true
})
}
/** 根据id获取商品权益分类*/
const getCategorySelect = params => {
params.method = 'scrm.api.equity.goods.category.get.by.id'
return http({
data: params,
})
}
/** 删除商品权益分类*/
const categoryDelete = params => {
params.method = 'scrm.api.equity.goods.category.delete'
return http({
data: params,
returnAll:true
})
}
/** 新增商品权益分类*/
const createCategory = params => {
params.method = 'scrm.api.equity.goods.category.insert'
return http({
data: params,
returnAll:true
})
}
/**置顶权益*/
const setTop = params => {
params.method = 'scrm.api.equity.goods.group.set.top'
return http({
data: params,
returnAll: true
})
}
/** 修改商品权益上架状态*/
const updateShelves = params => {
params.method = 'scrm.api.equity.goods.group.shelves.update'
return http({
data: params,
returnAll: true
})
}
/**新增商品权益*/
const createEquity = params => {
params.method = 'scrm.api.equity.goods.group.insert'
return http({
data: params,
returnAll: true
})
}
/**更新商品权益*/
const updateEquity = (params = {}) => {
params.method = 'scrm.api.equity.goods.group.update'
return http({
data: params,
returnAll:true
})
}
/** 获取品牌列表*/
const getGoodsBrandList = (params = { supplier: 'HW' }) => {
params.method = 'scrm.api.equity.goods.brand.list'
return http({
data: params,
returnAll: true
})
}
/* 获取品牌下商品形态列表*/
const getAppearanceList = (params = {}) => {
params.method = 'scrm.api.equity.goods.appearance.list'
return http({
data: params,
returnAll: true
})
}
/**删除商品权益*/
const deleteEquity = params => {
params.method = 'scrm.api.equity.goods.group.delete'
return http({
data: params,
returnAll: true
})
}
export default {
getGoodsList,
getCategoryList,
categoryUpdate,
getCategorySelect,
categoryDelete,
createCategory,
setTop,
updateShelves,
createEquity,
updateEquity,
getGoodsBrandList,
getAppearanceList,
goodsDisplay,
deleteEquity
}