|
@@ -718,7 +718,7 @@ var shoppingConfirm = new Vue({
|
|
|
}
|
|
|
_self.confirmParam.payInfo.postage = parseInt(_self.hanldPostage).toFixed(2);
|
|
|
_self.confirmParam.payInfo.postageFlag = parseInt(_self.hanldPostageFlag);
|
|
|
- _self.confirmParam.payInfo.orderShouldPayFee = _self.hanldShouldPayFee.toFixed(2);
|
|
|
+ _self.confirmParam.payInfo.orderShouldPayFee = parseFloat(_self.hanldShouldPayFee).toFixed(2);
|
|
|
_self.confirmParam.payInfo = JSON.stringify(_self.confirmParam.payInfo);
|
|
|
_self.confirmParam.orderInfo = JSON.stringify(_self.confirmParam.orderInfo);
|
|
|
_self.confirmParam.orderInvoice = JSON.stringify(_self.confirmParam.orderInvoice);
|
|
@@ -753,20 +753,21 @@ var shoppingConfirm = new Vue({
|
|
|
},
|
|
|
created: function () {
|
|
|
var _self = this;
|
|
|
- _self.type = getUrlParam("type") ? getUrlParam("type")*1 : "";
|
|
|
+ var urlType = getUrlParam("type") ? getUrlParam("type")*1 : "";
|
|
|
+ console.log('urlType',urlType)
|
|
|
if(globalUserData){
|
|
|
_self.userId = _self.productParam.userId = _self.cartParam.userId = _self.postageParam.userId = globalUserData.userId;
|
|
|
_self.confirmParam.clubId = globalUserData.clubId
|
|
|
_self.userIdentity = globalUserData.identity;
|
|
|
_self.userToken = globalUserData.token;
|
|
|
// type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
|
|
|
- if(_self.type === 1) {
|
|
|
- _self.productParam.cartType = 1;
|
|
|
+ if(urlType === 1) {//购物车提交
|
|
|
+ _self.confirmParam.cartType = 1;
|
|
|
_self.cartParam.productIds = _self.postageParam.productIds = _self.productIds = window.localStorage.getItem("shoppingProductIds");
|
|
|
// 获取列表数据
|
|
|
_self.getCartCreateOrderInfo();
|
|
|
- }else if(_self.type === 2){
|
|
|
- _self.productParam.cartType = 2;
|
|
|
+ }else if(urlType === 2){//立即购买
|
|
|
+ _self.confirmParam.cartType = 2;
|
|
|
_self.productParam.productId = _self.postageParam.productIds = _self.productIds = getUrlParam("productId");
|
|
|
_self.productParam.productCount = getUrlParam("count");
|
|
|
if(_self.productParam.productId && _self.productParam.productCount) {
|