Commit eb05cafd by zhangzhen

开门和续单快捷入口功能优化

parent e4e896dc
...@@ -108,10 +108,18 @@ ...@@ -108,10 +108,18 @@
if(res.data.data&&res.data.data.length===1){ if(res.data.data&&res.data.data.length===1){
this.orderInfo = res.data.data[0]; this.orderInfo = res.data.data[0];
if(i === 1){ if(i === 1){
// 去续单 if(this.orderInfo.status ==1){
uni.navigateTo({ // 去续单
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}` uni.navigateTo({
}) url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
})
}else{
uni.showToast({
icon:"none",
title:"无使用中的订单,无法预单哦!"
})
}
}else{ }else{
// 去开门 // 去开门
...@@ -119,9 +127,26 @@ ...@@ -119,9 +127,26 @@
} }
}else if(res.data.data&&res.data.data.length > 1){ }else if(res.data.data&&res.data.data.length > 1){
uni.switchTab({
url:"/pages/orderRecord/orderRecord" let list = res.data.data.filter(item=> item.status ==1)
})
if(list.length ===1){
this.orderInfo = list[0];
if(i === 1){
// 去续单
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
})
}else{
// 去开门
this.onOpenDoor()
}
}else{
uni.switchTab({
url:"/pages/orderRecord/orderRecord"
})
}
}else{ }else{
uni.showToast({ uni.showToast({
icon:"none", icon:"none",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment