xiaoe_mp_npm 1.0.15-test03 → 1.0.15-test04
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,6 +12,9 @@ const defaultConfig = {
|
|
|
12
12
|
needInitialUrl: true
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
// 有几个接口需要传host
|
|
16
|
+
const requestHost = 'applet-server.xiaoeknow.com';
|
|
17
|
+
|
|
15
18
|
// 处理一下特殊逻辑的header
|
|
16
19
|
const specialConfig = Host => {
|
|
17
20
|
const config = JSON.parse(JSON.stringify(defaultConfig));
|
|
@@ -46,19 +49,19 @@ const getCouponList = data => {
|
|
|
46
49
|
|
|
47
50
|
// 获取我的券码列表--有特殊逻辑需要处理header
|
|
48
51
|
const getMyCouponList = data => {
|
|
49
|
-
const result = http.player.post(GET_MY_MARKETING_LIST, data.params, false, specialConfig(data.host));
|
|
52
|
+
const result = http.player.post(GET_MY_MARKETING_LIST, data.params, false, specialConfig(data.host), requestHost);
|
|
50
53
|
return result;
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
// 领取普通优惠券--有特殊逻辑需要处理header
|
|
54
57
|
const receiveCoupon = data => {
|
|
55
|
-
const result = http.player.post(RECEIVE_COUPON, data.params, false, specialConfig(data.host));
|
|
58
|
+
const result = http.player.post(RECEIVE_COUPON, data.params, false, specialConfig(data.host), requestHost);
|
|
56
59
|
return result;
|
|
57
60
|
};
|
|
58
61
|
|
|
59
62
|
// 领取专属优惠券--有特殊逻辑需要处理header
|
|
60
63
|
const receiveLimitCoupon = data => {
|
|
61
|
-
const result = http.player.post(RECEIVE_LIMIT_COUPON, data.params, false, specialConfig(data.host));
|
|
64
|
+
const result = http.player.post(RECEIVE_LIMIT_COUPON, data.params, false, specialConfig(data.host), requestHost);
|
|
62
65
|
return result;
|
|
63
66
|
};
|
|
64
67
|
|
package/package.json
CHANGED
|
@@ -12,6 +12,9 @@ const defaultConfig = {
|
|
|
12
12
|
needInitialUrl: true
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
// 有几个接口需要传host
|
|
16
|
+
const requestHost = 'applet-server.xiaoeknow.com';
|
|
17
|
+
|
|
15
18
|
// 处理一下特殊逻辑的header
|
|
16
19
|
const specialConfig = Host => {
|
|
17
20
|
const config = JSON.parse(JSON.stringify(defaultConfig));
|
|
@@ -46,19 +49,19 @@ const getCouponList = data => {
|
|
|
46
49
|
|
|
47
50
|
// 获取我的券码列表--有特殊逻辑需要处理header
|
|
48
51
|
const getMyCouponList = data => {
|
|
49
|
-
const result = http.player.post(GET_MY_MARKETING_LIST, data.params, false, specialConfig(data.host));
|
|
52
|
+
const result = http.player.post(GET_MY_MARKETING_LIST, data.params, false, specialConfig(data.host), requestHost);
|
|
50
53
|
return result;
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
// 领取普通优惠券--有特殊逻辑需要处理header
|
|
54
57
|
const receiveCoupon = data => {
|
|
55
|
-
const result = http.player.post(RECEIVE_COUPON, data.params, false, specialConfig(data.host));
|
|
58
|
+
const result = http.player.post(RECEIVE_COUPON, data.params, false, specialConfig(data.host), requestHost);
|
|
56
59
|
return result;
|
|
57
60
|
};
|
|
58
61
|
|
|
59
62
|
// 领取专属优惠券--有特殊逻辑需要处理header
|
|
60
63
|
const receiveLimitCoupon = data => {
|
|
61
|
-
const result = http.player.post(RECEIVE_LIMIT_COUPON, data.params, false, specialConfig(data.host));
|
|
64
|
+
const result = http.player.post(RECEIVE_LIMIT_COUPON, data.params, false, specialConfig(data.host), requestHost);
|
|
62
65
|
return result;
|
|
63
66
|
};
|
|
64
67
|
|