Commit 760bfb9b by zhangzhen

细节优化

parent 077d4999
......@@ -1534,7 +1534,7 @@
return;
}else{
let startDateTime= "";
if(!this.addM && t != 0 ){
if(!this.addM && (t != 0 || (t==0 && this.dateIntervalList[0].status==1))){
this.addM = true
startDateTime = moment(startDate).add(1,"m").format("YYYY-MM-DD");
this.startTime = moment(startDate).add(1,"m").format("HH:mm");
......
......@@ -36,7 +36,7 @@
<view class="flex-1 flex-col">
<view class="info">
<text class="text-title text-bold">预约包间:</text>
<text class="text-title ">{{orderInfo.roomName||'-'}}{{orderInfo.roomType?'【'+roomTypeEnum[orderInfo.roomType]+'】':''}}</text>
<text class="text-title ">{{orderInfo.roomName||'-'}}{{orderInfo.roomTypeName?'【'+orderInfo.roomTypeName+'】':''}}</text>
</view>
<view class="info">
<text class="text-title text-bold">{{orderInfo.orderType==1?'下单':'续单'}}时间:</text>
......@@ -133,6 +133,7 @@
</template>
<script>
import {login} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js"
import fNavbar from '@/components/module/f-navbar/f-navbar';
import {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js"
......@@ -205,14 +206,42 @@
},
onLoading(){
getOrderInfoByNo(this.orderNo).then(res=>{
this.orderInfo = {
...res.data.data,
roomImages: res.data.data.roomImages.split(','),
startDate: res.data.data.startDate? res.data.data.startDate.split(" ")[0] : res.data.data.preStartDate.split(" ")[0],
startTime: res.data.data.startDate? res.data.data.startDate.split(" ")[1] : res.data.data.preStartDate.split(" ")[1],
endDate: res.data.data.endDate? res.data.data.endDate.split(" ")[0] : res.data.data.preEndDate.split(" ")[0],
endTime: res.data.data.endDate? res.data.data.endDate.split(" ")[1] : res.data.data.preEndDate.split(" ")[1],
payTime:res.data.data.payTime? moment(res.data.data.payTime).format("YYYY-MM-DD HH:mm:ss") :''
if(res.data.code == 200){
this.orderInfo = {
...res.data.data,
roomImages: res.data.data.roomImages.split(','),
startDate: res.data.data.startDate? res.data.data.startDate.split(" ")[0] : res.data.data.preStartDate.split(" ")[0],
startTime: res.data.data.startDate? res.data.data.startDate.split(" ")[1] : res.data.data.preStartDate.split(" ")[1],
endDate: res.data.data.endDate? res.data.data.endDate.split(" ")[0] : res.data.data.preEndDate.split(" ")[0],
endTime: res.data.data.endDate? res.data.data.endDate.split(" ")[1] : res.data.data.preEndDate.split(" ")[1],
payTime:res.data.data.payTime? moment(res.data.data.payTime).format("YYYY-MM-DD HH:mm:ss") :''
}
} else if(res.data.code == 401){
this.onLogin();
}
})
},
onLogin(){
let that = this;
wx.login({
success: (res) => {
login(res.code).then(res => {
if (res.data.code == 200) {
if (res.data.data.type === "login") {
uni.setStorageSync('tokenHeaders', "Authori-zation")
uni.setStorage({
key: uni.getStorageSync('tokenHeaders'),
data: res.data.data.token
});
that.onLoading();
}
}else{
setTimeout(()=>{
that.onLogin();
},1000)
}
})
}
})
},
......
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