shopmall.js
3.66 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
import api from '../request/http'
module.exports = {
/** 分页查询商城专区的商品信息 */
getGoodsList(data) {
return api.post({
method: `scrm.api.shopmall.zoneInfo.weapp.goodsPage.HMD`,
pageNum: 1,
pageSize: 999,
...data
})
},
/** 添加购物车 */
addShoppingcart(data) {
return api.post({
method: `scrm.api.shopmall.weapp.shoppingcart.add`,
...data
})
},
/** 购物车删除商品 */
delShoppingcart(data) {
return api.post({
method: `scrm.api.shopmall.weapp.shoppingcart.delete`,
...data
})
},
/** 分页获取购物车 */
getShoppingcartList(data) {
return api.post({
method: `scrm.api.shopmall.weapp.shoppingcart.list`,
...data
})
},
/** 购物车商品变更(比如修改数量) */
updateShoppingcart(data) {
return api.post({
method: `scrm.api.shopmall.weapp.shoppingcart.update`,
...data
})
},
/** 领取确认订单最大优惠券 */
getMaxCoupon(orderGoods) {
return api.fetch('scrm.api.shopmall.weapp.order.coupons.get.HMD', {
orderGoods
})
},
/**购物车结算 */
settlementShoppingcart(data) {
return api.post({
method: `scrm.api.shopmall.weapp.shoppingcart.settlement`,
...data
})
},
/** 创建订单(立即购买) */
createOrder(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.create`,
...data
})
},
/**创建支付订单(去付款) */
payOrder(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.createPay`,
...data
})
},
/**订单详情 */
getOrderDetail(data) {
return api.post({
method: `scrm.api.shopmall.platform.order.detail`,
...data
})
},
/**获取订单的售后详情 */
getOrderRefundDetail(orderCode) {
return api.post({
method: `scrm.api.shopmall.weapp.orderRefund.detail`,
orderCode
})
},
//取消付款
cancelPay(orderCode) {
return api.fetch('scrm.api.shopmall.weapp.order.cancelPay', {
orderCode
})
},
/** 申请售后-自营商品 */
afterSale(data) {
return api.fetch('scrm.api.shopmall.points.afterSales.add', data)
},
/** 申请售后-云中鹤申请售后 */
afterSalesPlatform(data) {
return api.fetch('scrm.api.shopmall.platform.afterSales.add', data)
},
//申请售后待审核的订单取消售后
cancelOrder(orderCode) {
return api.fetch('scrm.api.shopmall.weapp.orderRefund.cancel', {
orderCode
})
},
/** 售后寄回商品填写快递信息 */
addDelivery(data) {
return api.post({
method: `scrm.api.shopmall.platform.sendBack.goods`,
...data
})
},
/**云中鹤查看物流列表(售后寄回)*/
queryExpressList(data={}){
return api.post({
method: 'scrm.api.shopmall.platform.query.expressList',
...data
})
},
/** 云中鹤-售后订单详情*/
platformSaleDetail(data) {
return api.post({
method: 'scrm.api.shopmall.platform.afterSales.detail',
...data
})
},
/**自营-售后订单详情 */
afterSaleDetail(data) {
return api.post({
method: 'scrm.api.shopmall.points.afterSales.detail',
...data
})
},
/** 确认收货 */
confirmReceipt(orderCode) {
return api.post({
method: `scrm.api.shopmall.weapp.order.confirmReceipt`,
orderCode
})
},
/**平台商城接口---取消售后 */
platformEditSale(data) {
return api.post({
method: 'scrm.api.shopmall.platform.afterSales.cancel',
...data
})
},
/** 查看物流轨迹 */
queryLogistics(data) {
return api.post({
method: `scrm.api.shopmall.platform.order.queryLogistics`,
...data
})
},
}