diff --git a/pages/goods-update/goods-update.js b/pages/goods-update/goods-update.js index 9219da6..1c48295 100644 --- a/pages/goods-update/goods-update.js +++ b/pages/goods-update/goods-update.js @@ -1771,7 +1771,15 @@ Page({ return; } - const goodsDetail = this.data.goodsDetail; + // 显示确认提示,防止误点 + wx.showModal({ + title: '确认下架', + content: `确定要下架选中的${selectedIndices.length}个规格吗?`, + confirmText: '确定', + cancelText: '取消', + success: (res) => { + if (res.confirm) { + const goodsDetail = this.data.goodsDetail; const productId = goodsDetail.productId || goodsDetail.id; const weightQuantityData = goodsDetail.weightQuantityData || []; @@ -1906,6 +1914,9 @@ Page({ duration: 2000 }); }); + } + } + }); }, // 编辑输入处理 diff --git a/pages/goods-update/goods-update.wxml b/pages/goods-update/goods-update.wxml index 74665df..064878f 100644 --- a/pages/goods-update/goods-update.wxml +++ b/pages/goods-update/goods-update.wxml @@ -504,12 +504,6 @@ - - - 取消 - 确定 - - 请选择要下架的规格 @@ -517,7 +511,7 @@ + + + + 取消 + 确定 + \ No newline at end of file