Commit 75ba8fc2 by zhangzhen

细节优化

parent f9621a9a
......@@ -178,7 +178,7 @@
<text class="text-black text-left">预约时长</text>
<text class="text-black">{{duration}}小时</text>
</view>
<view class="flex-between price">
<view v-show="orderTypeList[index].type==1" class="flex-between price">
<text class="text-black text-left">房间单价</text>
<view class="flex-row">
<text class="text-black text-sm text-bold" style="margin-bottom: 3upx;"></text>
......@@ -197,9 +197,9 @@
<view class="flex-between price">
<text class="text-black text-left">预约优惠</text>
<view class="flex-row">
<text class="text-pink text-sm text-bold"
style="margin-bottom: 3upx;">{{computePriceInfo.couponFee>0?'-':''}}</text>
<!-- <text class="text-pink text-sm text-bold" style="margin-bottom: 3upx;">{{computePriceInfo.couponFee>0?'-':''}}</text> -->
<text class="text-pink text-lg text-bold">{{computePriceInfo.couponFee}}</text>
<text></text>
</view>
</view>
</view>
......@@ -463,7 +463,7 @@
title: "加载中"
})
this.onGetDicts();
this.id = option.roomId || 106;
this.id = option.roomId;
if (option.orderNo) {
this.orderType = 2;
this.preOrderNo = option.orderNo;
......@@ -510,10 +510,8 @@
.split(",").map(val => this.hostUrl + val) : []
}
// 判断房间有没有绑定套餐
if (this.roomInfo.packList && this.roomInfo.packList.length) {
let packageMode = this.roomInfo.packList
packageMode.sort((a,b)=>Number(a.duration)-Number(b.duration))
this.packageMode = packageMode
if (this.orderType == 1 && this.roomInfo.packList && this.roomInfo.packList.length) {
this.packageMode = this.roomInfo.packList
this.index = 1;
this.modeIndex = 0;
} else {
......@@ -544,16 +542,11 @@
orderType:this.orderType
}).then(res => {
uni.hideLoading()
// orderType 订单类型
if (this.orderType === 1) {
if (this.index == 1){
if (this.orderTypeList[this.index].type == 2){
this.duration = Number(this.packageMode[this.modeIndex].duration);
}else{
this.duration = Number(this.distanceMode[this.distanceIndex].duration);
}
}
this.dateIntervalList = res.data.data.map((item, index) => {
return {
...item,
......@@ -604,6 +597,22 @@
this.setStartTime.duration+=1;
}
if(index >= this.dateIntervalList.length-1){
if(this.orderType == 1){
// 开始时间加一分钟
let arr = this.startTime.split(":");
let m = Number(arr[1])+1
let h = Number(arr[0])
if(m>=60){
h+=1
m-=60
}
if(h>=24){
h -=24
this.setStartTime.days = 2
this.days = 2;
}
this.startTime = `${h>=10?h:'0'+h}:${m>=10?m:'0'+m}`
}
this.onSetEndTime()
}
})
......@@ -827,6 +836,7 @@
onChangeMode(i) {
if (this.modeIndex === i) return;
this.modeIndex = i;
this.duration = Number(this.packageMode[this.modeIndex].duration);
let val = this.intervalList.findIndex(item=>item.status === 2)
let len = this.intervalList.filter(item=> item.status ===2).length;
let duration = Number(this.packageMode[this.modeIndex].duration);
......
......@@ -260,18 +260,24 @@
this.$refs.popup.close();
},
confirm(){
uni.showLoading({
title:'提交中'
})
orderRefund({
orderNo:this.orderInfo.orderNo,
amount:this.orderInfo.payPrice,
approvalStatus:1
}).then(res=>{
uni.hideLoading()
if(res.data.code == 200){
this.close()
uni.showToast({
icon:'none',
title:'退单已提交'
})
this.onLoading()
setTimeout(()=>{
this.onLoading()
},1500)
}else{
uni.showToast({
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