diff --git a/components/PaymentPopup.vue b/components/PaymentPopup.vue index 24f0afa..179bdd2 100644 --- a/components/PaymentPopup.vue +++ b/components/PaymentPopup.vue @@ -21,6 +21,7 @@ 优惠券 道具卡 + + + + + 加载中... + + + + + ⚠️ + {{ error }} + + + + + + + + + + + + + + + + {{ getStatusIcon(order) }} + + + {{ statusText(order) }} + 请在 15 分钟内完成支付 + 订单已取消 + 感谢您的购买,期待再次光临 + + + + + + + + 商品清单 + 共 {{ order.items ? order.items.length : 0 }} 件 + + + + + + + + 中奖 + + + {{ order.reward_level }}赏 + + + + + {{ item.title || '商品' }} + + {{ order.activity_name }} + + + + ¥ + {{ formatPrice(item.price) }} + + x{{ item.quantity }} + + + + + + + + + + 订单编号 + + {{ order.order_no }} + 复制 + + + + 下单时间 + {{ formatTime(order.created_at) }} + + + 支付时间 + {{ formatTime(order.paid_at) }} + + + 取消时间 + {{ formatTime(order.cancelled_at) }} + + + 订单来源 + {{ getSourceTypeText(order.source_type) }} + + + + + + + 商品总额 + ¥{{ formatPrice(order.total_amount) }} + + + 优惠金额 + -¥{{ formatPrice(order.discount_amount) }} + + + + 实付款 + + ¥ + {{ formatPrice(order.actual_amount) }} + + + + + + + + 取消订单 + 立即支付 + + + + + + + diff --git a/pages/orders/index.vue b/pages/orders/index.vue index c1c2f48..ce20baa 100644 --- a/pages/orders/index.vue +++ b/pages/orders/index.vue @@ -247,7 +247,8 @@ function switchTab(tab) { } function apiStatus() { - return currentTab.value === 'pending' ? 'pending' : 'completed' + // 1: 待付款, 2: 已完成 + return currentTab.value === 'pending' ? 1 : 2 } // 过滤掉 source_type=3 的发奖订单 diff --git a/说明文档.md b/说明文档.md index 5416049..ca8712b 100644 --- a/说明文档.md +++ b/说明文档.md @@ -31,5 +31,7 @@ * [x] 2025-12-17: 修复 `pages/login/index.vue` 等多处 `$border-color` 未定义错误,在 `uni.scss` 中增加变量别名。 * [x] 2025-12-17: 修复 `pages/mine/index.vue` 编译错误,在 `api/appUser.js` 中补充 `getUserInfo`, `getUserTasks`, `getInviteRecords` 导出。 * [x] 2025-12-17: 将 dev 分支代码强制推送至 main 分支 (Deployment/Sync)。 +* [x] 2025-12-18: 实现订单详情 API 与取消订单 API (后端接口对接)。 +* [x] 2025-12-18: 开发订单详情页 UI 及交互逻辑。 * [ ] 2025-12-17: 进行中 - 优化 `pages/activity/yifanshang/index.vue` 及相关组件。 * [ ] 2025-12-17: 待开始 - 优化 `pages/login/index.vue` 视觉细节。