统一状态码,优化对应逻辑

This commit is contained in:
not-like-juvenile
2026-02-09 16:53:20 +08:00
parent 3ea0f008b5
commit f46ec4c461
19 changed files with 591 additions and 236 deletions

View File

@@ -24,7 +24,7 @@
<view class="card-body">
<view class="pkg-icon">📦</view>
<view class="pkg-info">
<text class="latest-msg">{{ order.current_status_text || '包裹准备中' }}</text>
<text class="latest-msg">{{ getDisplayMessage(order.current_status_text || '', order.status) }}</text>
<text class="order-meta">订单号: {{ order.order_no }}</text>
</view>
<text class="arrow">></text>
@@ -77,15 +77,10 @@
this.orders = [...data]
},
getStatusText(status: string): string {
const maps = {
'SHIPPED': '已发货',
'IN_TRANSIT': '运输中',
'DELIVERED': '已签收',
'OUT_FOR_DELIVERY': '派送中',
'PENDING': '待揽收',
'EXCEPTION': '包裹异常'
}
return (maps[status] != null) ? maps[status] : '处理中'
return mockService.getStatusText(status)
},
getDisplayMessage(text: string, status: string): string {
return mockService.getDisplayMessage(text, status)
},
goDetail(orderNo: string) {
uni.navigateTo({