From bc5d79cdd957fcee510d7a1cee07f6775af65596 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 03 三月 2026 10:04:46 +0800
Subject: [PATCH] 合并

---
 mini-program/pages/shopping-cart/shopping-cart.vue |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/mini-program/pages/shopping-cart/shopping-cart.vue b/mini-program/pages/shopping-cart/shopping-cart.vue
index f3d1e54..7a783ef 100644
--- a/mini-program/pages/shopping-cart/shopping-cart.vue
+++ b/mini-program/pages/shopping-cart/shopping-cart.vue
@@ -1,9 +1,9 @@
 <template>
 	<view class="cart">
 		<u-swipe-action>
-			<u-swipe-action-item :options="options" v-for="(item, index) in list" :name="index" :key="index" @click="deleRow">
+			<u-swipe-action-item :options="options" v-for="(item, index) in list" :name="index" :key="item.id" @click="deleRow" ref="item">
 				<view class="cart-item" @click="jumpDetails(item.goodsId, item.status)">
-					<view class="cart-item-check" @click.stop="select(item)">
+					<view class="cart-item-check" @click.stop="select(index)">
 						<image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-if="!item.active"></image>
 						<image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix" v-else></image>
 					</view>
@@ -87,6 +87,9 @@
 		},
 		onLoad() {
 			this.getList()
+			uni.$on('shuaxin', () => {
+				this.getList()
+			})
 		},
 		methods: {
 			jumpDetails(id, status) {
@@ -130,8 +133,8 @@
 				})
 			},
 			// 鍗曢��
-			select(item) {
-				item.active = !item.active
+			select(index) {
+				this.list[index].active = !this.list[index].active
 			},
 			// 鏇存柊鍟嗗搧鏁伴噺
 			changeNum(index) {
@@ -146,6 +149,7 @@
 					.then(res => {
 						if (res.code === 200) {
 							this.list.splice(e.name, 1)
+							that.$refs.item.forEach(item => item.closeHandler(true))
 						}
 					})
 			},

--
Gitblit v1.9.3