Browse Source

修改规格选择弹窗:将按钮移到底部并添加确认提示

pull/19/head
Default User 1 month ago
parent
commit
0ef19f0228
  1. 13
      pages/goods-update/goods-update.js
  2. 12
      pages/goods-update/goods-update.wxml

13
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
});
});
}
}
});
},
// 编辑输入处理

12
pages/goods-update/goods-update.wxml

@ -504,12 +504,6 @@
<!-- 规格选择弹窗 - 用于下架单个规格 -->
<view class="custom-select-modal" wx:if="{{showSpecUnpublishModal}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 9999;" catchtouchmove="true">
<view style="position: relative; background: white; border-radius: 20rpx; max-height: 80vh; width: 80%; max-width: 600rpx; overflow: hidden;">
<!-- 顶部操作栏:取消和确定按钮 -->
<view style="padding: 20rpx; display: flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #eee;">
<view bindtap="closeSpecUnpublishModal" style="font-size: 32rpx; color: #333; padding: 10rpx 20rpx;">取消</view>
<view bindtap="confirmSpecUnpublish" style="font-size: 32rpx; color: #07c160; padding: 10rpx 20rpx;">确定</view>
</view>
<view style="padding: 20rpx; font-size: 28rpx; color: #333; text-align: center; border-bottom: 1rpx solid #eee;">
请选择要下架的规格
</view>
@ -546,6 +540,12 @@
</view>
</view>
</scroll-view>
<!-- 底部操作栏:取消和确定按钮 -->
<view style="padding: 20rpx; display: flex; justify-content: space-between; align-items: center; border-top: 1rpx solid #eee;">
<view bindtap="closeSpecUnpublishModal" style="font-size: 32rpx; color: #333; padding: 10rpx 20rpx;">取消</view>
<view bindtap="confirmSpecUnpublish" style="font-size: 32rpx; color: #07c160; padding: 10rpx 20rpx;">确定</view>
</view>
</view>
</view>
</view>
Loading…
Cancel
Save