Commit 4ed981d2 authored by zhengke's avatar zhengke

修改

parent 153c9228
<template>
<view>
<view class="hotel-list-item" v-for="(item,index) in HotelList" :key="index">
<view class="hotel-list-item" v-for="(item,index) in HotelList" :key="index" @click="goHotelDetail(item.HotelId)">
<view class="img-box">
<image :src="item.CoverImg" mode="aspectFill"></image>
</view>
......@@ -8,22 +8,22 @@
<view class="hotel-name">{{item.HotelName}}</view>
<view class="hotel-start">
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view class="rate" v-if="hotelType==0">
<u-rate active-color="#FEB969" inactive-color="#FFF" current="4" active-icon="star" inactive-icon="star" disabled></u-rate>
<view class="rate" v-if="item.Star>=1&&item.Star<=5">
<u-rate active-color="#FEB969" inactive-color="#FFF" :current="item.Star" active-icon="star" inactive-icon="star" disabled></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text>
</view>
<!-- <view class="other-rate" v-if="hotelType==1">
<text>温泉酒店</text>
<span class="line"></span>
</view>
<view class="other-rate" v-if="hotelType==2">
<text>精选民宿</text>
<span class="line"></span>
</view> -->
<view class="other-rate" v-if="item.Star==9">
<text>温泉酒店</text>
<span class="line"></span>
</view>
<view class="other-rate" v-if="item.Star==8">
<text>精选民宿</text>
<span class="line"></span>
</view>
</view>
<view class="localtion">{{item.Address}}</view>
<view>
<u-tag v-for="(subItem,subIndex) in item.TagList" style="margin-right:10rpx;" :text="subItem" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E"
<u-tag v-for="(subItem,subIndex) in item.TagList" :key="subIndex" style="margin-right:10rpx;" :text="subItem" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E"
size="mini"></u-tag>
</view>
<view class="price">
......@@ -52,6 +52,13 @@
created() {
console.log(this.HotelList, 'hotel');
},
methods:{
goHotelDetail(id){
uni.navigateTo({
url: "/pages/hotel/detail?id=" + id
});
}
}
}
</script>
......@@ -92,7 +99,7 @@
}
.hotel-list-item .hotel-info .hotel-start {
margin: 10rpx 0;
margin: 20rpx 0;
}
.hotel-list-item .hotel-info .hotel-start .rate {
......
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