feat: 订单详情代码完善
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
<view class="card-header">
|
||||
<view class="status-info">
|
||||
<image class="status-icon" src="./images/service.png"></image>
|
||||
<view class="order-title">{{ orderData.title }}</view>
|
||||
<view class="order-title">{{ orderData.visitorName }}</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="orderData.status !== 'pending'"
|
||||
:class="['status-tag', `tag-${orderData.status}`]"
|
||||
:class="['status-tag', `tag-${orderData.orderStatus}`]"
|
||||
>
|
||||
{{ getStatusText(orderData.status) }}
|
||||
{{ getStatusText(orderData.orderStatus) }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">联系房客:</text>
|
||||
<text class="value">{{ orderData.contactName }}</text>
|
||||
<text class="value">{{ orderData.visitorName }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">联系电话:</text>
|
||||
@@ -55,7 +55,7 @@ const props = defineProps({
|
||||
createTime: "",
|
||||
contactName: "",
|
||||
contactPhone: "",
|
||||
status: "pending", // pending-待处理, completed-已完成, cancelled-已取消
|
||||
orderStatus: "pending", // pending-待处理, completed-已完成, cancelled-已取消
|
||||
}),
|
||||
},
|
||||
});
|
||||
@@ -66,10 +66,13 @@ const emit = defineEmits(["click", "call", "complete"]);
|
||||
// 获取状态文本
|
||||
const getStatusText = (status) => {
|
||||
const statusMap = {
|
||||
pending: "待处理",
|
||||
completed: "已完成",
|
||||
cancelled: "已取消",
|
||||
processing: "处理中",
|
||||
0: "待支付",
|
||||
1: "待确认",
|
||||
2: "待使用",
|
||||
3: "已取消",
|
||||
4: "退款中",
|
||||
5: "已关闭",
|
||||
6: "已完成",
|
||||
};
|
||||
return statusMap[status] || "未知状态";
|
||||
};
|
||||
@@ -97,4 +100,4 @@ defineExpose({
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user