统一状态码,优化对应逻辑
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user