| xqd
@@ -59,7 +59,7 @@
|
|
|
<view class="search-detail-btn-left">
|
|
|
<text>取消</text>
|
|
|
</view>
|
|
|
- <view class="search-detail-btn-right">
|
|
|
+ <view class="search-detail-btn-right" @click="toSearchList">
|
|
|
<text>确认</text>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -77,7 +77,7 @@
|
|
|
<view class="search-detail-btn-left">
|
|
|
<text>取消</text>
|
|
|
</view>
|
|
|
- <view class="search-detail-btn-right">
|
|
|
+ <view class="search-detail-btn-right" @click="toSearchList">
|
|
|
<text>确认</text>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -94,11 +94,10 @@
|
|
|
</view>
|
|
|
<view class="partner-main" v-if="isPartner">
|
|
|
<uni-data-checkbox multiple
|
|
|
- v-model="value"
|
|
|
+ v-model="search.coop"
|
|
|
:localdata="search.content.coop"
|
|
|
emptyText="无"
|
|
|
- :map="{text: 'name',value: 'name'}"
|
|
|
- @change="change"
|
|
|
+ :map="{text: 'name',value: 'id'}"
|
|
|
/>
|
|
|
</view>
|
|
|
|
| xqd
@@ -111,11 +110,10 @@
|
|
|
</view>
|
|
|
<view class="partner-main" v-if="isJoin">
|
|
|
<uni-data-checkbox multiple
|
|
|
- v-model="value"
|
|
|
+ v-model="search.league"
|
|
|
:localdata="search.content.league"
|
|
|
emptyText="无"
|
|
|
- :map="{text: 'name',value: 'name'}"
|
|
|
- @change="change"
|
|
|
+ :map="{text: 'name',value: 'id'}"
|
|
|
/>
|
|
|
</view>
|
|
|
|
| xqd
@@ -123,7 +121,7 @@
|
|
|
<view class="search-detail-btn-left">
|
|
|
<text>取消</text>
|
|
|
</view>
|
|
|
- <view class="search-detail-btn-right">
|
|
|
+ <view class="search-detail-btn-right" @click="toSearchList">
|
|
|
<text>确认</text>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -316,7 +314,7 @@
|
|
|
brand: "",
|
|
|
coop: [],
|
|
|
league: [],
|
|
|
- isActiveIds:[3,26],
|
|
|
+ isActiveIds:[],
|
|
|
content: {
|
|
|
area: [],
|
|
|
brand: [],
|
| xqd
@@ -347,7 +345,6 @@
|
|
|
},
|
|
|
onLoad() {
|
|
|
//获取经纬度
|
|
|
- this.updated()
|
|
|
this.getHotelCategory()
|
|
|
uni.getSystemInfo({
|
|
|
success:(res)=>{
|
| xqd
@@ -363,7 +360,13 @@
|
|
|
this.search.content.area = res.data[0]?.sub;
|
|
|
this.search.content.brand = res.data[1]?.sub;
|
|
|
this.search.content.coop = res.data[2]?.sub;
|
|
|
+ this.search.content.league = res.data[3]?.sub;
|
|
|
+
|
|
|
+ this.updated()
|
|
|
})
|
|
|
+ },
|
|
|
+ getArround(){
|
|
|
+
|
|
|
},
|
|
|
goLocation(){
|
|
|
let _this = this
|
| xqd
@@ -390,6 +393,7 @@
|
|
|
_this.latitude = res.latitude
|
|
|
_this.longitude = res.longitude
|
|
|
_this.$refs.map.goLocation(res.latitude,res.longitude)
|
|
|
+ _this.toSearchList(_this.latitude,_this.longitude)
|
|
|
//获取酒店列表
|
|
|
_this.getList()
|
|
|
},
|
| xqd
@@ -409,9 +413,19 @@
|
|
|
return s // 单位千米
|
|
|
},
|
|
|
//-------------------------------------
|
|
|
- getList() {
|
|
|
+ //菜单index切换
|
|
|
+ checked(id,categoreName) {
|
|
|
+ this.search[categoreName] = id;
|
|
|
+ },
|
|
|
+ toSearchList(latitude, longitude){
|
|
|
+ this.search.isActiveIds = [this.search.area,this.search.brand,...this.search.coop,...this.search.league]
|
|
|
+ this.getList({latitude: latitude, longitude: longitude});
|
|
|
+ },
|
|
|
+ getList(param={}) {
|
|
|
this.$api.hotel.getHotelList({
|
|
|
- page: 1
|
|
|
+ page: 1,
|
|
|
+ // 'category_ids[0]':this.search.isActiveIds,
|
|
|
+ ...param
|
|
|
}).then(res => {
|
|
|
this.hotelList = res.data.data.map(item=>{
|
|
|
return {
|
| xqd
@@ -488,13 +502,7 @@
|
|
|
//合作伙伴刷选
|
|
|
change(e) {
|
|
|
},
|
|
|
- //菜单index切换
|
|
|
- checked(id,categoreName) {
|
|
|
- const tempSet = new Set(this.search.isActiveIds);
|
|
|
- tempSet.add(id);
|
|
|
- this.search[categoreName] = id;
|
|
|
- this.search.isActiveIds = Object.assign(Array.from(tempSet));
|
|
|
- },
|
|
|
+
|
|
|
//展开地区选择
|
|
|
openArea() {
|
|
|
this.isSelectArea = !this.isSelectArea
|
| xqd
@@ -544,7 +552,7 @@
|
|
|
this.scrollData.spa = false;
|
|
|
}, 10)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|