From 05707c8c6adb1042597c52091ad25ed64d15bb55 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期四, 21 三月 2024 14:38:19 +0800
Subject: [PATCH] 设置

---
 pages/cart/index.js |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/pages/cart/index.js b/pages/cart/index.js
index c2ea63e..16c1922 100644
--- a/pages/cart/index.js
+++ b/pages/cart/index.js
@@ -20,7 +20,9 @@
     });
     this.shoppingCartGet();
   },
-
+  onShow() {
+    this.shoppingCartGet();
+  },
   onDelete(e) {
     const item = e.currentTarget.dataset.item;
     app.MG.store.delShoppingCart({
@@ -39,6 +41,7 @@
       searchList: []
     };
     app.MG.store.getShoppingCartProductList(query).then(res => {
+      console.log(res, 'res');
       res.datas.forEach(item => {
         item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160');
         console.log(item);
@@ -76,12 +79,9 @@
       if (eitem.id == item.id) {
         eitem.checked = e.detail.checked
       }
-
-
     })
     const data = items.filter(item => item.checked)
     const checkAll = data.length == this.data.shoppingCartData.length
-
     this.setData({
       shoppingCartData: items,
       checkAll
@@ -119,7 +119,6 @@
         });
       })
     } else {
-
       Toast({
         context: this,
         selector: '#t-toast',
@@ -128,8 +127,10 @@
         direction: 'column',
       });
     }
-
-
-
+  },
+  onLogin() {
+    wx.navigateTo({
+      url: '/pages/testLogin/index'
+    });
   }
 });

--
Gitblit v1.9.1