This commit is contained in:
woody 2025-10-30 14:16:27 +08:00
commit 72712a2718
1 changed files with 20 additions and 21 deletions

View File

@ -196,13 +196,11 @@
<!-- 购物车抽屉 --> <!-- 购物车抽屉 -->
<u-popup <u-popup
v-if="showCartDrawer"
:show="showCartDrawer" :show="showCartDrawer"
mode="bottom" mode="bottom"
border-radius="30" border-radius="30"
:closeable="true" :closeable="true"
:overlay="false" style="position: absolute; bottom: 0; left: 0; right: 0"
:zIndex="200"
@close="showCartDrawer = false" @close="showCartDrawer = false"
> >
<view class="cart-drawer"> <view class="cart-drawer">
@ -443,24 +441,25 @@ export default {
// //
removeFromCart(index) { removeFromCart(index) {
uni.showModal({
title: '提示',
content: '确定要删除该商品吗?',
success: res => {
if (res.confirm) {
this.cartData[this.activeTab].splice(index, 1) this.cartData[this.activeTab].splice(index, 1)
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 1500,
})
if (this.cartTotalCount === 0) { if (this.cartTotalCount === 0) {
this.showCartDrawer = false this.showCartDrawer = false
} }
} // uni.showModal({
}, // title: '',
zIndex: 99999999, // // content: '',
}) // success: res => {
// if (res.confirm) {
// this.cartData[this.activeTab].splice(index, 1)
// uni.showToast({
// title: '',
// icon: 'success',
// duration: 1500,
// })
// }
// },
// zIndex: 99999999, //
// })
}, },
// //