memberManagement.js 4.99 KB
Newer Older
1
import request from "@/utils/request";
chenwei's avatar
chenwei committed
2
// 操作积分
3 4
export function operateMemberScore(data) {
  return request({
5 6 7 8
    url: "/member/user-score/operate",
    method: "post",
    data: data,
  });
9 10
}

chenwei's avatar
chenwei committed
11
// 积分记录分页
12 13
export function queryMemberScoreRecord(data) {
  return request({
14 15 16 17
    url: "/member/user-score-log/page",
    method: "post",
    data: data,
  });
18 19
}

chenwei's avatar
chenwei committed
20
// 兑换记录分页
21 22
export function queryMemberExchangeRecord(data) {
  return request({
23 24 25 26
    url: "/reward/redeem/record/page",
    method: "post",
    data: data,
  });
27 28
}

chenwei's avatar
chenwei committed
29
// 批量核销按钮
30 31 32

export function batchVerifyAPI(data) {
  return request({
33 34 35 36
    url: "/reward/redeem/record/batch/verify",
    method: "post",
    data: data,
  });
37 38
}

chenwei's avatar
chenwei committed
39
// 兑换记录导出
40 41
export function batchRecordExport(data) {
  return request({
42 43 44 45
    url: "/reward/redeem/record/export",
    method: "post",
    data: data,
  });
46 47
}

chenwei's avatar
chenwei committed
48
// 兑换记录导入
49 50
export function batchRecordImport(data) {
  return request({
51 52 53 54
    url: "/reward/redeem/record/import",
    method: "post",
    data: data,
  });
55 56
}

chenwei's avatar
chenwei committed
57
// 兑换记录导入模板下载
58 59
export function batchRecordImportTemplate() {
  return request({
60 61 62 63
    url: "/reward/redeem/record/import/template",
    method: "post",
    responseType: "blob",
  });
64 65
}

chenwei's avatar
chenwei committed
66
// 撤销 操作
67 68
export function rewardCancelQuery(data) {
  return request({
69 70 71 72
    url: "/reward/redeem/record/cancel",
    method: "post",
    data: data,
  });
73 74
}

chenwei's avatar
chenwei committed
75
// 获取记录详情
76 77
export function getRewardDetailQuery(data) {
  return request({
78 79 80 81
    url: "/reward/redeem/record/detail",
    method: "post",
    data: data,
  });
82 83
}

chenwei's avatar
chenwei committed
84
// 更新兑换记录
85 86 87

export function updatedRewardsDetails(data) {
  return request({
88 89 90 91
    url: "/reward/redeem/record/update",
    method: "post",
    data: data,
  });
92 93
}

chenwei's avatar
chenwei committed
94
// 核销回退
95 96
export function verifyRollback(data) {
  return request({
97 98 99 100
    url: "/reward/redeem/record/verify-back",
    method: "post",
    data: data,
  });
101 102
}

chenwei's avatar
chenwei committed
103
// 核销 操作
104 105
export function verifyRedeem(data) {
  return request({
106 107 108 109
    url: "/reward/redeem/record/verify",
    method: "post",
    data: data,
  });
110 111
}

chenwei's avatar
chenwei committed
112
// 获取积分规则记录
113 114
export function getScoreRecordList(data) {
  return request({
115 116
    url: "/member/score-rule/page",
    method: "post",
117 118
    params: {
      page: data.page,
119
      rows: data.rows,
120
    },
121 122
    data,
  });
123 124
}

chenwei's avatar
chenwei committed
125
// 会员积分等级列表
126 127 128

export function getMemberLevelList(data) {
  return request({
129 130 131 132
    url: "/member/user-level/page",
    method: "post",
    data,
  });
133 134
}

chenwei's avatar
chenwei committed
135
// 新增会员等级设置
136 137
export function addNewMemberLevel(data) {
  return request({
138 139 140 141
    url: "/member/user-level/add",
    method: "post",
    data,
  });
142 143
}

chenwei's avatar
chenwei committed
144
// 删除会员等级
145 146
export function delMemberLevel(data) {
  return request({
147 148 149 150
    url: "/member/user-level/delete",
    method: "post",
    data,
  });
151
}
chenwei's avatar
chenwei committed
152
// edit member level
153 154
export function editMemberLevel(data) {
  return request({
155 156 157 158
    url: "/member/user-level/update",
    method: "post",
    data,
  });
159
}
chenwei's avatar
chenwei committed
160

chenwei's avatar
chenwei committed
161
// 获得目的国、目的城市、目的仓列表
chenwei's avatar
chenwei committed
162 163
export function getRegionTreeList() {
  return request({
164 165 166
    url: "/member/score-rule/warehouse-tree-region-list",
    method: "get",
  });
chenwei's avatar
chenwei committed
167 168
}

chenwei's avatar
chenwei committed
169
// 获取渠道列表
chenwei's avatar
chenwei committed
170 171
export function getChannelList() {
  return request({
172 173 174
    url: "/ecw/channel/list-all-simple",
    method: "get",
  });
chenwei's avatar
chenwei committed
175 176
}

chenwei's avatar
chenwei committed
177
// 积分规则创建
chenwei's avatar
chenwei committed
178 179
export function createIntegralRule(data) {
  return request({
180 181 182 183
    url: "/member/score-rule/create",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
184 185
}

chenwei's avatar
chenwei committed
186
// 启用关闭 积分规则
chenwei's avatar
chenwei committed
187 188
export function integralRuleStatus(data) {
  return request({
189 190 191 192
    url: "/member/score-rule/status",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
193 194
}

chenwei's avatar
chenwei committed
195
// 复制积分规则
chenwei's avatar
chenwei committed
196 197
export function integralRuleCopy(data) {
  return request({
198 199 200 201
    url: "/member/score-rule/copy",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
202 203
}

chenwei's avatar
chenwei committed
204
// 延期积分规则
chenwei's avatar
chenwei committed
205 206
export function integralRuleDelay(data) {
  return request({
207 208 209 210
    url: "/member/score-rule/delay",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
211 212
}

chenwei's avatar
chenwei committed
213
// 删除积分规则
chenwei's avatar
chenwei committed
214 215
export function integralRuleDelete(data) {
  return request({
216 217 218 219
    url: "/member/score-rule/delete",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
220
}
chenwei's avatar
chenwei committed
221

chenwei's avatar
chenwei committed
222
// 获取积分规则详情
chenwei's avatar
chenwei committed
223 224
export function integralRuleDetails(data) {
  return request({
225 226 227 228
    url: "/member/score-rule/get",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
229 230
}

chenwei's avatar
chenwei committed
231
// 编辑积分规则
chenwei's avatar
chenwei committed
232 233
export function integralRuleUpdated(data) {
  return request({
234 235 236 237
    url: "/member/score-rule/update",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
238 239 240 241 242
}

// 获取会员功能开关
export function switchRuleGet() {
  return request({
243 244 245
    url: "/member/score-rule/switch/get",
    method: "get",
  });
chenwei's avatar
chenwei committed
246 247 248 249 250
}

// 设置会员工能开关
export function switchRuleSet(data) {
  return request({
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
    url: "/member/score-rule/switch/set",
    method: "post",
    data,
  });
}

//分享记录分页
export function getShareRecordList(data) {
  return request({
    url: "/member/score-rule/share-record/page",
    method: "post",
    data,
  });
}

//获取分享记录详情
export function getShareRecordDetails(data) {
  return request({
    url: "/member/score-rule/share-record/detail",
    method: "post",
    data,
  });
chenwei's avatar
chenwei committed
273
}