From cd6a723e2d7f70c5fa7dd9275e41709fe6acbd05 Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Fri, 14 Jun 2024 03:00:26 +0800 Subject: [PATCH] 1 --- components/Authorize.vue | 3 +++ components/couponListWindow/index.vue | 6 +++++ pages/goods_details/index.vue | 4 +-- pages/order_addcart/order_addcart.vue | 35 ++++++++++++++++++++++++--- pages/store/home/index.vue | 5 ++-- pages/user/index.vue | 9 ++++++- pages/users/user_integral1/index.vue | 3 ++- 7 files changed, 56 insertions(+), 9 deletions(-) diff --git a/components/Authorize.vue b/components/Authorize.vue index d14bf87..2b354ad 100644 --- a/components/Authorize.vue +++ b/components/Authorize.vue @@ -235,6 +235,9 @@ if(res.data.result.user.isNew && this.mp_is_new){ this.editModal = true; } + return self.$util.Tips({ + title: '授权成功' + }); }else{ uni.setStorageSync('auth_token',res.data.result.key); return uni.navigateTo({ diff --git a/components/couponListWindow/index.vue b/components/couponListWindow/index.vue index 61c8b8a..0ae7c9f 100644 --- a/components/couponListWindow/index.vue +++ b/components/couponListWindow/index.vue @@ -103,6 +103,7 @@ getCouponUser: function(index, item) { let that = this; if (item.issue) return true; + switch (this.openType) { case 0: //领取优惠券 @@ -113,6 +114,11 @@ title: "领取成功" }); that.$emit('ChangCoupons', item); + }).catch((res)=>{ + console.log(res,"==--") + that.$util.Tips({ + title: res + }); }) break; case 1: diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index a38b42f..2d1f0e7 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -239,7 +239,7 @@ - + 产品介绍 @@ -1875,7 +1875,7 @@ color: #fff; font-size: 28rpx; &.sold_out { - width: 444rpx; + // width: 444rpx; border-radius: 50rpx; } &.virtual_buy { diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index af2109f..0868b32 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -264,11 +264,12 @@ this.getNav(); // uni.showTabBar(); if (this.isLogin == true) { + this.isAllSelect = true; //全不选 this.getCartList(); this.getCartNum(); this.goodsHidden = true; this.footerswitch = true; - this.isAllSelect = false; //全选 + this.selectValue = []; //选中的数据 this.isShowAuth = false; uni.setStorage({ @@ -673,7 +674,20 @@ } }) }) - this.cartList.valid = res.data.list + this.cartList.valid = res.data.list; + let newArr=JSON.parse(uni.getStorageSync('cartSelectedGoods')) + this.cartList.valid.forEach(item=>{ + item.list.forEach(p=>{ + newArr.forEach(i=>{ + if(p.product_id==i){ + console.log(i) + p.check=true + this.$set(p,'check',true) + } + }) + }) + + }) this.cartList.invalid = res.data.fail if(res.data.list.length == 0 && res.data.list.length == 0){ this.recommend = true; @@ -685,6 +699,7 @@ } const sku = {} this.checkboxAllChange() + // }); }, // 商铺全选 @@ -705,7 +720,21 @@ }, // 商品选中 goodsCheck(goods) { - goods.check = !goods.check + console.log(goods) + goods.check = !goods.check; + let selectedCart=[] + if(goods.check){ + this.cartList.valid.forEach(item=>{ + item.list.forEach(i=>{ + if(goods.product_id==i.product_id){ + selectedCart.push(i.product_id) + } + + }) + }) + uni.setStorageSync('cartSelectedGoods',JSON.stringify(selectedCart)) + } + this.cartAllCheck('goodsCheck') }, // 全选判断 diff --git a/pages/store/home/index.vue b/pages/store/home/index.vue index 6acf5d6..f3391b9 100644 --- a/pages/store/home/index.vue +++ b/pages/store/home/index.vue @@ -179,7 +179,7 @@ - + @@ -227,8 +227,9 @@ {{loadTitle}} - + + diff --git a/pages/user/index.vue b/pages/user/index.vue index 5cfe50e..8380038 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -630,7 +630,9 @@ that.is_promoter = res.data.is_promoter; that.extension_status = res.data.extension_status; Object.keys(res.data.assets).forEach(item=>{ - that.$set(that.assets,item,Math.floor(res.data.assets[item])); + // that.$set(that.assets,item,Math.floor(res.data.assets[item])); + let num = Number(res.data.assets[item]).toFixed(2) + that.$set(that.assets,item,num); }) that.spreadPeopleHandle() @@ -877,6 +879,11 @@ .num { font-size: 38rpx; font-weight: bold; + display: inline-block; + width: 120rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .txt { margin-top: 8rpx; diff --git a/pages/users/user_integral1/index.vue b/pages/users/user_integral1/index.vue index e2a2f5c..9e82cac 100644 --- a/pages/users/user_integral1/index.vue +++ b/pages/users/user_integral1/index.vue @@ -45,6 +45,7 @@ {{item.type}} + 订单号:{{item.order_sn}} {{item.create_time}} @@ -425,7 +426,7 @@ .integral-details .wrapper .list .item .state { - margin-bottom: 24rpx; + // margin-bottom: 24rpx; font-size: 30rpx; color: #333333; }