diff --git a/components/cart-choose/cart-choose.vue b/components/cart-choose/cart-choose.vue index 304985a..5babe10 100644 --- a/components/cart-choose/cart-choose.vue +++ b/components/cart-choose/cart-choose.vue @@ -57,7 +57,7 @@ 购买数量 - + @@ -114,7 +114,9 @@ props:{ specificationList:{ type:Array, - default:[], + default() { + return [] + }, }, // 0,加入购物车。1,加入购物车,领券购买 status:{ @@ -132,22 +134,22 @@ specificationList:{ handler(n,o){ this.chooseNumber = 1; - - this.isAllFailure = false; this.chooseIndex = 0; + for(let i=0;i0){ this.chooseIndex = i; + // console.log(this.chooseIndex,"this.chooseIndex") return } - - // if(i == n.length-1){ - // this.isAllFailure = true; - // this.chooseIndex = 0 - // } + } + + + }, deep:true, + immediate: true, // 初始化监听 } }, components:{ @@ -193,7 +195,14 @@ noMoreLess(){ uni.showToast({ icon: 'none', - title: "低于最少购买件数", + title: "低于最少购买数量", + duration: 1000 + }); + }, + noMore(){ + uni.showToast({ + icon: 'none', + title: "超出最大购买数量", duration: 1000 }); }, @@ -209,7 +218,7 @@ insertShoppingCart(params).then(async res=>{ let title ; if (res.return_code == '000000') { - title = res.return_data; + title = "加入购物车成功"; this.$emit("refreshCartNum") }else{ @@ -254,11 +263,13 @@ // this.$emit("close") }, - // + //选择商品规格change事件 select(index){ this.chooseIndex = index; - if(this.chooseNumber>this.specificationList[this.chooseIndex].stock){ - this.chooseNumber = this.specificationList[this.chooseIndex].stock + if(this.specificationList[this.chooseIndex].stock==0){ + this.chooseNumber = 0; + }else{ + this.chooseNumber = 1; } }, diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue index 4d7922f..a6f7f22 100644 --- a/components/goods-list/goods-list.vue +++ b/components/goods-list/goods-list.vue @@ -130,7 +130,7 @@ - + @@ -321,13 +321,14 @@ let params = { goodsId: id }; - console.log(params) + // console.log(params) findGoodsSkuByGoodsId(params).then(res => { if (res.return_code == '000000') { if (res.return_data && res.return_data.length > 0) { this.specificationList = res.return_data; this.$refs.popup.show(); + // console.log(this.specificationList) } else { this.specificationList = []; } diff --git a/physical-merchants/classify/cart/cart.vue b/physical-merchants/classify/cart/cart.vue index 4a68a48..1484e99 100644 --- a/physical-merchants/classify/cart/cart.vue +++ b/physical-merchants/classify/cart/cart.vue @@ -10,7 +10,7 @@ + @click="swipe_opt_event($event,item.id)" @change="swipe_change($event, item.id)"> @@ -425,16 +425,11 @@ content: '确定把该商品移除购物车吗?', success: function(res) { if (res.confirm) { - console.log('用户点击确定,要删除的id', ids); + // console.log('用户点击确定,要删除的id', ids); let params = { ids: ids }; - uni.showLoading({ - title: '加载中', - mask:true, - }); deleteShoppingCart(params).then(res => { - uni.hideLoading(); let title; if (res.return_code == '000000') { title = res.return_data; @@ -475,31 +470,21 @@ } goodsEditNum(params).then(res => { + + if (res.return_code == '000000') { - // uni.showToast({ - // title: res.return_data, - // icon: 'none', - // duration: 2000 - // }) + } else { //增加数量失败 - // this.cartList.map(item=>{ - // if(item.id == id){ - // item.num = 1; - // } - // }) - - - //重新刷新数据 - this.initData(); - uni.showToast({ title: res.return_msg, icon: 'none', duration: 2000 }) } - + + //重新刷新数据 + this.initData(); }) diff --git a/physical-merchants/classify/goodsDetail/goodsDetail.vue b/physical-merchants/classify/goodsDetail/goodsDetail.vue index 7029abe..66777fe 100644 --- a/physical-merchants/classify/goodsDetail/goodsDetail.vue +++ b/physical-merchants/classify/goodsDetail/goodsDetail.vue @@ -89,7 +89,7 @@ - + diff --git a/physical-merchants/classify/order/orderDetail.vue b/physical-merchants/classify/order/orderDetail.vue index 0d6ab91..7d74f45 100644 --- a/physical-merchants/classify/order/orderDetail.vue +++ b/physical-merchants/classify/order/orderDetail.vue @@ -40,7 +40,7 @@ - + @@ -63,7 +63,7 @@ 还有{{goodsList2.length}}种商品 - + @@ -164,8 +164,8 @@ - 收货信息 - + 收货信息 + {{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}} {{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}} @@ -174,42 +174,42 @@ - 物流信息 - + 物流信息 + 查看物流信息 - 订单编号 - + 订单编号 + {{orderId}} 复制 - 下单时间 - + 下单时间 + {{recinfo.createTime | formatDate('-')}} - 支付方式 - - 支付宝 - 微信支付 - 积分兑换 - 汇联通工会卡 - 银联 + 支付方式 + + 支付宝 + 微信支付 + 积分兑换 + 汇联通工会卡 + 银联 - 备注 - - {{recinfo.remarks || "暂无数据"}} + 备注 + + {{recinfo.remarks || "无"}} @@ -218,8 +218,8 @@ - 收货信息 - + 收货信息 + {{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}} {{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}} @@ -228,24 +228,24 @@ - 订单编号 - + 订单编号 + {{orderId}} 复制 - 下单时间 - + 下单时间 + {{recinfo.createTime | formatDate('-')}} - 备注 - - {{recinfo.remarks || "暂无数据"}} + 备注 + + {{recinfo.remarks || "无"}} diff --git a/physical-merchants/classify/order/pay.vue b/physical-merchants/classify/order/pay.vue index ae56edc..2ac2bb5 100644 --- a/physical-merchants/classify/order/pay.vue +++ b/physical-merchants/classify/order/pay.vue @@ -60,7 +60,7 @@ - 确认支付¥{{payPrice}} + 确认支付¥{{payPrice | numFormat}} @@ -271,7 +271,9 @@ if (that.paytype == '2') { - // #ifdef H5 + + // console.log(app.globalData) + // #ifdef H5 let params = { "orderNo": that.orderNo, "openId": app.globalData.openId, @@ -285,6 +287,7 @@ "openIdType": 1 } // #endif + console.log(params) wechatPay(params).then(res => { if (res.return_code == '000000') { // #ifdef MP diff --git a/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue b/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue index d1f26f4..8f62353 100644 --- a/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue +++ b/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue @@ -1,5 +1,5 @@