Commit ffa6729f by zhangzhen

细节优化

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