代码提交

This commit is contained in:
黄少君
2023-11-15 19:59:37 +08:00
parent dcab74274f
commit 35b43ffd97
43 changed files with 1265 additions and 387 deletions

View File

@ -4,7 +4,7 @@
:fixed="false"
title="订单详情"
left-arrow
@leftClick="goList"
@leftClick="goBack"
/>
<view v-if="orderInfoData">
<view class="orderInfo-header background-warp">
@ -70,6 +70,7 @@
>
<goods
list
link
interval
desc="3"
showAction
@ -407,14 +408,16 @@ const handleOrderTake = async () => {
uni: orderInfoData.value.orderId,
}
const res = await orderTake(option)
toast({
title: '收货成功'
})
uni.showToast({
title: '收货成功',
duration: 2000
});
handleOrderInfo({
key: option.uni
})
} else if (res.cancel) {
}
}
});
@ -434,9 +437,23 @@ const handlePay = () => {
// 返回列表
const goList = ()=>{
let status = 0
switch (orderInfoData.value.status){
case -1:
status = -1
break
case 0:
status = 0
break
case 99:
status = 1
break
default:
status = orderInfoData.value.status +1
}
push({url: '/pages/orderList/orderList'}, {
data: {
type: orderInfoData.value.status === 99?1:orderInfoData.value.status+1,
type: status
}
})
}
@ -494,13 +511,15 @@ const handleCancel = async () => {
success: async (res) => {
if (res.confirm) {
await orderCancel({
id: data.value.orderId
id: orderInfoData.value.orderId
})
data.value = null
uni.showToast({
title: '已取消',
duration: 2000
});
setTimeout(()=>{
goList()
},2000)
} else if (res.cancel) {
}
}