common.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
import http from '../request/http'
const common = 'scrm.api.carlife.common.'
module.exports = {
/**上传图片
*/
uploadImg(data) {
return http.post({
method: `${common}uploadImg`,
...data,
noSignAttr: ["file"],
});
},
/**视频上传
*/
uploadVideo(data) {
return http.post({
method: `${common}uploadVideo`,
...data,
noSignAttr: ["file"],
});
},
/** 首页、发现列表 搜索接口 */
search(data) {
return http.post({
method: "scrm.api.carlife.weapp.homeSearch.search",
pageSize: 10,
...data,
});
},
/** 根据sap编码获取商户详情 */
getBySapCode(data) {
return http.fetch(`scrm.api.carlife.merchant.getBySapCode`,data);
},
/**获取图片版本号 */
getImgVersion() {
return http.getMock();
},
/**手机号验证码登录 */
phoneSmsLogin(data) {
return http.fetch('scrm.api.sso.sms.login', {
source: 'MINIAPP',
...data
})
},
/**微信授权手机号登录 */
authPhoneLogin(data) {
return http.fetch('scrm.api.sso.weapp.auth.phone', {
source: 'MINIAPP',
...data
})
},
/**获取积分渠道列表 */
getPointsSourceList(data) {
return http.fetch('scrm.api.shopmall.score.get.channelSource', {
...data
})
},
/**查询积分钱包 */
getPointsWalletData(data) {
return http.fetch('scrm.api.shopmall.pointswallet.get', {
...data
})
},
/**开通积分钱包 */
openPointsWallet(data) {
return http.fetch('scrm.api.shopmall.pointswallet.open', {...data})
},
/**替换积分钱包昵称 */
replaceWalletName(data) {
return http.fetch('scrm.api.sso.nickName.replace', {...data})
},
/**获取积分汇总数据 */
getPointsSummary(data) {
return http.fetch('scrm.api.shopmall.score.summary.search', {...data})
},
/**获取用户信息 */
getLoginInfo(data) {
return http.fetch('scrm.api.sso.weapp.loginfo.get', {...data})
},
/**获取门店数据 */
getMerchantData(data) {
return http.fetch('scrm.api.shopmall.score.list.merchant', {...data})
},
/**进入商品详情页面埋点 */
dynamicRecordAdd(data) {
return http.fetch('scrm.api.shopmall.scrm.customer.dynamic.record.add', {...data})
},
/**离开商品详情页面埋点 */
dynamicRecordLeave(data) {
return http.fetch('scrm.api.shopmall.scrm.customer.dynamic.record.leave', {...data})
}
};