|
|
|
@ -2,60 +2,33 @@
|
|
|
|
<view class="container">
|
|
|
|
<view class="container">
|
|
|
|
<!-- 顶部筛选标签 -->
|
|
|
|
<!-- 顶部筛选标签 -->
|
|
|
|
<view class="filter-tabs">
|
|
|
|
<view class="filter-tabs">
|
|
|
|
<view
|
|
|
|
<view class="tab-item" :class="{ active: activeTab === 'all' }" @click="switchTab('all')">
|
|
|
|
class="tab-item"
|
|
|
|
|
|
|
|
:class="{ active: activeTab === 'all' }"
|
|
|
|
|
|
|
|
@click="switchTab('all')"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
全部
|
|
|
|
全部
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="tab-item" :class="{ active: activeTab === 'recharge' }" @click="switchTab('recharge')">
|
|
|
|
class="tab-item"
|
|
|
|
|
|
|
|
:class="{ active: activeTab === 'recharge' }"
|
|
|
|
|
|
|
|
@click="switchTab('recharge')"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
充值
|
|
|
|
充值
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="tab-item" :class="{ active: activeTab === 'monthly' }" @click="switchTab('monthly')">
|
|
|
|
class="tab-item"
|
|
|
|
|
|
|
|
:class="{ active: activeTab === 'monthly' }"
|
|
|
|
|
|
|
|
@click="switchTab('monthly')"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
包月
|
|
|
|
包月
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="tab-item" :class="{ active: activeTab === 'season' }" @click="switchTab('season')">
|
|
|
|
class="tab-item"
|
|
|
|
|
|
|
|
:class="{ active: activeTab === 'season' }"
|
|
|
|
|
|
|
|
@click="switchTab('season')"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
包季
|
|
|
|
包季
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="tab-item" :class="{ active: activeTab === 'yearly' }" @click="switchTab('yearly')">
|
|
|
|
class="tab-item"
|
|
|
|
|
|
|
|
:class="{ active: activeTab === 'yearly' }"
|
|
|
|
|
|
|
|
@click="switchTab('yearly')"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
包年
|
|
|
|
包年
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 订单列表 -->
|
|
|
|
<!-- 订单列表 -->
|
|
|
|
<view class="order-list">
|
|
|
|
<view class="order-list">
|
|
|
|
<view
|
|
|
|
<view class="order-item" v-for="order in filteredOrders" :key="order.id">
|
|
|
|
class="order-item"
|
|
|
|
|
|
|
|
v-for="order in filteredOrders"
|
|
|
|
|
|
|
|
:key="order.id"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<!-- 订单头部 -->
|
|
|
|
<!-- 订单头部 -->
|
|
|
|
<view class="order-header">
|
|
|
|
<view class="order-header">
|
|
|
|
<view class="order-info">
|
|
|
|
<view class="order-info">
|
|
|
|
<text class="order-number">订单编号: {{ order.orderNumber }}</text>
|
|
|
|
<text class="order-number">订单编号: {{ order.orderNumber }}</text>
|
|
|
|
<view class="order-type-tag">{{ order.typeLabel }}</view>
|
|
|
|
<view class="order-type-tag">复制</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view
|
|
|
|
<view class="order-status" :class="order.status">
|
|
|
|
class="order-status"
|
|
|
|
|
|
|
|
:class="order.status"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ order.statusText }}
|
|
|
|
{{ order.statusText }}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -94,52 +67,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 订单操作 -->
|
|
|
|
<!-- 订单操作 -->
|
|
|
|
<view class="order-actions">
|
|
|
|
<view class="order-actions">
|
|
|
|
<u-button
|
|
|
|
<div>
|
|
|
|
v-if="order.status === 'pending'"
|
|
|
|
<div class="countdown-text" v-if="order.status === 'pending'">支付剩余时间: {{ order.countdown }}
|
|
|
|
type="default"
|
|
|
|
</div>
|
|
|
|
size="small"
|
|
|
|
</div>
|
|
|
|
@click="cancelOrder(order)"
|
|
|
|
<div class="buttonBox">
|
|
|
|
>
|
|
|
|
<template v-if="order.status === 'pending'">
|
|
|
|
取消订单
|
|
|
|
<uv-button type="default" size="small" @click="cancelOrder(order)">
|
|
|
|
</u-button>
|
|
|
|
取消订单
|
|
|
|
<u-button
|
|
|
|
</uv-button>
|
|
|
|
type="default"
|
|
|
|
<uv-button type="error" size="small" @click="payOrder(order)">
|
|
|
|
size="small"
|
|
|
|
去支付
|
|
|
|
@click="deleteOrder(order)"
|
|
|
|
</uv-button>
|
|
|
|
>
|
|
|
|
</template>
|
|
|
|
删除订单
|
|
|
|
<template v-else>
|
|
|
|
</u-button>
|
|
|
|
|
|
|
|
<u-button
|
|
|
|
<uv-button type="default" size="small" @click="deleteOrder(order)">
|
|
|
|
type="primary"
|
|
|
|
删除订单
|
|
|
|
size="small"
|
|
|
|
</uv-button>
|
|
|
|
@click="viewOrderDetail(order)"
|
|
|
|
<uv-button type="primary" size="small" @click="viewOrderDetail(order)">
|
|
|
|
>
|
|
|
|
查看详情
|
|
|
|
查看详情
|
|
|
|
</uv-button>
|
|
|
|
</u-button>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 待支付订单底部 -->
|
|
|
|
<!-- 待支付订单底部 -->
|
|
|
|
<view v-if="order.status === 'pending'" class="pending-footer">
|
|
|
|
<!-- <view v-if="order.status === 'pending'" class="pending-footer">
|
|
|
|
<view class="countdown">
|
|
|
|
<view class="countdown">
|
|
|
|
<text class="countdown-text">支付剩余时间: {{ order.countdown }}</text>
|
|
|
|
<text class="countdown-text">支付剩余时间: {{ order.countdown }}</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="pending-actions">
|
|
|
|
<view class="pending-actions">
|
|
|
|
<u-button
|
|
|
|
<uv-button
|
|
|
|
type="default"
|
|
|
|
type="default"
|
|
|
|
size="large"
|
|
|
|
size="large"
|
|
|
|
@click="cancelOrder(order)"
|
|
|
|
@click="cancelOrder(order)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
取消订单
|
|
|
|
取消订单
|
|
|
|
</u-button>
|
|
|
|
</uv-button>
|
|
|
|
<u-button
|
|
|
|
<uv-button
|
|
|
|
type="error"
|
|
|
|
type="error"
|
|
|
|
size="large"
|
|
|
|
size="large"
|
|
|
|
@click="payOrder(order)"
|
|
|
|
@click="payOrder(order)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
去支付
|
|
|
|
去支付
|
|
|
|
</u-button>
|
|
|
|
</uv-button>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view> -->
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
@ -175,8 +149,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
// 响应式数据
|
|
|
|
// 响应式数据
|
|
|
|
const activeTab = ref('all')
|
|
|
|
const activeTab = ref('all')
|
|
|
|
const orders = ref([
|
|
|
|
const orders = ref([{
|
|
|
|
{
|
|
|
|
|
|
|
|
id: 1,
|
|
|
|
id: 1,
|
|
|
|
orderNumber: 'ORD20230515001',
|
|
|
|
orderNumber: 'ORD20230515001',
|
|
|
|
typeLabel: '续费',
|
|
|
|
typeLabel: '续费',
|
|
|
|
@ -480,11 +453,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
.order-actions {
|
|
|
|
.order-actions {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
gap: 8px;
|
|
|
|
gap: 8px;
|
|
|
|
padding: 0 16px 16px;
|
|
|
|
padding: 0 16px 16px;
|
|
|
|
border-top: 1px solid #f0f0f0;
|
|
|
|
border-top: 1px solid #f0f0f0;
|
|
|
|
padding-top: 16px;
|
|
|
|
padding-top: 16px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.countdown-text {
|
|
|
|
|
|
|
|
color: #ff4d4f;
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.buttonBox {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pending-footer {
|
|
|
|
.pending-footer {
|
|
|
|
|