Commit eebca2b1 by zhangzhen

细节优化

parent ae38097f
......@@ -5,7 +5,7 @@
<text class="tips"><text class="text-bold">预定须知:</text> 预定成功后,请按预约时间及时到店消费,若无法及时到店消费,可提前取消订单</text>
</view>
<view class="part-right">
<text class="text-title text-xl text-bold">{{roomInfo.name||'一帆风顺'}}</text>
<text class="text-title text-xl text-bold">{{roomInfo.name||'一帆风顺'}}{{roomInfo.roomType?'【'+roomTypeEnum[roomInfo.roomType]+'】':''}}</text>
<view class="status-icon-box">
<view class="status-box" :class="'status-box-'+roomInfo.status">
<text>{{roomStatusEnum[roomInfo.status]}}</text>
......@@ -438,7 +438,8 @@
},
dateObj: {},
preOrderNo:'',
roomStatusEnum:{}
roomStatusEnum:{},
roomTypeEnum:{}
};
},
onLoad(option) {
......@@ -465,11 +466,13 @@
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.roomStatusEnum = getDictItem(dicts, "store_room_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.roomStatusEnum = getDictItem(dicts, "store_room_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
})
}
},
......
......@@ -21,11 +21,11 @@
<view class="flex-row room-image-box">
<view class="img-box">
<image :src="item.roomImages[0]" mode="heightFix"></image>
<image :src="hostUrl+item.roomImages[0]" mode="heightFix"></image>
</view>
<view class="flex-col">
<view class="flex-1 flex-col part-top">
<text class="text-title text-xl text-bold">{{item.roomName}}</text>
<text class="text-title text-xl text-bold">{{item.roomName}}{{item.roomType?'【'+roomTypeEnum[item.roomType]+'】':''}}</text>
<text class="text-black margin-top">预约时长:{{Number(item.timeLong)}}小时</text>
</view>
<view class="flex-1 flex-row part-bottom">
......@@ -109,7 +109,9 @@
</template>
<script>
import config from "@/config/index.config"
import fTabbar from '@/components/module/f-tabbar/f-tabbar';
import {dictList} from "@/api/index.js";
import {
orderList
} from "@/api/order.js"
......@@ -125,6 +127,7 @@ import NoLogin from "@/components/noLogin/noLogin"
},
data() {
return {
hostUrl:config.hostUrl,
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
......@@ -158,7 +161,8 @@ import NoLogin from "@/components/noLogin/noLogin"
pageSize: 10
},
loginStatus:true,
orderStatusEnum:{}
orderStatusEnum:{},
roomTypeEnum:{}
};
},
onLoad() {
......@@ -180,12 +184,14 @@ import NoLogin from "@/components/noLogin/noLogin"
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
this.onLoading()
})
}
......
......@@ -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}}</text>
<text class="text-title ">{{orderInfo.roomName}}{{orderInfo.roomType?'【'+roomTypeEnum[orderInfo.roomType]+'】':''}}</text>
</view>
<view class="info">
<text class="text-title text-bold">下单时间:</text>
......@@ -113,6 +113,9 @@
</template>
<script>
import {
getDictItem
} from "@/utils/tools.js"
import fNavbar from '@/components/module/f-navbar/f-navbar';
import {getOrderInfoByNo,orderRefund} from "@/api/order.js"
import moment from "@/common/moment_zh_cn.js";
......@@ -128,15 +131,35 @@
orderNo:'',
orderInfo:{},
assetsPath: config.assetsPath,
hostUrl:config.hostUrl
hostUrl:config.hostUrl,
orderStatusEnum:{},
roomTypeEnum:{}
};
},
onLoad(option) {
this.orderNo = option.orderNo;
this.onGetDicts()
this.onLoading();
this.onMessagePush()
},
methods:{
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
})
}
},
onLoading(){
getOrderInfoByNo(this.orderNo).then(res=>{
this.orderInfo = {
......
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