ソースを参照

订单模块修改

zhengjinyi 3 年 前
コミット
64ee3bb56c
1 ファイル変更6 行追加5 行削除
  1. 6 5
      src/main/resources/static/js/shopping/confirm.js

+ 6 - 5
src/main/resources/static/js/shopping/confirm.js

@@ -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) {