Commit e08217e3 authored by 黄奎's avatar 黄奎

页面修改

parent d530c1da
......@@ -9,8 +9,9 @@
<view class="hotel-start">
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<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.Star}}</text>
<u-rate active-color="#FEB969" inactive-color="#FFF" is-fill="true" :current="item.Star" active-icon="star"
inactive-icon="star" disabled :count="5"></u-rate>
<text style="margin-left: 20rpx;vertical-align: top;">{{item.StarName}}</text>
</view>
<view class="other-rate" v-if="item.Star==9">
<text>温泉酒店</text>
......@@ -23,8 +24,8 @@
</view>
<view class="localtion">{{item.Address}}</view>
<view>
<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>
<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">
<text></text>
......@@ -43,13 +44,13 @@
type: Array,
default: null
},
dayObj:{
dayObj: {
type: Object,
default: null
},
searchObj:{
type:Object,
default:null
searchObj: {
type: Object,
default: null
}
},
data() {
......@@ -60,11 +61,17 @@
created() {
console.log(this.HotelList, 'hotel');
},
methods:{
goHotelDetail(id){
methods: {
getStar(num) {
if (num) {
return num.toFixed(1);
}
return 0.0;
},
goHotelDetail(id) {
let myDayObj = JSON.stringify(this.dayObj);
uni.navigateTo({
url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj+'&searchObj='+JSON.stringify(this.searchObj)
url: "/pages/hotel/detail?id=" + id + '&dayObj=' + myDayObj + '&searchObj=' + JSON.stringify(this.searchObj)
});
}
}
......
......@@ -8,7 +8,7 @@
<view class="days">{{day}}</view>
<view style="width: 1px; flex: 1;">
<u-search placeholder="关键字/位置/品牌/酒店名" v-model="searchObj.Name" input-align="left" :value="searchObj.Name"
text-color="#111" bg-color="rgba(0,0,0,0)" @change="getList(1)" :show-action="false"></u-search>
text-color="#111" bg-color="rgba(0,0,0,0)" @change="research()" :show-action="false"></u-search>
</view>
</view>
<view>
......@@ -55,9 +55,9 @@
</view>
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
@scroll="scroll" style="height: calc(100% - 224rpx); padding-bottom: 0px;">
<hotel-good :HotelList="HotelList" :dayObj="dayObj" :searchObj="searchObj"></hotel-good>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F5F5F5" color="#111" />
<hotel-good :HotelList="HotelList" :dayObj="dayObj" :searchObj="searchObj"></hotel-good>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#F5F5F5" color="#111" />
</scroll-view>
</view>
</template>
......@@ -162,8 +162,8 @@
},
showLoading: false,
status: "loadmore",
page_count:0,
dayObj:{}
page_count: 0,
dayObj: {}
}
},
components: {
......@@ -207,6 +207,11 @@
this.scrollTop = 0;
});
},
research()
{
this.searchObj.pageIndex=1;
this.getList(1);
},
lower(e) {
// TODO: 滚动到了底部,实现翻页加载
if (this.searchObj.pageIndex < this.page_count) {
......@@ -223,10 +228,9 @@
} else {
obj.IsCheck = 0;
}
this.getList(1);
this.research()
},
chosenDateResult(obj) {
console.log(obj,'obj');
this.searchObj.QStartDate = obj.start;
this.searchObj.QEndDate = obj.end;
this.startDay = obj.startDay;
......@@ -234,7 +238,7 @@
this.day = obj.day;
this.dayObj.startWeek = obj.startWeek;
this.dayObj.endWeek = obj.endWeek;
this.getList(1);
this.research()
this.showTimePopup = false
},
chosenDate() {
......@@ -266,7 +270,7 @@
this.closeDropdown();
this.searchObj.StartPrice = 0;
this.searchObj.EndPrice = 1000;
this.getList(1);
this.research()
},
surePrice() {
let result = ""
......@@ -284,7 +288,7 @@
this.optionsTitle[2] = result
this.$forceUpdate()
this.closeDropdown();
this.getList(1);
this.research()
},
rangechange4(e) {
this.searchObj.StartPrice = e.minValue;
......@@ -326,7 +330,7 @@
}
})
this.optionsTitle[0] = temp.label
this.getList(1);
this.research()
},
change2(index) {
if (index != -1) {
......@@ -381,9 +385,8 @@
this.dayObj.StartDate = this.searchObj.QStartDate;
this.dayObj.EndDate = this.searchObj.QEndDate;
this.dayObj.day = this.day;
if(type==1){
this.HotelList=[];
if (type == 1) {
this.HotelList = [];
}
this.request2({
url: '/api/Hotel/AppGetHotelPage',
......
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