Commit 8fc700ff by zhangzhen

细节优化

parent d4e122e2
......@@ -204,30 +204,8 @@
this.onGetSysConfig();
uni.showLoading({
title:'加载中'
})
if (uni.getStorageSync("storeId") && this.storeList.length) {
this.storeId = uni.getStorageSync("storeId")
let obj = this.storeList.filter(item => item.id === this.storeId)[0]
new Promise((resolve)=>{
this.storeInfo = {
...obj,
distance:obj.distance? Number(obj.distance.substr(0,8)).toFixed(2):0,
roomVoList: obj.roomVoList && obj.roomVoList.length ? obj.roomVoList.map(item => {
return {
...item,
facilities: Array.isArray(item.facilities) ? item.facilities :item.facilities? item.facilities.split(",") : [],
images: item.images ? item.images.split(",").map(val => this.hostUrl + val) : []
}
}) : []
}
resolve()
}).then(()=>{
uni.hideLoading()
})
} else {
this.onLoading()
}
})
this.onLoading()
},
onReachBottom() {
if (this.status == 'loadmore') {
......@@ -255,11 +233,6 @@
},
onGetDicts() {
let dicts = []
// if (uni.getStorageSync('dicts')) {
// dicts = JSON.parse(uni.getStorageSync('dicts'))
// this.facilitieList = getDictItem(dicts, "indoor_facilities");
// this.onLoading()
// } else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
......@@ -267,22 +240,8 @@
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
this.roomStatusEnum = getDictItem(dicts, "store_room_status");
})
// }
},
onLoading() {
// uni.getSetting({
// complete: (res) => {
// console.log(res,'微信用户设置')
// if(res.authSetting['scope.userLocation']){
// } else{
// uni.hideLoading()
// this.$refs.popup.open()
// this.onGetListStore()
// }
// }
// })
uni.getLocation({
type: "gcj02",
complete: (res) => {
......@@ -292,10 +251,6 @@
uni.setStorageSync("latitude", res.latitude)
uni.setStorageSync("longitude", res.longitude)
} else{
// uni.showToast({
// icon: "none",
// title: '获取位置信息失败'
// })
this.$refs.popup.open()
}
uni.removeStorage({
......@@ -333,9 +288,6 @@
}).then(()=>{
uni.hideLoading()
})
// this.$nextTick(()=>{
// })
}
})
},
......
......@@ -53,7 +53,7 @@
<text class="text-title text-lg text-bold">套餐选择:</text>
</view>
<view class="flex-1 package-box">
<view v-for="(item,index) in packageMode" :key="index" class="flex-col item"
<view v-for="(item,index) in packageMode" v-if="index<=3" :key="index" class="flex-col item"
:class="{active: modeIndex===index,'item-3':packageMode.length<3,'item-n':packageMode.length>=3}"
@tap="onChangeMode(index)">
<text class="text-title">{{item.duration}}小时套餐</text>
......
......@@ -5,15 +5,15 @@
<view class="order-time">
<view class="flex-between">
<view class="flex-col part-left">
<text class="text-xxl text-bold">{{orderInfo.startTime}}</text>
<text class="text-lg">{{orderInfo.startDate}}</text>
<text class="text-xxl text-bold">{{orderInfo.startTime||'-'}}</text>
<text class="text-lg">{{orderInfo.startDate||'-'}}</text>
</view>
<view class="flex-col part-center">
<text class="text-xxl text-bold">{{orderInfo.timeLong || 0}}小时</text>
</view>
<view class="flex-col part-right">
<text class="text-xxl text-bold">{{orderInfo.endTime}}</text>
<text class="text-lg">{{orderInfo.endDate}}</text>
<text class="text-xxl text-bold">{{orderInfo.endTime||'-'}}</text>
<text class="text-lg">{{orderInfo.endDate||'-'}}</text>
</view>
</view>
</view>
......@@ -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.roomType?'【'+roomTypeEnum[orderInfo.roomType]+'】':''}}</text>
</view>
<view class="info">
<text class="text-title text-bold">{{orderInfo.orderType==1?'下单':'续单'}}时间:</text>
......@@ -44,17 +44,21 @@
</view>
<view class="info">
<text class="text-title text-bold">开始时间:</text>
<text class="text-title ">{{orderInfo.preStartDate}}:00</text>
<text class="text-title ">{{orderInfo.preStartDate||'00:00'}}:00</text>
</view>
<view class="info">
<text class="text-title text-bold">结束时间:</text>
<text class="text-title ">{{orderInfo.preEndDate}}:00</text>
<text class="text-title ">{{orderInfo.preEndDate ||'00:00'}}:00</text>
</view>
</view>
</view>
<view v-if="orderInfo.packName" class="flex-between">
<text class="text-gray ">套餐名称</text>
<text class="text-title ">{{orderInfo.packName||'-'}}</text>
</view>
<view class="flex-between">
<text class="text-gray ">订单编号</text>
<text class="text-title ">{{orderInfo.orderNo}}</text>
<text class="text-title ">{{orderInfo.orderNo||'-'}}</text>
</view>
<view class="flex-between">
<text class="text-gray">支付方式</text>
......@@ -64,6 +68,13 @@
<text class="text-gray">支付时间</text>
<text class="text-title">{{orderInfo.payTime||'-'}}</text>
</view>
<view class="flex-between">
<text class="text-gray">实付金额</text>
<view class="flex-row" style="align-items: center;">
<text class="text-pink text-bold text-xxl">{{orderInfo.payPrice||'-'}}</text>
<text style="margin-left: 4upx;"></text>
</view>
</view>
</view>
<view v-if="orderInfo.status <= 1" class="part-2">
......
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