feat(hiList): 临时购物车交互优化
This commit is contained in:
		
							parent
							
								
									5e3d9f93ad
								
							
						
					
					
						commit
						eaf23e2381
					
				|  | @ -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({ |       this.cartData[this.activeTab].splice(index, 1) | ||||||
|         title: '提示', |       if (this.cartTotalCount === 0) { | ||||||
|         content: '确定要删除该商品吗?', |         this.showCartDrawer = false | ||||||
|         success: res => { |       } | ||||||
|           if (res.confirm) { |       // uni.showModal({ | ||||||
|             this.cartData[this.activeTab].splice(index, 1) |       //   title: '提示', | ||||||
|             uni.showToast({ |       //   content: '确定要删除该商品吗?', | ||||||
|               title: '删除成功', |       //   success: res => { | ||||||
|               icon: 'success', |       //     if (res.confirm) { | ||||||
|               duration: 1500, |       //       this.cartData[this.activeTab].splice(index, 1) | ||||||
|             }) |       //       uni.showToast({ | ||||||
|             if (this.cartTotalCount === 0) { |       //         title: '删除成功', | ||||||
|               this.showCartDrawer = false |       //         icon: 'success', | ||||||
|             } |       //         duration: 1500, | ||||||
|           } |       //       }) | ||||||
|         }, |       //     } | ||||||
|         zIndex: 99999999, // 确保层级高于抽屉 |       //   }, | ||||||
|       }) |       //   zIndex: 99999999, // 确保层级高于抽屉 | ||||||
|  |       // }) | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     // 切换购物车抽屉 |     // 切换购物车抽屉 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue