restapi.js
3.58 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
const restapi = require('../utils/restapi.js')
import api from './request.js'
module.exports = {
/** 获取订单数据*/
GETORDERINFO: function (oParams, success, fail) {
restapi.req('/web-dj-weapp/smartcarlife/goodsOrder/createWxPayOrderWithNotLogin', oParams, {}, 'GET', 'json', 'text', success, fail)
// restapi.req('/web-dj-weapp/smartcarlife/goodsOrder/createWxPayOrder', oParams, {}, 'GET', 'json', 'text', success, fail)
},
/** 精品交付单订单详情列表 */
// getBoutiqueOrderDetail(data, success, fail) {
// api.get('boutiquedelivery/order/getDetail', data, success, fail)
// },
// req(`/web-dj-weapp/${link}`, data, header, method, 'json', 'text',
/** 精品交付单订单详情列表 */
// getBoutiqueOrderDetail: function (params, success, fail) {
// restapi.req(
// '/web-dj-weapp/boutiquedelivery/order/getDetail',
// // JSON.stringify(code),
// params, {},'GET', 'json', 'text', success,fail
// )
// },
getDetailByOrderCode(params, success, fail) {
// api.get('smartcarlife/goodsOrder/getDetailByOrderCode', data, success)
restapi.req(
'/web-dj-weapp/smartcarlife/goodsOrder/getDetailByOrderCode',
// JSON.stringify(code),
params,
{},
'GET',
'json',
'text',
success,
fail
)
},
/**
* 根据场景id获取场景值
*/
qrCodeScene: function (qrcodeScene, success, fail) {
restapi.req('/web-dj-weapp/home/qrCodeScene/getSceneById', qrcodeScene, {}, 'GET', 'json', 'text', success, fail)
},
/** 查询支付结果 */
queryPayOrderStatus: function (params, success, fail) {
restapi.req(
'/web-dj-weapp/smartcarlife/goodsOrder/queryPayOrderStatus',
params,
// {
// 'content-type': 'application/x-www-form-urlencoded'
// },
{
'content-type': 'application/json'
},
'POST',
'json',
'text',
success,
fail
)
},
/** 发起微信支付 */
createWxPayOrderH5: function (params, success, fail) {
restapi.req(
'/web-dj-weapp/smartcarlife/goodsOrder/createWxPayOrderH5',
params,
// {
// 'content-type': 'application/x-www-form-urlencoded'
// },
{
'content-type': 'application/json'
},
'POST',
'json',
'text',
success,
fail
)
},
/**
* 授权登录
* wechatAuthSetting:微信授权信息
*/
authOpenId: function (params, success, fail) {
restapi.req(
'/web-dj-weapp/jscode/getOpenId',
// JSON.stringify(code),
params,
{
'content-type': 'application/x-www-form-urlencoded'
},
'POST',
'json',
'text',
success,
fail
)
},
/** 获取园区店加微二维码 */
yqMerchantDetail: function (params, success, fail) {
restapi.req(
'/web-dj-weapp/smartcarlife/yqMerchant/getYqMerchantConfig',
// JSON.stringify(code),
params,
{
'content-type': 'application/x-www-form-urlencoded'
},
// 'POST',
'GET',
'json',
'text',
success,
fail
)
},
/** 获取用户协议配置 */
getTitleByModule(data) {
return api.post('dj.api.smartcarlife.privacyAgreement.getTitleByModule', data)
},
/** 订单截图 */
orderScreenShot(data) {
return api.post('dj.api.smartcarlife.common.screenShot', data)
},
/** 新订单详情 */
getOrderDetail(data) {
return api.post('dj.api.smartcarlife.order.detail', data)
}
}