|
@@ -4,12 +4,12 @@
|
|
|
<div class="tabtit">酒店预约</div>
|
|
<div class="tabtit">酒店预约</div>
|
|
|
<div class="formbar">
|
|
<div class="formbar">
|
|
|
<div class="li flex_r flex_jb flex_ac">
|
|
<div class="li flex_r flex_jb flex_ac">
|
|
|
- <div class="flex_r flex_ac">
|
|
|
|
|
|
|
+ <div class="flex_r flex_jb flex_ac">
|
|
|
<div class="address" @click="showAddress = !showAddress">
|
|
<div class="address" @click="showAddress = !showAddress">
|
|
|
<span class="address_name">{{qda.cityName}}</span>
|
|
<span class="address_name">{{qda.cityName}}</span>
|
|
|
<span class="iconfont ico"></span>
|
|
<span class="iconfont ico"></span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="addressStr ellipsis">{{ addrStr }}</div>
|
|
|
|
|
|
|
+ <div class="addressStr">{{ addrStr }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div @click="locationf" class="location">
|
|
<div @click="locationf" class="location">
|
|
|
<span class="iconfont ico2"></span>
|
|
<span class="iconfont ico2"></span>
|
|
@@ -31,7 +31,8 @@
|
|
|
<input type="text" v-model="qda.queryText" placeholder="关键字/位置/品牌/酒店名称">
|
|
<input type="text" v-model="qda.queryText" placeholder="关键字/位置/品牌/酒店名称">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="li" @click="popupShow = true">
|
|
<div class="li" @click="popupShow = true">
|
|
|
- <input type="text" placeholder="价格/星级">
|
|
|
|
|
|
|
+ <span v-if="priceRange.length || Leve">{{numinfo}} {{LeveStr}}</span>
|
|
|
|
|
+ <input type="text" placeholder="价格/星级" v-else>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -71,7 +72,7 @@
|
|
|
import DatePicker from "@/pagesB/components/date-picker/date-picker.vue";
|
|
import DatePicker from "@/pagesB/components/date-picker/date-picker.vue";
|
|
|
import HAddress from "@/pagesB/components/h-address/address.vue";
|
|
import HAddress from "@/pagesB/components/h-address/address.vue";
|
|
|
import nniSlider from "@/pagesB/components/nni-slider/slider.vue";
|
|
import nniSlider from "@/pagesB/components/nni-slider/slider.vue";
|
|
|
-import QQMapWX from '@/utils/qqmap-wx-jssdk.min.js';
|
|
|
|
|
|
|
+import QQMapWX from '@/pagesB/static/js/qqmap-wx-jssdk.min.js';
|
|
|
const showmap = new QQMapWX({ key: 'K7LBZ-RE23Q-JEN5D-4ZNEI-MS54Q-BHF6D' });
|
|
const showmap = new QQMapWX({ key: 'K7LBZ-RE23Q-JEN5D-4ZNEI-MS54Q-BHF6D' });
|
|
|
import { post } from "@/request/api.js";
|
|
import { post } from "@/request/api.js";
|
|
|
import { setCache } from "@/utils/storage.js"
|
|
import { setCache } from "@/utils/storage.js"
|
|
@@ -114,6 +115,7 @@ export default {
|
|
|
{ p: [800, 1500], txt: "¥800-1500" },
|
|
{ p: [800, 1500], txt: "¥800-1500" },
|
|
|
{ p: [1500, 1500], txt: "¥1500以上" },
|
|
{ p: [1500, 1500], txt: "¥1500以上" },
|
|
|
],
|
|
],
|
|
|
|
|
+ LeveStr: "",
|
|
|
Leve: undefined,
|
|
Leve: undefined,
|
|
|
Levels: [
|
|
Levels: [
|
|
|
{ v: 2, t: "二星/经济" },
|
|
{ v: 2, t: "二星/经济" },
|
|
@@ -135,8 +137,11 @@ export default {
|
|
|
selectaddress(da) {
|
|
selectaddress(da) {
|
|
|
this.qda.cityName = da.cityName;
|
|
this.qda.cityName = da.cityName;
|
|
|
this.qda.cityCode = da.cityCode;
|
|
this.qda.cityCode = da.cityCode;
|
|
|
- this.addrStr = ""
|
|
|
|
|
- this.showAddress = false
|
|
|
|
|
|
|
+ this.qda.queryText = da.queryText || undefined;
|
|
|
|
|
+ this.addrStr = "";
|
|
|
|
|
+ delete this.qda.longitude;
|
|
|
|
|
+ delete this.qda.latitude;
|
|
|
|
|
+ this.showAddress = false;
|
|
|
},
|
|
},
|
|
|
search() {
|
|
search() {
|
|
|
let qd = Object.assign({}, this.qda)
|
|
let qd = Object.assign({}, this.qda)
|
|
@@ -149,6 +154,7 @@ export default {
|
|
|
this.adres = { longitude: lng, latitude: lat };
|
|
this.adres = { longitude: lng, latitude: lat };
|
|
|
this.getToCity()
|
|
this.getToCity()
|
|
|
},
|
|
},
|
|
|
|
|
+ // 获取当前城市
|
|
|
getToCity() {
|
|
getToCity() {
|
|
|
post("local/hotel/city", this.adres).then(res => {
|
|
post("local/hotel/city", this.adres).then(res => {
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
@@ -159,13 +165,13 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
locationf() {
|
|
locationf() {
|
|
|
|
|
+ delete this.qda.queryText;
|
|
|
this.getLocation();
|
|
this.getLocation();
|
|
|
- let that = this
|
|
|
|
|
|
|
+ let that = this;
|
|
|
showmap.reverseGeocoder({
|
|
showmap.reverseGeocoder({
|
|
|
success(result) {
|
|
success(result) {
|
|
|
let da = result.result
|
|
let da = result.result
|
|
|
- let { district, street, street_number } = da.address_component
|
|
|
|
|
- that.addrStr = district + street_number
|
|
|
|
|
|
|
+ that.addrStr = da.formatted_addresses.recommend;
|
|
|
let { lat, lng } = da.location
|
|
let { lat, lng } = da.location
|
|
|
that.qda = { ...that.qda, longitude: lng, latitude: lat }
|
|
that.qda = { ...that.qda, longitude: lng, latitude: lat }
|
|
|
}
|
|
}
|
|
@@ -217,11 +223,22 @@ export default {
|
|
|
handler(va) {
|
|
handler(va) {
|
|
|
this.numinfo = `¥${va[0]} - ${va[1]}`
|
|
this.numinfo = `¥${va[0]} - ${va[1]}`
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ Leve: {
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ handler(va) {
|
|
|
|
|
+ for (const i of this.Levels) {
|
|
|
|
|
+ if(i.v == va){
|
|
|
|
|
+ this.LeveStr = i.t
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
onLoad(da) {
|
|
onLoad(da) {
|
|
|
this.$refs.dayPicker.getInit();
|
|
this.$refs.dayPicker.getInit();
|
|
|
- this.getLocation();
|
|
|
|
|
|
|
+ this.locationf();
|
|
|
},
|
|
},
|
|
|
onShow() {},
|
|
onShow() {},
|
|
|
mounted() {},
|
|
mounted() {},
|
|
@@ -323,8 +340,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.addressStr {
|
|
.addressStr {
|
|
|
- width: 366rpx;
|
|
|
|
|
- margin-left: 16rpx;
|
|
|
|
|
|
|
+ width: 350rpx;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ margin-left: 10rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.location {
|
|
.location {
|