From 006a2ecb6430146cea3afdf353938043c231e5fc Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期四, 21 三月 2024 14:34:44 +0800
Subject: [PATCH] 修改购物车等

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

diff --git a/pages/cart/index.js b/pages/cart/index.js
index e567fdc..7e52034 100644
--- a/pages/cart/index.js
+++ b/pages/cart/index.js
@@ -20,7 +20,11 @@
     });
     this.shoppingCartGet();
   },
+  onShow() {
+    this.shoppingCartGet();
+    this.setData({ totalPrice: 0.00, selectedCount: 0, checkAll: false, })
 
+  },
   onDelete(e) {
     const item = e.currentTarget.dataset.item;
     app.MG.store.delShoppingCart({
@@ -77,12 +81,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
@@ -120,7 +121,6 @@
         });
       })
     } else {
-
       Toast({
         context: this,
         selector: '#t-toast',
@@ -129,8 +129,10 @@
         direction: 'column',
       });
     }
-
-
-
+  },
+  onLogin() {
+    wx.navigateTo({
+      url: '/pages/testLogin/index'
+    });
   }
 });

--
Gitblit v1.9.1