完善设置页面UI设计

This commit is contained in:
2026-06-02 17:34:44 +08:00
parent 881262940c
commit 714e63e12a
21 changed files with 697 additions and 850 deletions

View File

@@ -262,7 +262,8 @@ const getPendingCountdownText = (): string => {
const shouldShowCancelledActions = (): boolean => {
const source = toOrderStatusSource()
if (source == null) return false
return getOrderDisplayStatus(source) == 'cancelled'
const displayStatus = getOrderDisplayStatus(source)
return displayStatus == 'cancelled' || displayStatus == 'expired'
}
// 辅助函数 - 必须在调用前定义
@@ -272,6 +273,7 @@ const getStatusText = (): string => {
if (source != null) {
const displayStatus = getOrderDisplayStatus(source)
if (displayStatus == 'pending') return '待付款'
if (displayStatus == 'expired') return '已超时未支付'
if (displayStatus == 'cancelled') return '已取消'
}
if (status == 1) return '待付款'
@@ -292,6 +294,9 @@ const getStatusDesc = (): string => {
if (displayStatus == 'pending') {
return '请在 ' + getPendingCountdownText() + ' 内支付'
}
if (displayStatus == 'expired') {
return '订单已超时未支付,请返回订单列表或重新选购'
}
if (displayStatus == 'cancelled') {
const currentReason = order.value?.cancel_reason ?? ''
if (currentReason.indexOf('超时') >= 0) {
@@ -325,7 +330,7 @@ const getStatusClass = (): string => {
if (source != null) {
const displayStatus = getOrderDisplayStatus(source)
if (displayStatus == 'pending') return 'status-pending'
if (displayStatus == 'cancelled') return 'status-cancelled'
if (displayStatus == 'cancelled' || displayStatus == 'expired') return 'status-cancelled'
}
const status = order.value?.order_status ?? 0
return 'status-' + status