Commit 360d35cd by zhangzhen

代码优化

parent fafeb31f
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<view class="part"> <view class="part">
<button class="cu-btn block round line-pink lg" open-type="share">分享好友</button> <button class="cu-btn block round line-pink lg" open-type="share">分享好友</button>
</view> </view>
<view v-if=" continStatus || orderInfo.status ==1 " class="part"> <view v-if="continStatus || orderInfo.status ==1 " class="part">
<button class="cu-btn block round bg-mauve lg" @tap="onCheckLogin">房间续单</button> <button class="cu-btn block round bg-mauve lg" @tap="onCheckLogin">房间续单</button>
</view> </view>
</view> </view>
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
if(res.data.data.status ===2){ if(res.data.data.status ===2){
let nowTime = moment().valueOf(); let nowTime = moment().valueOf();
let endTime = moment(res.data.data.endDate).valueOf(); let endTime = moment(res.data.data.endDate).valueOf();
if(nowTime-endTime< 15*60*1000){ if(nowTime - endTime< 15*60*1000){
this.continStatus = true; this.continStatus = true;
} }
} }
...@@ -262,6 +262,11 @@ ...@@ -262,6 +262,11 @@
}, },
onGetOrderInfo(){ onGetOrderInfo(){
noLoginGetOrderInfo(this.orderNo).then(res=>{ noLoginGetOrderInfo(this.orderNo).then(res=>{
let nowTime = moment().valueOf();
let endTime = moment(res.data.data.endDate).valueOf();
if(nowTime - endTime< 15*60*1000){
this.continStatus = true;
}
this.orderInfo = { this.orderInfo = {
...res.data.data, ...res.data.data,
roomImages: res.data.data.roomImages.split(','), roomImages: res.data.data.roomImages.split(','),
......
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