Commit 034dcbb5 by songbingqi

修复订单详情等待时间获取 订单详情tabar遮挡问题

parent 2a8be8f6
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view class="tips"> <view class="tips">
<view v-if="orderInfo.state == 7">为保持口感,请尽快引用哦~</view> <view v-if="orderInfo.state == 7">为保持口感,请尽快引用哦~</view>
<view v-if="orderInfo.state == 4">订单已制作完成,请尽快取餐~</view> <view v-if="orderInfo.state == 4">订单已制作完成,请尽快取餐~</view>
<view v-if="orderInfo.state == 2 || orderInfo.state == 3">请您耐心等候,预计<text class="time">3</text>分钟后可取</view> <view v-if="orderInfo.state == 2 || orderInfo.state == 3">请您耐心等候,预计<text class="time">{{waitTime}}</text>分钟后可取</view>
</view> </view>
<div class="btns"> <div class="btns">
<a type="primary" @click="cancelOrder" v-if="orderInfo.state == 1" class="btn_cancel">取消订单</a> <a type="primary" @click="cancelOrder" v-if="orderInfo.state == 1" class="btn_cancel">取消订单</a>
...@@ -141,7 +141,12 @@ export default { ...@@ -141,7 +141,12 @@ export default {
// return // return
const {data = {}} = await Order.getOrderDetail({orderId:oId}) const {data = {}} = await Order.getOrderDetail({orderId:oId})
this.orderInfo = data?.data this.orderInfo = data?.data
const getTime = ['2', '3'].indexOf(this.orderInfo.state) >= 0
const isBuild = ['4', '5'].indexOf(this.orderInfo.state) >= 0; const isBuild = ['4', '5'].indexOf(this.orderInfo.state) >= 0;
if(getTime){
const {data = {}} = await Order.getOrderWaiteTime({orderId:oId})
this.waitTime = data?.data
}
if (isBuild) { if (isBuild) {
new QRCode('myQrcode', { new QRCode('myQrcode', {
text: this.orderInfo.pickCode, text: this.orderInfo.pickCode,
...@@ -161,7 +166,8 @@ export default { ...@@ -161,7 +166,8 @@ export default {
orderInfo: {}, orderInfo: {},
ewmImg: '', ewmImg: '',
Utils, Utils,
isBuild:true isBuild:true,
waitTime:0
} }
}, },
methods: { methods: {
...@@ -320,6 +326,7 @@ export default { ...@@ -320,6 +326,7 @@ export default {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
z-index: 9999;
.tabTitle{ .tabTitle{
font-size: 26rpx; font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
......
...@@ -114,5 +114,14 @@ export default { ...@@ -114,5 +114,14 @@ export default {
// uni.showToast({ title: '服务器错误', icon: 'none' }) // uni.showToast({ title: '服务器错误', icon: 'none' })
console.log('服务器错误'); console.log('服务器错误');
}); });
},
getOrderWaiteTime(params) {
return uni.$u.http
.get(`/app/getWaitTineByOrderId?orderId=${params.orderId}`)
.then((res) => res)
.catch((err) => {
// uni.showToast({ title: '服务器错误', icon: 'none' })
console.log('服务器错误');
});
} }
}; };
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