shopmallApi.js
2.75 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
const url = '/rop-scrm-shopmall/router'
import { util } from 'utils'
export default {
/**众筹详情 */
getActivityDetail (id) {
return window.$HTTP({
url,
data: {
method: 'scrm.api.shopmall.weapp.activity.detail',
id
},
returnAll: true
})
},
/**参团人数 */
getActivityGroup (id) {
return window.$HTTP({
url,
data: {
method: 'scrm.api.shopmall.weapp.activity.group',
id
}
})
},
/** 创建订单(立即购买) */
createOrder (data) {
data.method = 'scrm.api.shopmall.weapp.order.create'
return window.$HTTP({
url,
data,
returnAll: true
})
},
/**创建支付订单(去付款) */
payOrder (data) {
data.method = `scrm.api.shopmall.weapp.order.createPay`
return window.$HTTP({
url,
data,
returnAll: true
})
},
/**海报 */
getPoster (data) {
data.method = `scrm.api.shopmall.weapp.crowdFunding.poster`
return window.$HTTP({
url,
data
})
},
/** 订单详情 */
getOrderList (activityId) {
let data = {
activityId,
method: 'scrm.api.shopmall.weapp.crowdFunding.order.list'
}
return window.$HTTP({
url,
data
})
},
// 根据众筹id获取直播详情
getLiveDetail (id) {
let data = {
id,
method: 'scrm.api.shopmall.weapp.activity.live.broadcast.detail'
}
return window.$HTTP({
url,
data
})
},
// 直播IM用户签名
getLiveSig (data) {
data.method = 'scrm.api.shopmall.weapp.live.activity.usersig'
return window.$HTTP({
url,
data
})
},
/** 查询分享人信息 */
getStaffInfo (data) {
data.method = 'scrm.api.shopmall.activity.share.user.info'
return window.$HTTP({
url,
data
})
},
/**直播间埋点*/
liveRoomReport (data) {
const userInfo = util.getUserInfo(),
params = util.getLocalStorage('wx_scrm_link_params') || {}
let obj = {
accountId: userInfo.accountId,
accountName: userInfo.nickName,
customerAvatar: userInfo.logo,
customerOpenId: userInfo.openid,
customerUnionId: '',
customerPhone: userInfo.phone || '',
merchantId: params.merchantId,
bizDataType: 1,
operationType: 3,
operationDate: new Date().format('yyyy-MM-dd hh:mm:ss'),
visitSource: 'H5-众筹'
}
data.method = 'scrm.api.shopmall.livebroadcast.report'
return window.$HTTP({
url,
data: {
...data,
...obj
},
})
},
/**支付商户收款测试创建支付订单*/
creatCollectionsTestOrder(data) {
data.method = 'entmicro.api.payment.createTrade'
return window.$HTTP({
url: '/rop-scrm-entmicro/router',
data
})
}
}