diff --git a/components/cart-choose/cart-choose.vue b/components/cart-choose/cart-choose.vue index 5babe10..5cdb01a 100644 --- a/components/cart-choose/cart-choose.vue +++ b/components/cart-choose/cart-choose.vue @@ -135,18 +135,20 @@ handler(n,o){ this.chooseNumber = 1; this.chooseIndex = 0; - for(let i=0;i0){ this.chooseIndex = i; // console.log(this.chooseIndex,"this.chooseIndex") return - } - + } } - - + if(this.specificationList.length>0&&this.specificationList[this.chooseIndex].stock==0){ + this.chooseNumber = 0; + }else{ + this.chooseNumber = 1; + } + }, deep:true, immediate: true, // 初始化监听 diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue index 82cc690..da2b136 100644 --- a/pages/user/order_list/order_list.vue +++ b/pages/user/order_list/order_list.vue @@ -706,7 +706,7 @@ overflow: auto; .onorder { width: 100%; - height: 50vw; + // height: 50vw; display: flex; justify-content: center; align-content: center; diff --git a/physical-merchants/classify/cart/cart.vue b/physical-merchants/classify/cart/cart.vue index 1484e99..1f46517 100644 --- a/physical-merchants/classify/cart/cart.vue +++ b/physical-merchants/classify/cart/cart.vue @@ -213,14 +213,19 @@ this.initData(); }, methods: { - initData() { - uni.showLoading({ - title: '加载中', - mask:true, - duration:2000 - }); + initData(status) { + if(!status){ + uni.showLoading({ + title: '加载中', + mask:true, + duration:2000 + }); + console.log(20) + } getShoppingCartList().then(res => { - uni.hideLoading(); + if(!status){ + uni.hideLoading(); + } if (res.return_code == '000000') { this.allCheck.whetherCheck = false; this.cartList = res.return_data; @@ -473,7 +478,8 @@ if (res.return_code == '000000') { - + //重新刷新数据 + this.initData(); } else { //增加数量失败 uni.showToast({ @@ -481,10 +487,11 @@ icon: 'none', duration: 2000 }) + //重新刷新数据 + this.initData(2); } - //重新刷新数据 - this.initData(); + }) diff --git a/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue b/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue index 2e652f8..bd97c16 100644 --- a/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue +++ b/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue @@ -1,8 +1,8 @@