Commit 909c5815 by zhangzhen

细节优化

parent c55a5b4c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:fontSize="38" bgColor="#E40583" :scrollTop="scrollTop" navbarType='5'></f-navbar> :fontSize="38" bgColor="#E40583" :scrollTop="scrollTop" navbarType='5'></f-navbar>
<view class="header-content" :style="{paddingTop:statusBarHeight+'px' }"> <view class="header-content" :style="{paddingTop:statusBarHeight+'px' }">
<image class="logo-bg" :src="assetsPath +'/logo.png'" mode="widthFix"></image> <image class="logo-bg" :src="assetsPath +'/logo_v1.png'" mode="widthFix"></image>
</view> </view>
<scroll-view :enable-flex="true" class="scroll-view" scroll-y="true" @scroll="onScroll"> <scroll-view :enable-flex="true" class="scroll-view" scroll-y="true" @scroll="onScroll">
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
</view> </view>
</view> </view>
<view class="flex-row part-right"> <view class="flex-row part-right">
<image :src="assetsPath +'/map_icon.png'" mode="scaleToFill" @tap="onNavToMap"> <image :src="assetsPath +'/map_icon_v1.png'" mode="scaleToFill" @tap="onNavToMap">
</image> </image>
<image :src="assetsPath +'/phone_icon.png'" mode="scaleToFill" <image :src="assetsPath +'/phone_icon_v1.png'" mode="scaleToFill"
@tap="onOpenTelphone"> @tap="onOpenTelphone">
</image> </image>
</view> </view>
......
...@@ -550,6 +550,7 @@ ...@@ -550,6 +550,7 @@
} }
}, },
onLoad(option) { onLoad(option) {
console.log(option,"option")
uni.showLoading({ uni.showLoading({
title: "加载中" title: "加载中"
}) })
...@@ -558,6 +559,9 @@ ...@@ -558,6 +559,9 @@
this.onGetDicts(); this.onGetDicts();
this.id = option.roomId; this.id = option.roomId;
if (option.orderNo) { if (option.orderNo) {
if(option.modeIndex){
this.modeIndex = Number(option.modeIndex);
}
this.orderType = 2; this.orderType = 2;
this.distanceIndex = 1 this.distanceIndex = 1
this.preOrderNo = option.orderNo; this.preOrderNo = option.orderNo;
...@@ -1059,7 +1063,7 @@ ...@@ -1059,7 +1063,7 @@
this.packageMode = []; this.packageMode = [];
this.packList = this.roomInfo.packList; this.packList = this.roomInfo.packList;
// console.log(this.packageMode,"通宵和闲时套餐") // console.log(this.packageMode,"通宵和闲时套餐")
this.modeIndex = 0; // this.modeIndex = 0;
} }
if (this.roomInfo.roomLabelList && this.roomInfo.roomLabelList.length) { if (this.roomInfo.roomLabelList && this.roomInfo.roomLabelList.length) {
this.roomLabelList = this.roomInfo.roomLabelList this.roomLabelList = this.roomInfo.roomLabelList
......
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间 // 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let startDateStemp = this.orderInfo.status == 2? moment(moment().format("YYYY-MM-DD HH:mm:00")).valueOf(): moment(orderEndDate).valueOf() let startDateStemp = this.orderInfo.status == 2? moment(moment().format("YYYY-MM-DD HH:mm:00")).valueOf(): moment(orderEndDate).valueOf()
//可续单的结束时间戳 //可续单的结束时间戳
let endDateStemp = startDateStemp + 60*60*1000; let endDateStemp = startDateStemp + 90*60*1000;
let continueStatus = true; let continueStatus = true;
if(res.data.code ==200 && res.data.data && res.data.data.length){ if(res.data.code ==200 && res.data.data && res.data.data.length){
new Promise((resolve,reject) => { new Promise((resolve,reject) => {
...@@ -397,12 +397,43 @@ ...@@ -397,12 +397,43 @@
} }
}) })
}).then(continueStatus =>{ }).then(continueStatus =>{
console.log(continueStatus,"continueStatus")
if(continueStatus){ if(continueStatus){
uni.navigateTo({ uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}` url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}&modeIndex=1`
}) })
}else{ }else{
endDateStemp = startDateStemp + 60*60*1000;
continueStatus = true;
new Promise((resolve,reject) => {
res.data.data.forEach((item,i)=>{
let start = moment(item.timeHour +':00:00').valueOf();
let end = moment(item.timeHour +':59:59').valueOf();
if(start < endDateStemp && start >= startDateStemp && item.status ==1 ){
if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){
continueStatus = false;
}else{
if( startDateStemp >= moment(item.startHoldTime).valueOf() && startDateStemp < moment(item.endHoldTime).valueOf()){
continueStatus = false;
}else if( endDateStemp >= moment(item.startHoldTime).valueOf()){
continueStatus = false;
}
}
}
if(i>= res.data.data.length-1){
resolve(continueStatus)
}
})
}).then(continueStatus2 => {
console.log(continueStatus2,"continueStatus2")
if(continueStatus2){
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
})
}else{
uni.showToast({ uni.showToast({
icon:"none", icon:"none",
title:"此订单已无可续单时段" title:"此订单已无可续单时段"
...@@ -410,6 +441,8 @@ ...@@ -410,6 +441,8 @@
} }
}) })
} }
})
}
}).catch(err=>{ }).catch(err=>{
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
......
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