|
@@ -30,6 +30,26 @@ require('../common'); |
|
@@ -30,6 +30,26 @@ require('../common'); |
30
|
|
30
|
|
31
|
lazyLoad();
|
31
|
lazyLoad();
|
32
|
|
32
|
|
|
|
33
|
+function getQueryParam() {
|
|
|
34
|
+ var queryArray = location.search.substr(1).split('&&'),
|
|
|
35
|
+ i,
|
|
|
36
|
+ subArr = [],
|
|
|
37
|
+ obj = {};
|
|
|
38
|
+
|
|
|
39
|
+ for (i = 0; i < queryArray.length; i++) {
|
|
|
40
|
+ subArr = queryArray[i].split('=');
|
|
|
41
|
+ obj[subArr[0]] = subArr[1];
|
|
|
42
|
+ subArr = [];
|
|
|
43
|
+ }
|
|
|
44
|
+
|
|
|
45
|
+ return obj;
|
|
|
46
|
+}
|
|
|
47
|
+
|
|
|
48
|
+function isLimitGood() {
|
|
|
49
|
+ return getQueryParam().code;
|
|
|
50
|
+}
|
|
|
51
|
+
|
|
|
52
|
+
|
33
|
if (window.getUid() !== orderInfo('uid')) {
|
53
|
if (window.getUid() !== orderInfo('uid')) {
|
34
|
order.init();
|
54
|
order.init();
|
35
|
window.location.reload();
|
55
|
window.location.reload();
|
|
@@ -46,6 +66,13 @@ if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) |
|
@@ -46,6 +66,13 @@ if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) |
46
|
orderInfo('couponName', null);
|
66
|
orderInfo('couponName', null);
|
47
|
}
|
67
|
}
|
48
|
|
68
|
|
|
|
69
|
+isLimitGood() && (function() {
|
|
|
70
|
+ var a = [];
|
|
|
71
|
+
|
|
|
72
|
+ a.push(getQueryParam());
|
|
|
73
|
+ orderInfo('skuList', JSON.stringify(a));
|
|
|
74
|
+})();
|
|
|
75
|
+
|
49
|
if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) {
|
76
|
if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) {
|
50
|
orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary');
|
77
|
orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary');
|
51
|
}
|
78
|
}
|
|
@@ -102,7 +129,8 @@ function orderCompute() { |
|
@@ -102,7 +129,8 @@ function orderCompute() { |
102
|
deliveryId: orderInfo('deliveryId'),
|
129
|
deliveryId: orderInfo('deliveryId'),
|
103
|
paymentTypeId: orderInfo('paymentTypeId'),
|
130
|
paymentTypeId: orderInfo('paymentTypeId'),
|
104
|
couponCode: orderInfo('couponCode'),
|
131
|
couponCode: orderInfo('couponCode'),
|
105
|
- yohoCoin: yohoCoin
|
132
|
+ yohoCoin: yohoCoin,
|
|
|
133
|
+ skuList: isLimitGood() ? orderInfo('skuList') : undefined
|
106
|
}
|
134
|
}
|
107
|
}).then(function(res) {
|
135
|
}).then(function(res) {
|
108
|
var priceHtml;
|
136
|
var priceHtml;
|
|
@@ -177,7 +205,9 @@ function submitOrder() { |
|
@@ -177,7 +205,9 @@ function submitOrder() { |
177
|
paymentTypeId: orderInfo('paymentTypeId'),
|
205
|
paymentTypeId: orderInfo('paymentTypeId'),
|
178
|
paymentType: orderInfo('paymentType'), //支付方式
|
206
|
paymentType: orderInfo('paymentType'), //支付方式
|
179
|
couponCode: orderInfo('couponCode'),
|
207
|
couponCode: orderInfo('couponCode'),
|
180
|
- yohoCoin: orderInfo('yohoCoin')
|
208
|
+ yohoCoin: orderInfo('yohoCoin'),
|
|
|
209
|
+ skuList: isLimitGood() ? orderInfo('skuList') : undefined
|
|
|
210
|
+
|
181
|
}
|
211
|
}
|
182
|
}).then(function(res) {
|
212
|
}).then(function(res) {
|
183
|
var url;
|
213
|
var url;
|