From 6223798e62075c3b02f6604f74e9aa806941a71e Mon Sep 17 00:00:00 2001
From: liudan <18634735655@163.com>
Date: Fri, 5 Jul 2024 18:34:08 +0800
Subject: [PATCH] 1
---
pages/huitong/huitongbao/index.vue | 2 +-
pages/order_addcart/order_addcart.vue | 26 +++++++++++++++----
pages/users/user_integral/index.vue | 2 +-
pages/users/user_integral1/fenhong.vue | 2 +-
pages/users/user_integral1/index.vue | 2 +-
.../users/user_integral1/user_contribute.vue | 2 +-
6 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/pages/huitong/huitongbao/index.vue b/pages/huitong/huitongbao/index.vue
index d4ee080..c66b9f1 100644
--- a/pages/huitong/huitongbao/index.vue
+++ b/pages/huitong/huitongbao/index.vue
@@ -73,7 +73,7 @@
- 昵称:{{item.order?item.order.nickname:item.user_nickname}}
+ 昵称:{{item.order.order_id?item.order.user.nickname:item.user_nickname}}
订单号:{{item.order_sn}}
diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue
index 77835c8..626f729 100644
--- a/pages/order_addcart/order_addcart.vue
+++ b/pages/order_addcart/order_addcart.vue
@@ -319,7 +319,7 @@
this.getCartNum();
this.goodsHidden = true;
this.footerswitch = true;
- this.isAllSelect = true; //全不选
+ // this.isAllSelect = true; //全不选
this.selectValue = []; //选中的数据
this.isShowAuth = false;
uni.setStorage({
@@ -690,7 +690,7 @@
}
that.onMyEvent();
that.getCartList(true);
- that.isAllSelect = true
+ // that.isAllSelect = true
}).catch(error => {
that.$util.Tips({
@@ -740,12 +740,20 @@
// 购物车列表
getCartList: function(isChange) {
let that = this;
+ let resArr=[]
+ this.cartList.valid.forEach(item=>{
+ item.list.forEach(i=>{
+ if(i.check){
+ resArr.push(i.product_id)
+ }
+ })
+ })
getCartList().then(res => {
res.data.list.forEach((item, index) => {
// item.allCheck = true
- this.$set(item,'allCheck',true)
+ // this.$set(item,'allCheck',true)
item.list.forEach((goods, j) => {
- goods.check = true
+ // goods.check = true
if (goods.cart_num == 1) {
goods.numSub = true;
} else {
@@ -756,7 +764,15 @@
} else {
goods.numAdd = false;
}
+ if(resArr.includes(goods.product_id)){
+ goods.check = true;
+ }
})
+ let selectedArr = item.list.filter(y=>{return y.check})
+
+ if(selectedArr.length==item.list.length){
+ this.$set(item,'allCheck',true)
+ }
})
this.cartList.valid = res.data.list;
// let newArr=JSON.parse(uni.getStorageSync('cartSelectedGoods'))
@@ -782,7 +798,7 @@
this.recommend = false
}
const sku = {}
- this.checkboxAllChange(true)
+ // this.checkboxAllChange(true)
//
});
},
diff --git a/pages/users/user_integral/index.vue b/pages/users/user_integral/index.vue
index c65fc0f..747b201 100644
--- a/pages/users/user_integral/index.vue
+++ b/pages/users/user_integral/index.vue
@@ -53,7 +53,7 @@
{{item.type}}
- 昵称:{{item.order?item.order.nickname:item.user_nickname}}
+ 昵称:{{item.order.order_id?item.order.user.nickname:item.user_nickname}}
订单号:{{item.order_sn}}
{{item.create_time}}
diff --git a/pages/users/user_integral1/fenhong.vue b/pages/users/user_integral1/fenhong.vue
index c474db4..9b2cfa3 100644
--- a/pages/users/user_integral1/fenhong.vue
+++ b/pages/users/user_integral1/fenhong.vue
@@ -43,7 +43,7 @@
{{item.type}}
- 昵称:{{item.order?item.order.nickname:item.user_nickname}}
+ 昵称:{{item.order.order_id?item.order.user.nickname:item.user_nickname}}
订单号:{{item.order_sn}}
diff --git a/pages/users/user_integral1/index.vue b/pages/users/user_integral1/index.vue
index 04410dd..4599b52 100644
--- a/pages/users/user_integral1/index.vue
+++ b/pages/users/user_integral1/index.vue
@@ -46,7 +46,7 @@
{{item.type}}
- 昵称:{{item.order?item.order.nickname:item.user_nickname}}
+ 昵称:{{item.order.order_id?item.order.user.nickname:item.user_nickname}}
订单号:{{item.order_sn}}
diff --git a/pages/users/user_integral1/user_contribute.vue b/pages/users/user_integral1/user_contribute.vue
index cc81f1f..3c3abef 100644
--- a/pages/users/user_integral1/user_contribute.vue
+++ b/pages/users/user_integral1/user_contribute.vue
@@ -47,7 +47,7 @@
{{item.type}}
- 昵称:{{item.order?item.order.nickname:item.user_nickname}}
+ 昵称:{{item.order.order_id?item.order.user.nickname:item.user_nickname}}
订单号:{{item.order_sn}}
{{item.create_time}}