diff --git a/pages/order/order.vue b/pages/order/order.vue index cded34e..8d83adf 100644 --- a/pages/order/order.vue +++ b/pages/order/order.vue @@ -2,60 +2,33 @@ - + 全部 - + 充值 - + 包月 - + 包季 - + 包年 - + 订单编号: {{ order.orderNumber }} - {{ order.typeLabel }} + 复制 - + {{ order.statusText }} @@ -94,52 +67,53 @@ - - 取消订单 - - - 删除订单 - - - 查看详情 - +
+
支付剩余时间: {{ order.countdown }} +
+
+
+ + +
- +
@@ -175,8 +149,7 @@ // 响应式数据 const activeTab = ref('all') - const orders = ref([ - { + const orders = ref([{ id: 1, orderNumber: 'ORD20230515001', typeLabel: '续费', @@ -254,14 +227,14 @@ try { // 调用取消订单API // await RPC.post('/api/order/cancel', { orderId: order.id }) - + // 更新订单状态 const index = orders.value.findIndex(item => item.id === order.id) if (index !== -1) { orders.value[index].status = 'cancelled' orders.value[index].statusText = '已取消' } - + uni.showToast({ title: '订单已取消', icon: 'success' @@ -288,13 +261,13 @@ try { // 调用删除订单API // await RPC.post('/api/order/delete', { orderId: order.id }) - + // 从列表中移除订单 const index = orders.value.findIndex(item => item.id === order.id) if (index !== -1) { orders.value.splice(index, 1) } - + uni.showToast({ title: '订单已删除', icon: 'success' @@ -355,7 +328,7 @@ background: white; padding: 0 16px; border-bottom: 1px solid #e5e5e5; - + .tab-item { flex: 1; text-align: center; @@ -363,11 +336,11 @@ color: #666; font-size: 14px; position: relative; - + &.active { color: #4285f4; font-weight: 500; - + &::after { content: ''; position: absolute; @@ -385,29 +358,29 @@ .order-list { padding: 16px; - + .order-item { background: white; border-radius: 12px; margin-bottom: 16px; overflow: hidden; - + .order-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 0; - + .order-info { display: flex; align-items: center; gap: 8px; - + .order-number { font-size: 14px; color: #333; } - + .order-type-tag { background: #f0f0f0; color: #666; @@ -416,60 +389,60 @@ font-size: 12px; } } - + .order-status { padding: 4px 8px; border-radius: 4px; font-size: 12px; - + &.paid { background: #e8f5e8; color: #52c41a; } - + &.pending { background: #fff7e6; color: #fa8c16; } - + &.cancelled { background: #fff1f0; color: #ff4d4f; } } } - + .order-details { padding: 16px; - + .detail-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; - + &:last-child { margin-bottom: 0; } - + .label { color: #666; font-size: 14px; } - + .value { color: #333; font-size: 14px; - + &.price { color: #333; font-weight: 500; } - + &.discount { color: #ff4d4f; } - + &.final-price { color: #333; font-weight: bold; @@ -477,33 +450,46 @@ } } } - + .order-actions { display: flex; - justify-content: flex-end; + justify-content: space-between; + align-items: center; gap: 8px; padding: 0 16px 16px; border-top: 1px solid #f0f0f0; padding-top: 16px; + + .countdown-text { + color: #ff4d4f; + font-size: 12px; + } + + .buttonBox { + display: flex; + align-items: center; + gap: 10px; + justify-content: flex-end; + } } - + .pending-footer { border-top: 1px solid #f0f0f0; padding: 16px; - + .countdown { margin-bottom: 12px; - + .countdown-text { color: #ff4d4f; font-size: 12px; } } - + .pending-actions { display: flex; gap: 12px; - + .u-button { flex: 1; } @@ -518,7 +504,7 @@ align-items: center; justify-content: center; padding: 80px 20px; - + .empty-text { color: #999; font-size: 14px;