restapi.js
2.14 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
const restapi = require('../utils/restapi.js')
module.exports = {
/** 获取订单数据*/
GETORDERINFO: function (oParams, success, fail) {
restapi.req('/web-dj-weapp/smartcarlife/goodsOrder/createWxPayOrder', oParams, {}, '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
)
}
}