Commit ffa6729f by zhangzhen

细节优化

parent 46de911a
......@@ -48,20 +48,11 @@
<view class="title titleStyle">
<text class="text-title">房间预览</text>
</view>
<!-- list-item-box -->
<view v-for="(item,index) in storeInfo.roomVoList" :key="index" class="list-item-box"
@tap="onNavToOrder(item)">
<view class="itemRow listStyle">
<view class="relative part-top">
<image class="room-img" :src="item.images[0]" mode="aspectFill" @tap.stop="onPreview(item.images)"></image>
<!-- <view class="absolute part-top-content">
<view class="flex-between">
<view></view>
<image :src="assetsPath +'/nav_to_icon.png'" mode="widthFix"
@tap.stop="onNavToInfo(item)">
</image>
</view>
</view> -->
</view>
<view class="flex-col part-bottom">
<view class="flex-between room-title">
......@@ -69,8 +60,6 @@
<text>{{item.name}}{{item.roomType?'【'+roomTypeEnum[item.roomType]+'】':''}}</text>
</view>
<view class="price">
<!-- <text>查看包厢</text>
<text class="cuIcon-playfill text-gray text-lg"></text> -->
<view class="">
<view class='cu-tag radius' :class="item.status==0?'line-green':item.status==1?'line-orange':'line-blue'" >{{roomStatusEnum[item.status]}}</view>
</view>
......@@ -86,13 +75,10 @@
<view class="flex-row room-type">
<view class="flex-col">
<view v-for="(val,i) in item.packList" :key="i" v-if="i<2" class="item">
<!-- <view class="part-1">
<text></text>
</view> -->
<view class="part-2">
<text class="text-sm">{{val.duration}}小时套餐:</text>
<text class="text-red text-bold text-xl">{{val.price}}</text>
<!-- <text class="text-sm"> /元</text> -->
</view>
</view>
</view>
......@@ -100,35 +86,15 @@
</view>
<view class="flex-between confirm-box">
<view class="flex-priceBox">
<!-- <text style="color: #e70486;margin-left: -6rpx;"></text><text class="text-pink">{{ item.price }}</text><text class="text-sm">/小时</text> -->
</view>
<view class="flex-priceBox"></view>
<view class="confirm">
<button class="cu-btn">预定</button>
</view>
</view>
</view>
</view>
<!-- <view class="item-line"></view> -->
<!-- <view class="item-Go">
<view class="flex-row room-type">
<view class="flex-wrap">
<view v-for="(val,i) in item.packList" :key="i" class="item">
<view class="part-1">
<text></text>
</view>
<view class="part-2">
<text>{{val.duration}}小时套餐{{val.price}}</text>
</view>
</view>
</view>
<view class="">
</view>
</view>
</view> -->
</view>
<u-empty v-if="!storeInfo.roomVoList || !storeInfo.roomVoList.lenght " text="门店暂无可使用房间" textColor='#C1C1C1'></u-empty>
</view>
</view>
</scroll-view>
......@@ -247,7 +213,7 @@
this.storeInfo = {
...obj,
distance:obj.distance? Number(obj.distance.substr(0,8)).toFixed(2):0,
roomVoList: obj.roomVoList.length ? obj.roomVoList.map(item => {
roomVoList: obj.roomVoList && obj.roomVoList.length ? obj.roomVoList.map(item => {
return {
...item,
facilities: Array.isArray(item.facilities) ? item.facilities :item.facilities? item.facilities.split(",") : [],
......@@ -350,20 +316,18 @@
this.storeList = res.data.data;
let obj = {}
obj = res.data.data[0];
new Promise((resolve,reject)=>{
that.storeInfo = {
...obj,
distance:obj.distance? Number(obj.distance.substr(0,8)).toFixed(2):0,
roomVoList: obj.roomVoList.map(item => {
roomVoList:obj.roomVoList && obj.roomVoList.length? obj.roomVoList.map(item => {
return {
...item,
facilities: item.facilities ? item.facilities.split(",") : [],
images: item.images ? item.images
.split(",").map(val => this.hostUrl + val) : []
}
})
}):[]
}
resolve()
}).then(()=>{
......
......@@ -538,7 +538,8 @@
listSortDistance({
storeId: this.roomInfo.storeId,
roomId: this.roomInfo.id,
day: this.dateList[this.dateIndex].readDate
day: this.dateList[this.dateIndex].readDate,
orderType:this.orderType
}).then(res => {
uni.hideLoading()
......
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