...
|
...
|
@@ -30,6 +30,26 @@ require('../common'); |
|
|
|
|
|
lazyLoad();
|
|
|
|
|
|
function getQueryParam() {
|
|
|
var queryArray = location.search.substr(1).split('&&'),
|
|
|
i,
|
|
|
subArr = [],
|
|
|
obj = {};
|
|
|
|
|
|
for (i = 0; i < queryArray.length; i++) {
|
|
|
subArr = queryArray[i].split('=');
|
|
|
obj[subArr[0]] = subArr[1];
|
|
|
subArr = [];
|
|
|
}
|
|
|
|
|
|
return obj;
|
|
|
}
|
|
|
|
|
|
function isLimitGood() {
|
|
|
return getQueryParam().code;
|
|
|
}
|
|
|
|
|
|
|
|
|
if (window.getUid() !== orderInfo('uid')) {
|
|
|
order.init();
|
|
|
window.location.reload();
|
...
|
...
|
@@ -46,6 +66,13 @@ if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) |
|
|
orderInfo('couponName', null);
|
|
|
}
|
|
|
|
|
|
isLimitGood() && (function() {
|
|
|
var a = [];
|
|
|
|
|
|
a.push(getQueryParam());
|
|
|
orderInfo('skuList', JSON.stringify(a));
|
|
|
})();
|
|
|
|
|
|
if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) {
|
|
|
orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary');
|
|
|
}
|
...
|
...
|
@@ -102,7 +129,8 @@ function orderCompute() { |
|
|
deliveryId: orderInfo('deliveryId'),
|
|
|
paymentTypeId: orderInfo('paymentTypeId'),
|
|
|
couponCode: orderInfo('couponCode'),
|
|
|
yohoCoin: yohoCoin
|
|
|
yohoCoin: yohoCoin,
|
|
|
skuList: isLimitGood() ? orderInfo('skuList') : undefined
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
var priceHtml;
|
...
|
...
|
@@ -177,7 +205,9 @@ function submitOrder() { |
|
|
paymentTypeId: orderInfo('paymentTypeId'),
|
|
|
paymentType: orderInfo('paymentType'), //支付方式
|
|
|
couponCode: orderInfo('couponCode'),
|
|
|
yohoCoin: orderInfo('yohoCoin')
|
|
|
yohoCoin: orderInfo('yohoCoin'),
|
|
|
skuList: isLimitGood() ? orderInfo('skuList') : undefined
|
|
|
|
|
|
}
|
|
|
}).then(function(res) {
|
|
|
var url;
|
...
|
...
|
|