Commit 04bd4889 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

parents baf7f746 5c894c67
......@@ -2,12 +2,7 @@
<view class="hotel-list">
<view class="search-box">
<view class="hotel-city" @click="showCity">
<u-icon
name="location"
:size="24"
color="#000000"
style="margin-right: 8rpx"
></u-icon>
<u-icon name="location" :size="24" color="#000000" style="margin-right: 8rpx"></u-icon>
{{ city }}
</view>
......@@ -17,50 +12,36 @@
</view>
<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="research()"
:show-action="false"
></u-search>
<u-search placeholder="关键字/位置/品牌/酒店名" v-model="searchObj.Name" input-align="left"
:value="searchObj.Name" text-color="#111" bg-color="rgba(0,0,0,0)" @change="research()"
:show-action="false"></u-search>
</view>
</view>
<u-popup
v-model="showCityList"
mode="bottom"
:border-radius="40"
:safe-area-inset-bottom="true"
>
<u-popup v-model="showCityList" mode="bottom" :border-radius="40" :safe-area-inset-bottom="true">
<Address @confirm="confirmCity" :list="cityList" />
</u-popup>
<view>
<u-dropdown
ref="uDropdown"
@open="open"
@close="close"
active-color="#000"
inactive-color="#444"
>
<u-dropdown-item
v-model="searchObj.OrderByType"
:title="optionsTitle[0]"
:options="options1"
@change="change"
>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<u-dropdown-item v-model="searchObj.OrderByType" :title="optionsTitle[0]" :options="options1"
@change="change">
</u-dropdown-item>
<u-dropdown-item
v-model="searchObj.District"
:title="optionsTitle[1]"
:options="DistrictOptions"
@change="changeDistrict"
>
<u-dropdown-item v-model="searchObj.District" :title="optionsTitle[1]" :options="DistrictOptions"
@change="changeDistrict">
<!-- <view class="slot-content" style="background-color: #FFFFFF;">
<scroll-view scroll-y="true" style="height: 200rpx;">
<view v-for="(item.in)" class="u-text-center u-content-color u-m-t-20 u-m-b-20">无言独上西楼</view>
<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">月如钩</view>
<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">寂寞梧桐深院锁清秋</view>
<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">剪不断</view>
<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">理还乱</view>
<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">是离愁</view>
<view class="u-text-center u-content-color u-m-t-20 u-m-b-20">别是一般滋味在心头</view>
</scroll-view>
</view> -->
</u-dropdown-item>
<!-- <u-dropdown-item v-model="searchObj.enclosure" :title="optionsTitle[1]" :options="options2" @change="change2"></u-dropdown-item> -->
<u-dropdown-item :title="optionsTitle[2]">
<!-- <u-dropdown-item :title="optionsTitle[2]">
<view
class="slot-content"
style="padding: 30rpx; background-color: #fff"
......@@ -147,19 +128,13 @@
</view>
</view>
</view>
</u-dropdown-item>
</u-dropdown-item> -->
</u-dropdown>
</view>
<u-popup
v-model="showTimePopup"
mode="bottom"
border-radius="20"
length="95%"
:safe-area-inset-bottom="true"
>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="95%" :safe-area-inset-bottom="true">
<canlendar @finish="chosenDateResult"></canlendar>
</u-popup>
<view class="morewhere">
<!-- <view class="morewhere">
<view
v-for="(x, i) in searchObj.TagList"
class="item"
......@@ -167,50 +142,28 @@
:class="{ active: x.IsCheck == 1 }"
>{{ x.Name }}</view
>
</view>
</view> -->
<view class="no-data" v-if="HotelList.length === 0">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
mode="aspectFit"
class="no-data-img"
></image>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
mode="aspectFit" class="no-data-img"></image>
<view class="zhanwu"> 暂无数据 </view>
</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"
v-if="HotelList.length > 0"
>
<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 :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"
v-if="HotelList.length > 0">
<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>
<script>
import rangeSlider from "./components/range-slider.vue";
import canlendar from "./components/time/index";
import hotelGood from "./components/hotel-good.vue";
import Address from "./components/address/smh-address-indexed.vue";
export default {
import rangeSlider from "./components/range-slider.vue";
import canlendar from "./components/time/index";
import hotelGood from "./components/hotel-good.vue";
import Address from "./components/address/smh-address-indexed.vue";
export default {
data() {
return {
city: "成都",
......@@ -243,8 +196,7 @@ export default {
optionsTitle: ["推荐排序", "区域", "价格/星级", "筛选"],
rates: [],
options1: [], //推荐排序数据
options2: [
{
options2: [{
label: "不限",
value: -1,
},
......@@ -309,7 +261,10 @@ export default {
status: "loadmore",
page_count: 0,
dayObj: {},
DistrictOptions: [{ label: "不限", value: 0 }],
DistrictOptions: [{
label: "不限",
value: 0
}],
};
},
components: {
......@@ -370,12 +325,12 @@ export default {
this.optionsTitle[1] = "区域";
this.getList();
},
scroll: function (e) {
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop;
},
goTop: function (e) {
goTop: function(e) {
this.scrollTop = this.old.scrollTop;
this.$nextTick(function () {
this.$nextTick(function() {
this.scrollTop = 0;
});
},
......@@ -518,8 +473,7 @@ export default {
},
//获取查询条件
getSearchCondition() {
this.request2(
{
this.request2({
url: "/api/Hotel/GetHotelQuery",
data: {},
},
......@@ -554,8 +508,7 @@ export default {
if (type == 1) {
this.HotelList = [];
}
this.request2(
{
this.request2({
url: "/api/Hotel/AppGetHotelPage",
data: this.searchObj,
},
......@@ -572,10 +525,11 @@ export default {
);
},
getCity() {
this.request2(
{
this.request2({
url: "/api/Hotel/GetHotelDestination",
data: { ID: 0 },
data: {
ID: 0
},
},
(res) => {
if (res.resultCode == 1) {
......@@ -603,14 +557,18 @@ export default {
);
},
getDistrict(id) {
this.request2(
{
this.request2({
url: "/api/Hotel/GetHotelDestination",
data: { ID: id },
data: {
ID: id
},
},
(res) => {
if (res.resultCode == 1) {
this.DistrictOptions = [{ label: "不限", value: 0 }];
this.DistrictOptions = [{
label: "不限",
value: 0
}];
res.data.map((i) => {
let obj = {
label: i.Name,
......@@ -632,17 +590,22 @@ export default {
this.optionsTitle[1] = res[0].label;
},
},
};
};
</script>
<style lang="scss" scoped>
/deep/.u-flex {
/deep/.u-dropdown-item scroll-view{
height: 100vh !important;
}
/deep/.u-flex {
justify-content: center;
}
.hotel-list {
}
.hotel-list {
height: 100vh;
}
.hotel-list .hotel-city {
}
.hotel-list .hotel-city {
width: 105rpx;
height: 40rpx;
padding: 0rpx 10rpx 8rpx 0rpx;
......@@ -656,9 +619,9 @@ export default {
text-overflow: ellipsis;
display: flex;
align-items: center;
}
}
.hotel-list .search-box {
.hotel-list .search-box {
height: 88rpx;
background: #ecf1f4;
border-radius: 44rpx;
......@@ -666,9 +629,9 @@ export default {
align-items: center;
padding: 19rpx 30rpx;
margin: 0 30rpx;
}
}
.hotel-list .search-box .date {
.hotel-list .search-box .date {
width: 82rpx;
height: 50rpx;
font-size: 22rpx;
......@@ -676,22 +639,22 @@ export default {
color: #111111;
line-height: 29rpx;
margin-top: -6px;
}
}
.hotel-list .search-box .days {
.hotel-list .search-box .days {
height: 40rpx;
padding: 8rpx 20rpx 8rpx 10rpx;
color: #dfbe6e;
border-right: 1px solid #e2e2e2;
font-size: 24rpx;
}
}
.hotel-rate-box {
.hotel-rate-box {
display: flex;
align-items: center;
}
}
.hotel-rate {
.hotel-rate {
width: 160rpx;
height: 60rpx;
background: #ecf1f4;
......@@ -701,26 +664,26 @@ export default {
line-height: 60rpx;
margin-right: 15rpx;
text-align: center;
}
}
.hotel-rate:last-child {
.hotel-rate:last-child {
margin-right: 0;
}
}
.hotel-rate.active {
.hotel-rate.active {
background: #111111;
color: #ffffff;
}
}
.hotel-list .morewhere {
.hotel-list .morewhere {
padding: 10rpx 30rpx;
display: flex;
align-items: center;
overflow-x: auto;
flex-wrap: nowrap;
}
}
.hotel-list .morewhere .item {
.hotel-list .morewhere .item {
padding: 0 20rpx;
height: 36rpx;
line-height: 36rpx;
......@@ -731,18 +694,18 @@ export default {
color: #999999;
font-weight: 400;
flex-shrink: 0;
}
}
.hotel-list .morewhere .item.active {
.hotel-list .morewhere .item.active {
background: #111111;
color: #ffffff;
}
}
.hotel-list .morewhere .item:last-child {
.hotel-list .morewhere .item:last-child {
margin-right: 0;
}
}
.no-data {
.no-data {
.no-data-img {
width: 180rpx;
height: 240rpx;
......@@ -758,5 +721,5 @@ export default {
color: #999999;
margin-top: 20rpx;
}
}
}
</style>
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