diff --git a/.workbuddy/memory/2026-06-23.md b/.workbuddy/memory/2026-06-23.md new file mode 100644 index 0000000..fcf975d --- /dev/null +++ b/.workbuddy/memory/2026-06-23.md @@ -0,0 +1,16 @@ +# 2026-06-23 + +## 微信小程序审核修复(第二轮) + +### 审核失败原因 +1. **提现页面规则不完整** — 需展示可提现额度、每日提现次数、提现时间、到账时间等 +2. **限时秒杀功能点击无响应** — 无法体验完整流程 + +### 修改文件 +1. **`src/pages/user/withdraw/index.tsx`** — 将原来仅3项的 config-card 替换为完整 rules-card,新增:可提现额度、最低提现、每日限额、每日提现次数、提现时间(含兜底"全天可提")、到账时间、手续费(含兜底"免手续费"),底部加 rules-note 说明区块 +2. **`src/pages/user/withdraw/index.scss`** — 新增 .rules-card / .rules-title / .rule-item / .rules-note 等样式 +3. **`src/pages/shop/seckill-detail/index.tsx`** — `handleBuyNow` → `handleBuyClick`,增加未开始/已结束/已抢光三种状态的 Toast 提示,按钮 onClick 始终绑定(不再条件判断) +4. **`src/pages/seckill-detail.tsx`** — 同步修改 root 平铺版秒杀详情页(与 shop/ 子目录版内容一致) + +### 构建状态 +- `taro build --type weapp` 编译通过 ✓ diff --git a/src/pages/seckill-detail.tsx b/src/pages/seckill-detail.tsx index f3d4a20..995a586 100644 --- a/src/pages/seckill-detail.tsx +++ b/src/pages/seckill-detail.tsx @@ -91,14 +91,26 @@ const SeckillDetailPage: React.FC = () => { setCountdown(`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`) } - const handleBuyNow = () => { + const handleBuyClick = () => { if (!seckill) return - if (seckill.stock <= 0) { - Taro.showToast({ title: '已抢光', icon: 'none' }) + if (seckill.status === 0) { + Taro.showToast({ title: '活动尚未开始,请耐心等待', icon: 'none' }) return } + if (seckill.status === 2 || new Date(seckill.endTime).getTime() <= Date.now()) { + Taro.showToast({ title: '活动已结束,下次再来', icon: 'none' }) + return + } + + if (seckill.stock <= 0) { + Taro.showToast({ title: '已抢光,下次再来', icon: 'none' }) + return + } + + if (submitting) return + // 先拉取商品规格(如果没有的话) if (!product && seckill.goodsId) { Taro.showLoading({ title: '加载规格...' }) @@ -255,8 +267,11 @@ const SeckillDetailPage: React.FC = () => { {submitting ? '抢购中...' : isActive ? (seckill.stock > 0 ? '立即抢购' : '已抢光') : seckill.status === 0 ? '即将开始' : '已结束'} diff --git a/src/pages/shop/seckill-detail/index.tsx b/src/pages/shop/seckill-detail/index.tsx index f3d4a20..995a586 100644 --- a/src/pages/shop/seckill-detail/index.tsx +++ b/src/pages/shop/seckill-detail/index.tsx @@ -91,14 +91,26 @@ const SeckillDetailPage: React.FC = () => { setCountdown(`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`) } - const handleBuyNow = () => { + const handleBuyClick = () => { if (!seckill) return - if (seckill.stock <= 0) { - Taro.showToast({ title: '已抢光', icon: 'none' }) + if (seckill.status === 0) { + Taro.showToast({ title: '活动尚未开始,请耐心等待', icon: 'none' }) return } + if (seckill.status === 2 || new Date(seckill.endTime).getTime() <= Date.now()) { + Taro.showToast({ title: '活动已结束,下次再来', icon: 'none' }) + return + } + + if (seckill.stock <= 0) { + Taro.showToast({ title: '已抢光,下次再来', icon: 'none' }) + return + } + + if (submitting) return + // 先拉取商品规格(如果没有的话) if (!product && seckill.goodsId) { Taro.showLoading({ title: '加载规格...' }) @@ -255,8 +267,11 @@ const SeckillDetailPage: React.FC = () => { {submitting ? '抢购中...' : isActive ? (seckill.stock > 0 ? '立即抢购' : '已抢光') : seckill.status === 0 ? '即将开始' : '已结束'} diff --git a/src/pages/user/withdraw/index.scss b/src/pages/user/withdraw/index.scss index a699efe..7938be6 100644 --- a/src/pages/user/withdraw/index.scss +++ b/src/pages/user/withdraw/index.scss @@ -89,6 +89,72 @@ font-weight: bold; } +/* 提现规则卡片 */ +.rules-card { + margin: 0 24rpx 24rpx; + padding: 32rpx; + background: #fff; + border-radius: 16rpx; +} + +.rules-title { + margin-bottom: 24rpx; + padding-bottom: 20rpx; + border-bottom: 2rpx solid #f0f0f0; +} + +.rules-title-text { + font-size: 30rpx; + font-weight: bold; + color: #333; +} + +.rules-list { + display: flex; + flex-direction: column; + gap: 0; +} + +.rule-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 18rpx 0; + border-bottom: 1rpx solid #f8f8f8; +} + +.rule-item:last-child { + border-bottom: none; +} + +.rule-label { + font-size: 26rpx; + color: #666; + flex-shrink: 0; +} + +.rule-value { + font-size: 26rpx; + color: #ff6b35; + font-weight: bold; +} + +/* 规则说明 */ +.rules-note { + margin-top: 24rpx; + padding: 24rpx; + background: #fff9f5; + border-radius: 12rpx; + border-left: 6rpx solid #ff6b35; +} + +.rules-note-text { + font-size: 24rpx; + color: #888; + line-height: 1.8; + display: block; +} + .submit-btn { margin: 48rpx 24rpx; padding: 24rpx 0; diff --git a/src/pages/user/withdraw/index.tsx b/src/pages/user/withdraw/index.tsx index 3cbd95d..4aedbe8 100644 --- a/src/pages/user/withdraw/index.tsx +++ b/src/pages/user/withdraw/index.tsx @@ -126,23 +126,77 @@ export default function WithdrawPage() { )} - - - 单次限额 - ¥{config.withdraw_max_amount || '200'} + {/* 提现规则 */} + + + 提现规则 - - 每日限额 - ¥{config.withdraw_daily_limit || '2000'} - - {config.withdraw_time_start && ( - - 提现时间 - - {config.withdraw_time_start} - {config.withdraw_time_end} - + + + 可提现额度 + ¥{stats.withdrawingTotal || '0.00'} - )} + + 最低提现 + ¥{config.withdraw_min_amount || '10'}起 + + + 单次限额 + ¥{config.withdraw_max_amount || '200'} + + + 每日限额 + ¥{config.withdraw_daily_limit || '2000'} + + + 每日提现次数 + {config.withdraw_daily_count || 3}次/天 + + {config.withdraw_time_start ? ( + + 提现时间 + {config.withdraw_time_start} - {config.withdraw_time_end} + + ) : ( + + 提现时间 + 全天可提 + + )} + + 到账时间 + {config.arrival_time || '1-3个工作日'} + + {config.withdraw_fee_rate && parseFloat(config.withdraw_fee_rate) > 0 ? ( + + 手续费 + {config.withdraw_fee_rate}% + + ) : ( + + 手续费 + 免手续费 + + )} + + + {/* 规则说明 */} + + + • 提现申请提交后将在1-3个工作日内审核到账,遇节假日顺延 + + + • 每日提现次数上限为{config.withdraw_daily_count || 3}次,超出后次日可继续申请 + + + • 单次提现金额范围为¥{config.withdraw_min_amount || '10'} - ¥{config.withdraw_max_amount || '200'} + + {config.withdraw_time_start && ( + + • 仅在{config.withdraw_time_start}-{config.withdraw_time_end}期间可发起提现 + + )} +