Browse Source

商品SKU

zhengjinyi 2 years ago
parent
commit
52a577212c

+ 2 - 0
src/main/resources/static/css/product/detail.h5.css

@@ -68,6 +68,8 @@ li{list-style:none}
 .productBox .detailBox .btnBox{text-align:center}
 .productBox .detailBox .btnBox .cart,.productBox .detailBox .btnBox .buy{display:inline-block;width:40vw;height:11.2vw;line-height:11.2vw;text-align:center;border:1px solid #E15616;background:#FFE6DC;cursor:pointer;border-radius:2px;font-size:3.4vw;color:#E15616;margin:1.7vw 1.1vw}
 .productBox .detailBox .btnBox .buy{background:#E15616;color:#FFF}
+.productBox .detailBox .btnBox .cart.disable{background: #FFE6DC;border-color: rgba(255, 230, 220, 0.3);}
+.productBox .detailBox .btnBox .buy.disable{background: rgba(225, 86, 22, 0.2);border-color: rgba(225, 86, 22, 0.2);}
 .productBox .detailBox .concatBox{height:20vw;padding-bottom:4vw}
 .productBox .detailBox .concatBox img{height:20vw;width:auto}
 .productBox .detailBox .upgrade{width:100%;background:#F94B4B;border-radius:2px;display:inline-block;text-align:center;height:11.2vw;line-height:11.2vw;font-size:3.4vw;color:#FFF;margin:1.7vw 0}

+ 3 - 0
src/main/resources/static/css/product/detail.pc.css

@@ -81,6 +81,8 @@ li{list-style:none;}
 .productBox .detailBox .detail .row .btn{top:6px;right:0}
 .productBox .detailBox .btnBox{padding:15px 0}
 .productBox .detailBox .btnBox .cart,.productBox .detailBox .btnBox .buy{display:inline-block;width:160px;height:40px;line-height:40px;text-align:center;border:1px solid #E15616;background:#fff;cursor:pointer;border-radius:2px;font-size:16px;color:#E15616;margin:0 10px}
+.productBox .detailBox .btnBox .cart.disable{background: #FFE6DC;border-color: rgba(255, 230, 220, 0.3);color: #EFC5B2;}
+.productBox .detailBox .btnBox .buy.disable{background: rgba(225, 86, 22, 0.2);border-color: rgba(225, 86, 22, 0.2);}
 .productBox .detailBox .btnBox .cart:before{display:inline-block;width:20px;height:20px;vertical-align:middle;background-position:-30px -1px;margin-right:2px}
 .productBox .detailBox .btnBox .buy{background:#E15616;color:#FFF}
 .productBox .detailBox .detail .btn:hover,.productBox .detailBox .btnBox .cart:hover,.productBox .detailBox .btnBox .buy:hover{opacity:.8}
@@ -142,6 +144,7 @@ li{list-style:none;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-button .sku-btn{width: 68px;height: 32px;display: block;margin: 0 12px;font-size: 14px;text-align: center;line-height: 32px;float: left;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-button .sku-btn.cancel{background: #E2E2E2;color: #4A4F58;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-button .sku-btn.confirm{background: #E15621;color: #FFFFFF;}
+.product-supporting-list .tr-3 .sku-popup-viw .sku-button .sku-btn.disable{background: rgba(255,86,22,0.3);color: #FFFFFF;}
 
 
 .product-supporting-list .tr-4{width:20%;box-sizing: border-box;padding: 16px 0 0 44px;text-align: left;}

+ 1 - 1
src/main/resources/static/css/product/product-supporting.h5.css

@@ -55,7 +55,7 @@
     .supporting-list .list-unit .sku-popup-viw .sku-button .sku-btn{width: 30vw;height: 9vw;display: block;margin: 0 12px;font-size: 14px;text-align: center;line-height: 9vw;float: left;}
     .supporting-list .list-unit .sku-popup-viw .sku-button .sku-btn.cancel{background: #E2E2E2;color: #4A4F58;}
     .supporting-list .list-unit .sku-popup-viw .sku-button .sku-btn.confirm{background: #E15621;color: #FFFFFF;}
-    
+    .supporting-list .list-unit .sku-popup-viw .sku-button .sku-btn.disable{background: rgba(255,86,22,0.3);color: #FFFFFF;}
     
     .supporting-list .list-info .list-price{width: 100%;line-height: 5vw;height: 5vw;font-size: 2.8vw;margin-bottom: 1.5vw;}
     .supporting-list .list-info .list-price .price-box{float: left;line-height: 5vw;}

+ 2 - 2
src/main/resources/static/css/user-center/collection/collection.css

@@ -19,7 +19,7 @@ li{list-style:none}
     .productList{width:1200px;margin:0 auto;box-sizing:border-box}
     .productList .productItem {width: 184px;height: 268px;float: left;background: #fff;position: relative;margin: 0 16px 16px 0;overflow: hidden;float: left;position: relative;}
     .productList .productItem:nth-child(6n){margin-right: 0;}
-    .productList .product-cancel{width: 100%;height: 32px;line-height: 32px;text-align: center;background-color: #FFE6DC;color: #E15621;font-size: 14px;cursor: pointer;position: absolute;top: -32px;left: 0;z-index:99;display: none;transition: all 0.3s;}
+    .productList .product-cancel{width: 100%;height: 32px;line-height: 32px;text-align: center;background-color: #FFE6DC;color: #E15621;font-size: 14px;cursor: pointer;position: absolute;bottom: 0;left: 0;z-index:99;display: none;transition: all 0.3s;}
     .productList .product-button{width: 100%;height: 40px;position: absolute;bottom: -40px;left: 0;display: none;transition: all 0.2s;z-index: 99;}
     .productList .product-button .coll-btn{width: 50%;height: 100%;line-height: 40px;font-size: 14px;text-align: center;float: left;position: relative;cursor: pointer;}
     .productList .product-button .coll-btn.add{background-color: #FFE6DC;color: #E15621;}
@@ -28,7 +28,7 @@ li{list-style:none}
     .productList .product-mask{width: 100%;height: 100%;background: rgba(0,0,0,0.3);position: absolute;top: 0;left: 0;z-index: 99;cursor: pointer;}
     .productList .product-mask .mask-checked{width: 16px;height: 16px;background: url("/img/account/icon-weigouxuan@2x.png") no-repeat;background-size: cover;display: block;position: absolute;right: 0;top: 0;}
     .productList .product-mask .mask-checked.checked{background: url("/img/account/icon-yigouxuan@2x.png") no-repeat;background-size: cover;}
-    .productList .productItem:hover .product-cancel{top: 0;display: block;}
+    .productList .productItem:hover .product-cancel{display: block;}
     .productList .productItem:hover .product-button{bottom: 0;display: block;}
     .productList .productItem img {width: 100%;height: 164px;}
     .productItem .page_main_type{width: 34px;height: 34px;text-align: justify;box-sizing: border-box;padding: 5px;border-radius: 0 0 8px 8px;background-color: #33CCBF;font-size: 12px;color: #FFFFFF;line-height: 13px;position: absolute;top: 0;right: 10px;z-index: 88;}

+ 1 - 1
src/main/resources/static/js/common/serviceapi/shopping.service.js

@@ -24,7 +24,7 @@ var ShoppingApi = {
          * @机构添加购物车替换Sku
          * @param:userId 用户userId
          */
-        ClubAddCart: function (params, callback) {
+        clubCheckSku: function (params, callback) {
             Http.AjaxService({
                 url:'/order/club/check/sku',
                 type:'get',

+ 1 - 1
src/main/resources/static/js/product/detail.js

@@ -311,7 +311,7 @@ var productDetail = new Vue({
                 if (response.code === 0 && response.data) {
                     _self.priceObj = response.data;
                     _self.number = response.data.minBuyNumber;
-                    _self.addParams.skuId = sku.skuId;
+                    _self.addParams.skuId = response.data.skuId;
                     if (response.data.actStatus == 1) {
                         _self.promotions = response.data.promotions;
                         _self.promotionsId = response.data.promotions.id;

+ 45 - 38
src/main/resources/static/js/product/mixins/productMixins.js

@@ -15,6 +15,7 @@ var productMixins = function () {
                 skuIndex:0,
                 skuSupportingIndex:0,
                 ladderList: [],//阶梯价
+                isDetailsBtnDisable:false
             }
         },
         filters: {
@@ -25,51 +26,56 @@ var productMixins = function () {
             }
         },
         methods: {
-            addShopCart(){ //加入购物车
-                var _self = this;
+            handleAddShopCart(){ //加入购物车
+                if(this.isDetailsBtnDisable){ return }
                 if(this.addStatus){
                     this.addStatus = false;
                     this.addParams.productCount = this.number;
-                    ShoppingApi.ClubAddCart(this.addParams,function (response){
-                        if(response.code == 0){
-                            _self.addStatus = true;
-                            $.confirm({
-                                useBootstrap: false,
-                                boxWidth: (isPC?'338px':'74.6vw'),
-                                title: false,
-                                content:'<div class="cartAlert"><h6>商品已成功加入购物车!</h6><p>当前购物车共<em>'+response.data+'</em>种商品</p></div>',
-                                closeIcon: true,
-                                animation: 'opacity',
-                                closeAnimation: 'opacity',
-                                animateFromElement: false,
-                                scrollToPreviousElement: false,
-                                buttons: {
-                                    login: {
-                                        text: '去结算',
-                                        btnClass: 'btn-to-cart',
-                                        action: function(){
-                                            window.location.href = '/shopping/cart.html';
-                                        }
-                                    },
-                                    close: {
-                                        text: '继续购物',
-                                        btnClass: 'btn-to-goon',
-                                        action:function(){
+                    this.handleClubAddCart(this.addParams)
+                }
+            },
+            handleClubAddCart(params){// 调用加入购物车
+                var _self = this;
+                ShoppingApi.ClubAddCart(params,function (response){
+                    if(response.code == 0){
+                        _self.addStatus = true;
+                        $.confirm({
+                            useBootstrap: false,
+                            boxWidth: (isPC?'338px':'74.6vw'),
+                            title: false,
+                            content:'<div class="cartAlert"><h6>商品已成功加入购物车!</h6><p>当前购物车共<em>'+response.data+'</em>种商品</p></div>',
+                            closeIcon: true,
+                            animation: 'opacity',
+                            closeAnimation: 'opacity',
+                            animateFromElement: false,
+                            scrollToPreviousElement: false,
+                            buttons: {
+                                login: {
+                                    text: '去结算',
+                                    btnClass: 'btn-to-cart',
+                                    action: function(){
+                                        window.location.href = '/shopping/cart.html';
+                                    }
+                                },
+                                close: {
+                                    text: '继续购物',
+                                    btnClass: 'btn-to-goon',
+                                    action:function(){
 
-                                        }
                                     }
                                 }
-                            });
-                            globalHead.getHeadCart(_self.userId);
-                        }else{
-                            CAIMEI.dialog('加入购物车失败!',true,function () {
-                                _self.addStatus = true;
-                            });
-                        }
-                    })
-                }
+                            }
+                        });
+                        globalHead.getHeadCart(_self.userId);
+                    }else{
+                        CAIMEI.dialog('加入购物车失败!',true,function () {
+                            _self.addStatus = true;
+                        });
+                    }
+                })
             },
-            buyNowSubmit: function(){ // type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
+            handleBuyNowSubmit(){ // type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
+                if(this.isDetailsBtnDisable){ return }
                 if(this.productId && this.number){
                     window.location.href = '/shopping/confirm.html?type=2&productId='+this.productId+'&count='+this.number+'&skuId='+this.addParams.skuId;
                 }
@@ -80,6 +86,7 @@ var productMixins = function () {
                 this.priceObj.price = sku.price;
                 this.addParams.skuId = sku.skuId;
                 this.ladderList = sku.ladderPriceList ? sku.ladderPriceList : [];
+                this.isDetailsBtnDisable = sku.stock === 0;
             },
             hanSkuClickSEo(){// 静态化下控制点击
                 var grade = $(".unitTags").eq(0).attr('data-grade');

+ 11 - 6
src/main/resources/static/js/product/mixins/supportMixins.js

@@ -6,6 +6,8 @@ var supportMixins = function () {
                 currentIndex:0,
                 skuIndex:0,
                 skuSupportingIndex:0,
+                isbtnDisable:false,
+                handldSku:{}
             }
         },
         mounted: function() {
@@ -20,24 +22,27 @@ var supportMixins = function () {
                 pros.isSkuPopup = false;
             },
             handleSkuConfirm(pros,index){// 确认选择Sku
+                if(this.isbtnDisable){ return; }
+                pros.unit = this.handldSku.unit;
+                pros.price = this.handldSku.price;
+                pros.skuId = this.handldSku.skuId;
                 pros.isSkuPopup = false;
             },
             handleSupportingChoisSku(pros,sku,index){// 配套商品选择规格
+                this.handldSku = sku
                 this.skuSupportingIndex = index;
-                pros.unit = sku.unit;
-                pros.price = sku.price;
-                pros.skuId = sku.skuId;
+                this.isbtnDisable = sku.stock === 0;
             },
             handleSupportingSubmit (type) {
                 var _self = this;
                 if (this.listQuery.userId > 0) {
                     switch (type) {
                         case 'buy':
-                            console.log('立即购买')
+                            console.log('配套商品立即购买')
                             _self.handleConfirmation()
                             break
                         case 'add':
-                            console.log('加入购物车')
+                            console.log('配套商品加入购物车')
                             _self.handleAddProductCart()
                             break
                     }
@@ -48,7 +53,7 @@ var supportMixins = function () {
             handleConfirmation() { //跳转确认订单页面
                 var _self = this;
                 var checkedList = []
-                if(!_self.isProductChecked){
+                if(!this.isProductChecked){
                     CAIMEI.dialog('请先选择商品',false);
                     return;
                 }

+ 32 - 40
src/main/resources/static/js/shopping/cart.js

@@ -17,7 +17,7 @@ var shoppingCart = new Vue({
         reducedPrice: 0,
         originalPrice: 0,
         allChecked: true,
-        submitIds: [],//去结算商品Ids
+        submitIds: [],//去结算商品SkuIds
         checkenProsList:[],// 勾选中的商品
         isShowPopup:false,
         currentTab:1,
@@ -86,21 +86,19 @@ var shoppingCart = new Vue({
                     // 默认全选
                     _self.listData = data.list.map(function(supplier){
                         if(supplier.cartList.length>0){
-                            supplier.cartList.map(function(cart){
+                            supplier.cartList.forEach(function(cart){
                                 if(cart.stock === 0 || cart.number > cart.stock ){
                                     cart.isChecked = false;
                                     supplier.isDisable = true
                                     cart.isDisable = true
                                 }else{
-                                    supplier.isDisable = false
                                     cart.isDisable = false
                                     cart.isChecked = true;
+                                    _self.submitIds.push(cart.skuId);
+                                    _self.checkenProsList.push(cart);
                                 }
                                 cart.isSkuPopup = false;
-                                // _self.submitIds.push(cart.productId);
-                                _self.checkenProsList.push(cart);
                                 _self.isCheckedProductStatus = true;
-                                return cart;
                             })
                         }
                         _self.updateProductCheckedAllBtn(supplier);
@@ -109,6 +107,7 @@ var shoppingCart = new Vue({
                     _self.updateCheckAllBtn();
                     _self.computedPrice();
                     _self.listLoading = false;
+                    console.log('listData',_self.listData)
                 }else{
                     CAIMEI.Alert(response.msg,'确定',true, function(){});
                 }
@@ -135,16 +134,16 @@ var shoppingCart = new Vue({
             if(pro.isDisable){ return }
             pro.isChecked = !pro.isChecked;
             if (pro.isChecked) {
-                this.checkenProsList.push(pro);
-                this.isCheckedProductStatus = true;
-                // if (!_self.submitIds.includes(pro.productId * 1)) {
-                //     _self.submitIds.push(pro.productId);
-                // }
+                if (!_self.submitIds.includes(pro.skuId * 1)) {
+                    _self.submitIds.push(pro.skuId);
+                    _self.checkenProsList.push(pro);
+                }
+                _self.isCheckedProductStatus = true;
             } else {
-                var lent = _self.submitIds.indexOf(pro.productId * 1)
+                var lent = _self.submitIds.indexOf(pro.skuId * 1)
                 if (lent >= 0) {
                     _self.submitIds.splice(lent, 1);
-                    this.checkenProsList.splice(lent, 1);
+                    _self.checkenProsList.splice(lent, 1);
                 }
             }
             _self.updateProductCheckedAllBtn(supplier)
@@ -178,40 +177,40 @@ var shoppingCart = new Vue({
                         goodsCheckedLength++;
                     }
                 })
-            _self.allChecked = goodsCheckedLength === goodsList.length;
+            this.allChecked = goodsCheckedLength === goodsList.length;
         },
         updateBothCheckBtn: function(){// 更新商铺勾选状态
             var _self = this;
-            _self.listData.forEach(supplier => {
+            this.listData = this.listData.map(supplier => {
                 supplier.isChecked = _self.allChecked;
                 _self.setProductChecked(supplier);
+                return supplier
             })
         },
         setProductChecked: function(supplier) {//
             var _self = this;
-            supplier.cartList.forEach(pros => {
-                if (supplier.isChecked) {
-                    pros.isChecked = true;
-                    if (!_self.submitIds.includes(pros.productId * 1)) {
-                        _self.submitIds.push(pros.productId);
-                        _self.checkenProsList.push(pros);
+            supplier.cartList.forEach(cart => {
+                if (supplier.isChecked && (cart.stock !== 0 || cart.number < cart.stock)) {
+                    cart.isChecked = true;
+                    if (!_self.submitIds.includes(cart.skuId * 1)) {
+                        _self.submitIds.push(cart.skuId);
+                        _self.checkenProsList.push(cart);
                     }
                     _self.isCheckedProductStatus = true;
                 } else {
-                    pros.isChecked = false;
-                    var lent = this.submitIds.indexOf(pros.productId * 1);
+                    cart.isChecked = false;
+                    var lent = this.submitIds.indexOf(cart.skuId * 1);
                     if (lent >= 0) {
                         _self.submitIds.splice(lent, 1);
                         _self.checkenProsList.splice(lent, 1);
                     }
                 }
             })
-            _self.computedPrice();
+            this.computedPrice();
         },
         ckeckAll: function(){
-            var _self = this;
-            _self.allChecked = !_self.allChecked;
-            _self.updateBothCheckBtn()
+            this.allChecked = !this.allChecked;
+            this.updateBothCheckBtn()
         },
         setPromotions:function(){
             var _self = this;
@@ -229,6 +228,7 @@ var shoppingCart = new Vue({
         },
         computedPrice: function() {
             var _self = this;
+            console.log('submitIds',this.submitIds)
             this.$nextTick(function () {
                 var totalPrice = 0;
                 var reducedPrice = 0;
@@ -241,7 +241,7 @@ var shoppingCart = new Vue({
                     var svipSupplierPrice = 0;
                     if (supplier.cartList.length > 0) {
                         supplier.cartList.forEach(function (cart) {
-                            if (cart.isChecked) {
+                            if (_self.submitIds.includes(cart.skuId * 1)) {
                                 supplierPrice += cart.price * cart.number;
                                 kindCount += 1;
                                 totalCount += cart.number;
@@ -366,7 +366,7 @@ var shoppingCart = new Vue({
             var eligibleCoupons = [];
             _self.listData.forEach(function(shop,index){
                 shop.cartList.forEach(function(pros){
-                    if(_self.submitIds.includes(pros.productId*1)){
+                    if(_self.submitIds.includes(pros.skuId*1)){
                         _self.totalCouponList.forEach(function (coupon,index){//循环优惠券
                             switch(coupon.couponType){
                                 case 0:// 活动券
@@ -500,23 +500,15 @@ var shoppingCart = new Vue({
         },
         deleteSelected: function(){
             var _self = this;
-            var productIds = _self.submitIds.join(",");
-            if(productIds == ''){
+            var skuIds = _self.submitIds.join(",");
+            if(skuIds == ''){
                 CAIMEI.dialog('请选择要删除的商品~');
                 return false;
             }
             CAIMEI.Modal('确定删除选中的商品吗?','取消','确定',function(){
-                _self.deleteCart(productIds);
+                _self.deleteCart(skuIds);
             });
         },
-        submitCart: function(){ // type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
-            var  _self = this;
-            if (_self.submitIds.length>0){
-                var productIds = _self.submitIds.join(",");
-                window.localStorage.setItem("shoppingProductIds", productIds);
-                window.location.href = '/shopping/confirm.html?type=1';
-            }
-        },
         queryPopupCoupons:function(){// 获取弹窗优惠券列表
             var  _self = this;
             ShoppingApi.ShoppingCartGetCoupon(_self.couponParam, function (response) {

+ 11 - 9
src/main/resources/static/js/shopping/confirm.js

@@ -1,11 +1,12 @@
 const defaultProductParam = {
         productCount:0, 	// 商品数量
         productId:0,		// 商品Id
+        skuId:0,
         source:1,			// 来源:1WWW 2小程序
         userId:0			// 用户Id
 };
 const defaultCartParam = {
-        productIds:0,		// 商品Id(逗号隔开)
+        skuIds:0,		    // 商品SkuId(逗号隔开)
         source:1,			// 来源:1WWW 2小程序
         userId:0			// 用户Id
 };
@@ -164,7 +165,7 @@ var shoppingConfirm = new Vue({
             var el = event.currentTarget;
             verifyHandle(el);
         },
-        getProductCreateOrderInfo:function(){// 商品立即购买确认订单初始化
+        getProductCreateOrderInfo(){// 商品立即购买确认订单初始化
             var _self = this;
             if(_self.userId ===0){return;}
             OrderApi.ProductCreateOrderInfo(_self.productParam,function(response){
@@ -175,7 +176,7 @@ var shoppingConfirm = new Vue({
                 }
             });
         },
-        OrderClubProductSupporting:function(){// 组合商品确认订单初始化
+        OrderClubProductSupporting(){// 组合商品确认订单初始化
             var _self = this;
             if(_self.userId ===0){return;}
             OrderApi.OrderClubProductSupporting(_self.supportParm,function(response){
@@ -186,7 +187,7 @@ var shoppingConfirm = new Vue({
                 }
             });
         },
-        getCartCreateOrderInfo: function () {// 购物车去结算确认订单初始化
+        getCartCreateOrderInfo () {// 购物车去结算确认订单初始化
             var _self = this;
             if(_self.userId ===0){return;}
             OrderApi.GetOrderConfirmInfo(_self.cartParam,function(response){
@@ -716,12 +717,13 @@ var shoppingConfirm = new Vue({
             //商品信息
             _self.confirmParam.orderInfo = _self.listData.map(el => {
                 var productInfo = [];
-                el.cartList.forEach(item => {
+                el.cartList.forEach(cart => {
                     productInfo.push({
-                        productId:item.productId,
-                        productNum:item.number,
+                        skuId:cart.skuId,
+                        productId:cart.productId,
+                        productNum:cart.number,
                         presentNum:0,
-                        productType:item.giftType
+                        productType:cart.giftType
                     })
                 })
                 return {splitCode:el.splitCode,shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
@@ -816,7 +818,7 @@ var shoppingConfirm = new Vue({
             // type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
             if(urlType === 1) {//购物车提交
                 _self.confirmParam.cartType = 1;
-                _self.cartParam.productIds =  _self.productIds = window.localStorage.getItem("shoppingProductIds");
+                _self.cartParam.skuIds =  _self.productIds = window.localStorage.getItem("shoppingSkuIds");
                 // 获取列表数据
                 _self.getCartCreateOrderInfo();
             }else if(urlType === 2){//立即购买

+ 7 - 5
src/main/resources/static/js/shopping/mixins/cartMixins.js

@@ -24,8 +24,11 @@ var cartMixins = function () {
 
         },
         methods: {
-            checkedDisable(cart){
-
+            handleSubmitCart(){ // type:(1购物车提交[对应表cm_cart],2直接购买提交, 3协销下单)
+                if( this.submitIds.length === 0 ){ return }
+                const skuIds = this.submitIds.join(",");
+                window.localStorage.setItem("shoppingSkuIds", skuIds);
+                window.location.href = '/shopping/confirm.html?type=1';
             },
             showVipPriceTag(cart){ // 是否显示vip标签价格
                 //非会员
@@ -69,7 +72,6 @@ var cartMixins = function () {
                 this.skuCartPros.price = sku.price;
                 this.skuCartPros.originalPrice = sku.originalPrice;
                 this.isbtnDisable = sku.stock === 0;
-
             },
             skuChangNumberSub() {// 减数
                 if ( this.addParams.count <= this.handleMinNumber) {
@@ -105,9 +107,9 @@ var cartMixins = function () {
                 if(this.isbtnDisable){ return }
                 this.handleClubAddCart(this.addParams,cart)
             },
-            handleClubAddCart(params,cart){
+            handleClubAddCart(params,cart){// 调接口
                 var _self = this;
-                ShoppingApi.ClubAddCart(params,function (response){
+                ShoppingApi.clubCheckSku(params,function (response){
                     if(response.code == 0){
                         cart.isSkuPopup = false;
                         _self.getCartLists();

+ 1 - 1
src/main/resources/templates/help/clubinfo.html

@@ -91,7 +91,7 @@
     </div>
   </div>
 </div>
-"<!-- 引入底部 -->
+<!-- 引入底部 -->
 <template th:replace="components/foot-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/help/clubinfo.js(v=${version})}"></script>

+ 3 - 3
src/main/resources/templates/product/detail.html

@@ -276,9 +276,9 @@
                                     (priceObj.priceFlag==2 && GLOBAL_VIP_FLAG === 1) ||
                                     (priceObj.priceFlag==3 && GLOBAL_CLUB_TYPE === 1)">
 
-                            <a href="javascript:void(0);" class="cart icon" @click='addShopCart' v-if="!isNoneDisabled"
+                            <a href="javascript:void(0);" class="cart icon"  :class="isDetailsBtnDisable ? 'disable' : ''" @click='handleAddShopCart' v-if="!isNoneDisabled"
                                onclick="_czc.push(['_trackEvent','商品详情','点击','加入购物车','','Um_Event_ProductAddCart'])">加入购物车</a>
-                            <a href="javascript:void(0);" class="buy" @click="buyNowSubmit" v-if="!isNoneDisabled"
+                            <a href="javascript:void(0);" class="buy" :class="isDetailsBtnDisable ? 'disable' : ''" @click="handleBuyNowSubmit" v-if="!isNoneDisabled"
                                onclick="_czc.push(['_trackEvent','商品详情','点击','立即购买','','Um_Event_ProductBuyConfirm'])">立即购买</a>
                         </div>
                     </template>
@@ -397,7 +397,7 @@
                                         <div class="sku-button">
                                             <div class="sku-button-center">
                                                 <a class="sku-btn cancel" href="javascript:void(0);" @click="handleSkuCancel(pros)">取消</a>
-                                                <a class="sku-btn confirm" href="javascript:void(0);" @click="handleSkuConfirm(pros)">确定</a>
+                                                <a class="sku-btn confirm" :class="isbtnDisable ? 'disable' : ''" href="javascript:void(0);" @click="handleSkuConfirm(pros)">确定</a>
                                             </div>
                                         </div>
                                     </div>

+ 1 - 1
src/main/resources/templates/product/product-supporting.html

@@ -119,7 +119,7 @@
                             <div class="sku-button">
                                 <div class="sku-button-center">
                                     <a class="sku-btn cancel" href="javascript:void(0);" @click="handleSkuCancel(pros)">取消</a>
-                                    <a class="sku-btn confirm" href="javascript:void(0);" @click="handleSkuConfirm(pros)">确定</a>
+                                    <a class="sku-btn confirm" :class="isbtnDisable ? 'disable' : ''" href="javascript:void(0);" @click="handleSkuConfirm(pros)">确定</a>
                                 </div>
                             </div>
                         </div>

+ 1 - 1
src/main/resources/templates/shopping/cart.html

@@ -285,7 +285,7 @@
                 <div class="item">商品数量:<em v-text="totalCount"></em></div>
             </div>
             <div class="right">
-                <a class="submit" href="javascript:void(0);" @click="submitCart()" onclick="_czc.push(['_trackEvent','购物车去结算','点击','去结算','','Um_Event_CartConfirmOrder'])">去结算</a>
+                <a class="submit" href="javascript:void(0);" @click="handleSubmitCart" onclick="_czc.push(['_trackEvent','购物车去结算','点击','去结算','','Um_Event_CartConfirmOrder'])">去结算</a>
                 <div  :class="isDiscount ?'item priceTotal':'item'">
                     <p class="priceTotal-t">合计:<em>¥{{ totalPrice - couponPrice  | NumFormat }}</em></p>
                     <p class="priceTotal-b" v-if="isDiscount"><em>共减¥{{ totalDiscountAmount | NumFormat }}</em></p>

+ 6 - 6
src/main/resources/templates/user-center/collection/collection.html

@@ -48,12 +48,12 @@
       <ul class="productList clear mfw" v-if="isListEmpty">
         <li class="productItem " v-for="p in listData">
           <div class="product-cancel" @click="hanldCancel(p)" v-if="!isHandle">取消收藏</div>
-          <template v-if="(p.priceFlag==0 && GLOBAL_USER_IDENTITY==4) || (p.priceFlag!=3 && GLOBAL_USER_IDENTITY == 2)">
-              <div class="product-button" v-if="!isHandle">
-                <div class="coll-btn add" @click="hanldBuyCart(p,1)">加入购物车</div>
-                <div class="coll-btn buy" @click="hanldBuyCart(p,2)">立即购买</div>
-              </div>
-          </template>
+<!--          <template v-if="(p.priceFlag==0 && GLOBAL_USER_IDENTITY==4) || (p.priceFlag!=3 && GLOBAL_USER_IDENTITY == 2)">-->
+<!--              <div class="product-button" v-if="!isHandle">-->
+<!--                <div class="coll-btn add" @click="hanldBuyCart(p,1)">加入购物车</div>-->
+<!--                <div class="coll-btn buy" @click="hanldBuyCart(p,2)">立即购买</div>-->
+<!--              </div>-->
+<!--          </template>-->
           <div class="product-mask" v-if="isHandle"  @click="checkedSoperv(p)">
             <span class="mask-checked" :class="[p.isChecked ?'checked':'']"></span>
           </div>