Commit 760bfb9b by zhangzhen

细节优化

parent 077d4999
...@@ -1534,7 +1534,7 @@ ...@@ -1534,7 +1534,7 @@
return; return;
}else{ }else{
let startDateTime= ""; let startDateTime= "";
if(!this.addM && t != 0 ){ if(!this.addM && (t != 0 || (t==0 && this.dateIntervalList[0].status==1))){
this.addM = true this.addM = true
startDateTime = moment(startDate).add(1,"m").format("YYYY-MM-DD"); startDateTime = moment(startDate).add(1,"m").format("YYYY-MM-DD");
this.startTime = moment(startDate).add(1,"m").format("HH:mm"); this.startTime = moment(startDate).add(1,"m").format("HH:mm");
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<view class="flex-1 flex-col"> <view class="flex-1 flex-col">
<view class="info"> <view class="info">
<text class="text-title text-bold">预约包间:</text> <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>
<view class="info"> <view class="info">
<text class="text-title text-bold">{{orderInfo.orderType==1?'下单':'续单'}}时间:</text> <text class="text-title text-bold">{{orderInfo.orderType==1?'下单':'续单'}}时间:</text>
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
</template> </template>
<script> <script>
import {login} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js" import {getDictItem} from "@/utils/tools.js"
import fNavbar from '@/components/module/f-navbar/f-navbar'; import fNavbar from '@/components/module/f-navbar/f-navbar';
import {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js" import {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js"
...@@ -205,6 +206,7 @@ ...@@ -205,6 +206,7 @@
}, },
onLoading(){ onLoading(){
getOrderInfoByNo(this.orderNo).then(res=>{ getOrderInfoByNo(this.orderNo).then(res=>{
if(res.data.code == 200){
this.orderInfo = { this.orderInfo = {
...res.data.data, ...res.data.data,
roomImages: res.data.data.roomImages.split(','), roomImages: res.data.data.roomImages.split(','),
...@@ -214,6 +216,33 @@ ...@@ -214,6 +216,33 @@
endTime: res.data.data.endDate? res.data.data.endDate.split(" ")[1] : res.data.data.preEndDate.split(" ")[1], 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") :'' 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)
}
})
}
}) })
}, },
onGetOrderInfo(){ onGetOrderInfo(){
......
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