Commit 59e47805 authored by 罗超's avatar 罗超

1

parent b1f9feb6
...@@ -480,9 +480,9 @@ ...@@ -480,9 +480,9 @@
let title = this.setting.share_title ? let title = this.setting.share_title ?
this.setting.share_title : this.setting.share_title :
uni.getStorageSync("basedata").mall.name uni.getStorageSync("basedata").mall.name
if (SmallShopId != 0) { // if (SmallShopId != 0) {
title = this.shopData.Name // title = this.shopData.Name
} // }
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
return { return {
title: title, title: title,
...@@ -513,9 +513,9 @@ ...@@ -513,9 +513,9 @@
let title = this.setting.share_title ? let title = this.setting.share_title ?
this.setting.share_title : this.setting.share_title :
uni.getStorageSync("basedata").mall.name uni.getStorageSync("basedata").mall.name
if (SmallShopId != 0) { // if (SmallShopId != 0) {
title = this.shopData.Name // title = this.shopData.Name
} // }
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
return { return {
title: title, title: title,
......
<template> <template>
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view class="city-box" @click="showCity">
{{city}}
</view>
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="美食名称" v-model="msg.Name" input-align="left" text-color="#111" <u-search placeholder="美食名称" v-model="msg.Name" input-align="left" text-color="#111"
bg-color="rgba(0,0,0,0)" :show-action="false" clearabled @search="searchList" @clear="searchList"> bg-color="rgba(0,0,0,0)" :show-action="false" clearabled @search="searchList" @clear="searchList">
</u-search> </u-search>
</view> </view>
</view> </view>
<u-popup v-model="showCityList" mode="bottom" :border-radius="40" :safe-area-inset-bottom="true" >
<Address @confirm="confirmCity" :list="cityList"/>
</u-popup>
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1"
...@@ -19,7 +25,10 @@ ...@@ -19,7 +25,10 @@
</restaurant-type> </restaurant-type>
</view> </view>
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item :title="optionsTitle[2]"> <u-dropdown-item v-model="msg.District" :title="optionsTitle[2]" :options="DistrictOptions"
@change="changeDistrict">
</u-dropdown-item>
<u-dropdown-item :title="optionsTitle[3]">
<view class="slot-content" style="padding: 30rpx;background-color: #FFF;"> <view class="slot-content" style="padding: 30rpx;background-color: #FFF;">
<!-- <view> <!-- <view>
<text style="font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;">餐厅类型</text> <text style="font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;">餐厅类型</text>
...@@ -71,9 +80,11 @@ ...@@ -71,9 +80,11 @@
import rangeSlider from "./components/range-slider.vue" import rangeSlider from "./components/range-slider.vue"
import restaurantGood from './components/restaurant-good.vue'; import restaurantGood from './components/restaurant-good.vue';
import restaurantType from './components/restaurant-type.vue'; import restaurantType from './components/restaurant-type.vue';
import Address from './components/address/smh-address-indexed.vue'
export default { export default {
data() { data() {
return { return {
city:"成都",
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
...@@ -81,6 +92,9 @@ ...@@ -81,6 +92,9 @@
OrderBy: 0, OrderBy: 0,
FoodTypeIds: 0, FoodTypeIds: 0,
DiningPriceType: 0, DiningPriceType: 0,
City:262,
District:0,
}, },
page_count: 1, page_count: 1,
status: "loadmore", status: "loadmore",
...@@ -102,6 +116,7 @@ ...@@ -102,6 +116,7 @@
optionsTitle: [ optionsTitle: [
"推荐排序", "推荐排序",
"分类", "分类",
"区域",
"筛选", "筛选",
], ],
rates: [], //价格列表 rates: [], //价格列表
...@@ -176,15 +191,18 @@ ...@@ -176,15 +191,18 @@
active: 0 active: 0
}, },
foodType: [], foodType: [],
showCityList:false,
cityList:[],
DistrictOptions:[{label:"不限",value:0}],
} }
}, },
components: { components: {
rangeSlider, rangeSlider,
restaurantGood, restaurantGood,
restaurantType restaurantType,
Address,
}, },
onLoad(options) { onLoad(options) {
console.log(options)
if(options && options.Name){ if(options && options.Name){
this.msg.Name = options.Name this.msg.Name = options.Name
} }
...@@ -206,6 +224,8 @@ ...@@ -206,6 +224,8 @@
this.getFoodType(); this.getFoodType();
this.getPriceEnum(); this.getPriceEnum();
this.getFoodList(); this.getFoodList();
this.getCity();
this.getDistrict(262);
}, },
created() { created() {
...@@ -243,7 +263,7 @@ ...@@ -243,7 +263,7 @@
}, },
setRestaurantPrice(rateId,name) { setRestaurantPrice(rateId,name) {
this.msg.DiningPriceType = rateId this.msg.DiningPriceType = rateId
this.optionsTitle[2]=name this.optionsTitle[3]=name
// if(rateId==-1){ // if(rateId==-1){
// this.tempRateAndPrice.rate=[-1] // this.tempRateAndPrice.rate=[-1]
// }else{ // }else{
...@@ -274,7 +294,7 @@ ...@@ -274,7 +294,7 @@
// } // }
// }, // },
resetPrice() { resetPrice() {
this.optionsTitle[2]="筛选" this.optionsTitle[3]="筛选"
// this.searchObj.rateAndPrice={ // this.searchObj.rateAndPrice={
// types:[-1], // types:[-1],
// priceText:"不限", // priceText:"不限",
...@@ -416,52 +436,105 @@ ...@@ -416,52 +436,105 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/restaurant/detail?id=" + id url: "/pages/restaurant/detail?id=" + id
}) })
},
showCity(){
this.showCityList=true
},
confirmCity(val){
this.showCityList=false
this.msg.City=val.ID
this.city=val.Name
this.getDistrict(val.ID)
this.msg.District=0
this.getFoodList();
},
getCity(){
this.request2({
url: '/api/Hotel/GetHotelDestination',
data: {ID:0}
},
res => {
if (res.resultCode == 1) {
this.cityList=[]
res.data.map(i=>{
let initial=i.PinYin.slice(0,1)
let find =this.cityList.filter((e)=>{
return e.letter==initial
})
if(find.length>0){
find[0].citylist.push(i)
}else{
let obj={
letter:initial,
citylist:[i],
}
this.cityList.push(obj)
}
})
}
},
err => {
}
);
},
getDistrict(id){
this.request2({
url: '/api/Hotel/GetHotelDestination',
data: {ID:id}
},
res => {
if (res.resultCode == 1) {
this.DistrictOptions=[{label:"不限",value:0}]
res.data.map(i=>{
let obj={
label:i.Name,
value:i.ID
}
this.DistrictOptions.push(obj)
})
}
},
err => {
}
);
},
changeDistrict(val){
this.getFoodList();
let res= this.DistrictOptions.filter(i=>{return i.value==val})
this.optionsTitle[2]=res[0].label
} }
}, },
} }
</script> </script>
<style scoped> <style scoped>
/deep/.u-flex { .city-box {
justify-content: center; width: 90rpx;
}
.hotel-list {
height: 100vh;
}
.hotel-list .search-box {
height: 88rpx;
background: #ECF1F4;
border-radius: 44rpx;
display: flex;
align-items: center;
padding: 19rpx 30rpx;
margin: 0 30rpx;
}
.hotel-list .search-box .date {
width: 104rpx;
height: 50rpx;
font-size: 22rpx;
font-weight: 500;
color: #111111;
line-height: 29rpx;
}
.hotel-list .search-box .days {
height: 40rpx; height: 40rpx;
padding: 8rpx 30rpx 8rpx 19rpx; line-height: 30rpx;
color: #DFBE6E; padding: 8rpx 10rpx 8rpx 0rpx;
margin-right: 20rpx;
text-align: center;
/* color: #DFBE6E; */
border-right: 1px solid #E2E2E2; border-right: 1px solid #E2E2E2;
font-size: 24rpx; font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
/deep/.u-flex {
justify-content: center;
}
.hotel-rate-box { .hotel-rate-box {
display: flex; display: flex;
align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center;
} }
.hotel-rate { .hotel-rate {
...@@ -474,7 +547,6 @@ ...@@ -474,7 +547,6 @@
line-height: 60rpx; line-height: 60rpx;
margin-right: 15rpx; margin-right: 15rpx;
text-align: center; text-align: center;
flex-shrink: 0;
margin-top: 29rpx; margin-top: 29rpx;
} }
...@@ -486,4 +558,19 @@ ...@@ -486,4 +558,19 @@
background: #111111; background: #111111;
color: #FFFFFF; color: #FFFFFF;
} }
.hotel-list {
height: 100vh;
}
.hotel-list .search-box {
height: 88rpx;
background: #ECF1F4;
border-radius: 44rpx;
display: flex;
align-items: center;
padding: 19rpx 30rpx;
margin: 0 30rpx;
}
</style> </style>
<template> <template>
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view class="city-box" @click="showCity">
{{city}}
</view>
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="景点" v-model="msg.Name" input-align="left" :value="searchObj.searchKey" <u-search placeholder="景点" v-model="msg.Name" input-align="left" :value="searchObj.searchKey"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search> text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search>
</view> </view>
</view> </view>
<u-popup v-model="showCityList" mode="bottom" :border-radius="40" :safe-area-inset-bottom="true" >
<Address @confirm="confirmCity" :list="cityList"/>
</u-popup>
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<!-- 推荐排序 --> <!-- 推荐排序 -->
...@@ -17,8 +23,11 @@ ...@@ -17,8 +23,11 @@
<!-- <Cascade :dataList="typeList"></Cascade> --> <!-- <Cascade :dataList="typeList"></Cascade> -->
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item v-model="msg.District" :title="optionsTitle[2]" :options="DistrictOptions"
@change="changeDistrict">
</u-dropdown-item>
<!-- 筛选 --> <!-- 筛选 -->
<u-dropdown-item :title="optionsTitle[2]" > <u-dropdown-item :title="optionsTitle[3]" >
<view class="slot-content"> <view class="slot-content">
<!-- <view class="u-text-center u-content-color">其他自定义内容</view>--> <!-- <view class="u-text-center u-content-color">其他自定义内容</view>-->
<view class="hotel-rate" :class="{'hotel-rate-active':msg.IsFree!=-1}" @click="changeScreen('IsFree')">是否免费</view> <view class="hotel-rate" :class="{'hotel-rate-active':msg.IsFree!=-1}" @click="changeScreen('IsFree')">是否免费</view>
...@@ -100,10 +109,14 @@ ...@@ -100,10 +109,14 @@
</template> </template>
<script> <script>
import Address from './components/address/smh-address-indexed.vue'
export default { export default {
components:{
Address
},
data() { data() {
return { return {
city:"成都",
dataList:[],//列表数据 dataList:[],//列表数据
typeList:[],//景点类型列表 typeList:[],//景点类型列表
msg:{ msg:{
...@@ -115,6 +128,8 @@ ...@@ -115,6 +128,8 @@
IsSameDayBuy:-1, IsSameDayBuy:-1,
IsWorryFreeRefund:-1, IsWorryFreeRefund:-1,
OrderBy:1, OrderBy:1,
City:262,
District:0,
}, },
page_count:1, page_count:1,
loading: false, loading: false,
...@@ -128,6 +143,7 @@ ...@@ -128,6 +143,7 @@
optionsTitle: [ optionsTitle: [
"推荐排序", "推荐排序",
"景点类型", "景点类型",
"区域",
"筛选" "筛选"
], ],
orderOptions: [ orderOptions: [
...@@ -159,7 +175,10 @@ ...@@ -159,7 +175,10 @@
fontSize: '30rpx', fontSize: '30rpx',
width: '100%', width: '100%',
background:"#111" background:"#111"
} },
showCityList:false,
cityList:[],
DistrictOptions:[{label:"不限",value:0}],
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -169,6 +188,8 @@ ...@@ -169,6 +188,8 @@
this.getScenicType();// 获取景点类型 this.getScenicType();// 获取景点类型
this.getList();// 获取景点门票类型 this.getList();// 获取景点门票类型
this.getCity();
this.getDistrict(262);
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -299,12 +320,96 @@ ...@@ -299,12 +320,96 @@
this.getList(); this.getList();
let res= this.classOptions.filter(i=>{return i.value==val}) let res= this.classOptions.filter(i=>{return i.value==val})
this.optionsTitle[1]=res[0].label this.optionsTitle[1]=res[0].label
},
showCity(){
this.showCityList=true
},
confirmCity(val){
this.showCityList=false
this.msg.City=val.ID
this.city=val.Name
this.getDistrict(val.ID)
this.msg.District=0
this.getList();
},
getCity(){
this.request2({
url: '/api/Hotel/GetHotelDestination',
data: {ID:0}
},
res => {
if (res.resultCode == 1) {
this.cityList=[]
res.data.map(i=>{
let initial=i.PinYin.slice(0,1)
let find =this.cityList.filter((e)=>{
return e.letter==initial
})
if(find.length>0){
find[0].citylist.push(i)
}else{
let obj={
letter:initial,
citylist:[i],
}
this.cityList.push(obj)
}
})
}
},
err => {
}
);
},
getDistrict(id){
this.request2({
url: '/api/Hotel/GetHotelDestination',
data: {ID:id}
},
res => {
if (res.resultCode == 1) {
this.DistrictOptions=[{label:"不限",value:0}]
res.data.map(i=>{
let obj={
label:i.Name,
value:i.ID
}
this.DistrictOptions.push(obj)
})
}
},
err => {
}
);
},
changeDistrict(val){
this.getList();
let res= this.DistrictOptions.filter(i=>{return i.value==val})
this.optionsTitle[2]=res[0].label
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.city-box {
width: 90rpx;
height: 40rpx;
line-height: 30rpx;
padding: 8rpx 10rpx 8rpx 0rpx;
margin-right: 20rpx;
text-align: center;
/* color: #DFBE6E; */
border-right: 1px solid #E2E2E2;
font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.hotel-rate { .hotel-rate {
width: 215rpx; width: 215rpx;
height: 60rpx; height: 60rpx;
......
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