Commit 3b7daf0c by zhangzhen

细节优化

parent 6e7fe225
......@@ -273,6 +273,7 @@
this.$refs.popup.open()
uni.hideLoading()
}
this.objListDate = [];
this.onGetListStore()
}
})
......
......@@ -672,15 +672,17 @@
let end = Number(this.endTime.split(":")[0])
let endM = Number(this.endTime.split(":")[1])
if(this.setStartTime.days >=2){
start +=24
this.setStartTime.days = 1
}
if(this.orderType ==1 && end <= start) {
// if(this.setStartTime.days >=2){
// start +=24
// this.setStartTime.days = 1
// }
if (this.orderType ==2 && end < start){
end += 24
} else if (this.orderType ==2 && end < start){
}else if(this.orderType ==1 && end <= start) {
end += 24
}
// 重新将数据还原到元数据
this.intervalList = [
...this.dateIntervalList
......@@ -794,13 +796,13 @@
},
// 下单模式切换
onTypeChange(i) {
if (this.orderType == 2) {
uni.showToast({
icon: 'none',
title: '房间续单无法选择套餐模式'
})
return
}
// if (this.orderType == 2) {
// uni.showToast({
// icon: 'none',
// title: '房间续单无法选择套餐模式'
// })
// return
// }
if (this.index === i || !this.packageMode.length) return;
this.index = i
this.modeIndex = 0;
......@@ -1110,7 +1112,10 @@
let startArr = startTime.split(":")
let endArr = endTime.split(":")
obj.startDate = `${this.dateList[this.dateIndex].readDate} ${startTime}:00`
if (Number(endArr[0]) <= Number(startArr[0])) {
if (this.orderType == 1 && Number(endArr[0]) <= Number(startArr[0])) {
obj.endDate =
`${moment(this.dateList[this.dateIndex].readDate).add(1,"days").format("YYYY-MM-DD")} ${endTime}:00`
}else if(this.orderType == 2 && Number(endArr[0]) < Number(startArr[0])) {
obj.endDate =
`${moment(this.dateList[this.dateIndex].readDate).add(1,"days").format("YYYY-MM-DD")} ${endTime}:00`
} else {
......
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