3fecd77739
新增了订单支付页面和支付成功页面,分别用于处理用户的支付流程和展示支付结果。同时,更新了订单状态的逻辑,确保在订单列表中正确显示各个状态。调整了设备租借逻辑,优化了扫码处理流程,提升用户体验。
55 lines
977 B
JavaScript
55 lines
977 B
JavaScript
/**
|
|
* 订单状态映射
|
|
*/
|
|
export const OrderStatusMap = {
|
|
waiting_for_payment: {
|
|
text: '待支付',
|
|
class: 'status-waiting'
|
|
},
|
|
payment_in_progress: {
|
|
text: '支付中',
|
|
class: 'status-progress'
|
|
},
|
|
payment_successful: {
|
|
text: '支付成功',
|
|
class: 'status-success'
|
|
},
|
|
in_used: {
|
|
text: '使用中',
|
|
class: 'status-using'
|
|
},
|
|
payment_failed: {
|
|
text: '支付失败',
|
|
class: 'status-failed'
|
|
},
|
|
order_cancelled: {
|
|
text: '已取消',
|
|
class: 'status-cancelled'
|
|
},
|
|
used_done: {
|
|
text: '已完成',
|
|
class: 'status-finished'
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 订单状态分类
|
|
*/
|
|
export const OrderStatusTabs = [
|
|
{
|
|
text: '全部',
|
|
status: []
|
|
},
|
|
{
|
|
text: '待支付',
|
|
status: ['waiting_for_payment', 'payment_in_progress']
|
|
},
|
|
{
|
|
text: '使用中',
|
|
status: ['payment_successful', 'in_used']
|
|
},
|
|
{
|
|
text: '已完成',
|
|
status: ['used_done', 'payment_failed', 'order_cancelled']
|
|
}
|
|
] |