Commit 5cf01c80 by zhangzhen

细节优化

parent 5d76af2c
......@@ -876,7 +876,6 @@
if(this.useCouponList.length){
let i = this.useCouponList.findIndex(item=> item.duration == this.duration)
this.selectCouponIndex = i>=0? i : 0;
}
}
} else if (res.data.code == 401) {
......@@ -1164,6 +1163,19 @@
this.$refs.confirmPop.close();
},
onOrderConfirm() {
let nowDate = moment().format("HHmmss")
let setDate = moment(this.dateObj.startDate).format("HHmmss");
// 如果当前时间大于开始时间,则不允许下单
if(nowDate > setDate){
uni.showToast({
icon:"none",
title:"当前时间晚于预约开始时间,请重新选择预约时间"
})
return
}
if(this.orderTypeList[this.index].type ===2){
if(this.packageMode[this.modeIndex].packaEndPeriod-this.packageMode[this.modeIndex].packaStartPeriod<23 && Number(moment(this.dateObj.endDate).format("HH"))>=this.packageMode[this.modeIndex].packaEndPeriod ){
this.content=`所选套餐为限时套餐,订单结束时间为当日${Number(this.packageMode[this.modeIndex].packaEndPeriod)>=10?this.packageMode[this.modeIndex].packaEndPeriod:'0'+this.packageMode[this.modeIndex].packaEndPeriod}:00,请注意下单结束时间!`
......@@ -1400,6 +1412,7 @@
}
this.dateObj = this.onSetDateTime(this.startTime, this.endTime);
this.onGetUseCoupon();
this.useDateStatus = true;
this.intervalList = this.intervalList.map((item,index) =>{
let status = item.status;
......
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