|
@@ -102,10 +102,10 @@
|
|
|
|
|
|
</view>
|
|
</view>
|
|
<view class="address">
|
|
<view class="address">
|
|
- <view style="height:1232rpx;">
|
|
|
|
- <hch-position ref="map" :markers="hotelList" @moveToMarkId="moveToMarkId"/>
|
|
|
|
|
|
+ <view style="height:1300rpx;">
|
|
|
|
+ <hch-position ref="map" :markers="hotelList" :geo="geo" @moveToMarkId="moveToMarkId"/>
|
|
</view>
|
|
</view>
|
|
- <view class="address-nav" style="overflow-x: visible; height:159px;">
|
|
|
|
|
|
+ <view class="address-nav" style="overflow-x: visible; height:318rpx;">
|
|
<!-- 遮挡地图修正
|
|
<!-- 遮挡地图修正
|
|
<view class="address-nav-btn">
|
|
<view class="address-nav-btn">
|
|
<view class="" @click="goLocation">
|
|
<view class="" @click="goLocation">
|
|
@@ -120,47 +120,10 @@
|
|
style="width: 100%; overflow-x: scroll; display: none;align-items: center;justify-content: space-between;">
|
|
style="width: 100%; overflow-x: scroll; display: none;align-items: center;justify-content: space-between;">
|
|
</view>
|
|
</view>
|
|
<!-- @scroll="bottomScroll" -->
|
|
<!-- @scroll="bottomScroll" -->
|
|
- <scroll-view style="width: calc(100% + 16px);height:159px;white-space: nowrap;margin-left: -8px;z-index:10"
|
|
|
|
- @scrolltolower="scrollTolower(hotelList.length-1)"
|
|
|
|
- @scrolltoupper="scrollTolower(0)"
|
|
|
|
- @scroll="bottomScroll"
|
|
|
|
- :scroll-x="true"
|
|
|
|
- :scroll-left="scrolls.scrollX"
|
|
|
|
- :scroll-with-animation="true"
|
|
|
|
- :show-scrollbar="false"
|
|
|
|
- >
|
|
|
|
- <view style="width: 8px;display: inline-block;"></view>
|
|
|
|
- <view class="address-detail" v-for="(item,index) in hotelList" :key="index">
|
|
|
|
- <view class="mark" style="overflow: hidden;">
|
|
|
|
- <image :src="item.bg_img" mode="aspectFill"></image>
|
|
|
|
- </view>
|
|
|
|
- <view class="inner">
|
|
|
|
- <view class="address-detail-main">
|
|
|
|
- <view class="address-detail-main-left">
|
|
|
|
- <text class="title">{{item.name}}</text>
|
|
|
|
- <view class="content" :style="{opacity: item.label?1:0}">
|
|
|
|
- <template v-if="item.label">
|
|
|
|
- <text v-for="(v,k) in item.label.split(',')" :key="k">{{v}}</text>
|
|
|
|
- </template>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom" :style="{opacity: item.min_price?1:0}">
|
|
|
|
- <text class="bottom-left">¥</text>
|
|
|
|
- <text class="bottom-right">{{item.min_price}}起</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="address-detail-main-right" @click="goBook(index)">
|
|
|
|
- <text>预订</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="address-detail-position" v-if="item.distanceToMe">
|
|
|
|
- <image style="width: 18rpx;height: 22rpx;" src="/static/icon/address02.png" mode="">
|
|
|
|
- </image>
|
|
|
|
- <text style="margin-left:4rpx ;">{{item.distanceToMe}}km</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view style="width: 1px;display: inline-block;"></view>
|
|
|
|
- </scroll-view>
|
|
|
|
|
|
+ <view style="width: calc(100% + 32rpx);margin-left: -16rpx;z-index:10">
|
|
|
|
+ <scroll-hotel ref="scrollHotel" :hotelList="hotelList" @updateIndex="updateMapIndex"/>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
<view class="address-nav-button" @click="goLocation">
|
|
<view class="address-nav-button" @click="goLocation">
|
|
<image style="width: 84rpx;height: 84rpx;" src="/static/icon/location.png" mode=""></image>
|
|
<image style="width: 84rpx;height: 84rpx;" src="/static/icon/location.png" mode=""></image>
|
|
</view>
|
|
</view>
|
|
@@ -222,11 +185,13 @@
|
|
import TabBar from '../../components/TabBar/tabbar.vue'
|
|
import TabBar from '../../components/TabBar/tabbar.vue'
|
|
import HchPosition from '../../components/hch-position/hch-position.vue'
|
|
import HchPosition from '../../components/hch-position/hch-position.vue'
|
|
import MyNav from "@/components/my-nav/my-nav.vue"
|
|
import MyNav from "@/components/my-nav/my-nav.vue"
|
|
|
|
+ import scrollHotel from "./scrollHotel.vue"
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
TabBar,
|
|
TabBar,
|
|
HchPosition,
|
|
HchPosition,
|
|
- MyNav
|
|
|
|
|
|
+ MyNav,
|
|
|
|
+ scrollHotel
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -236,8 +201,12 @@
|
|
//门店在地图上的标记 以下字段必填
|
|
//门店在地图上的标记 以下字段必填
|
|
markers: [],
|
|
markers: [],
|
|
//经纬度
|
|
//经纬度
|
|
- latitude:'',
|
|
|
|
- longitude:'',
|
|
|
|
|
|
+ geo:{
|
|
|
|
+ latitude: 30.6034799,
|
|
|
|
+ longitude: 104.1132550,
|
|
|
|
+ },
|
|
|
|
+ latitude: 30.6034799,
|
|
|
|
+ longitude: 104.1132550,
|
|
//暂无数据
|
|
//暂无数据
|
|
status: 'noMore',
|
|
status: 'noMore',
|
|
contentText: {
|
|
contentText: {
|
|
@@ -305,6 +274,9 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ touchMove(e){
|
|
|
|
+ console.log(e)
|
|
|
|
+ },
|
|
syncSearchInput(e){
|
|
syncSearchInput(e){
|
|
this.search.text = e
|
|
this.search.text = e
|
|
},
|
|
},
|
|
@@ -361,10 +333,11 @@
|
|
let _this = this
|
|
let _this = this
|
|
uni.getLocation({
|
|
uni.getLocation({
|
|
type: "gcj02", //返回可以用于wx.openLocation的经纬度
|
|
type: "gcj02", //返回可以用于wx.openLocation的经纬度
|
|
- success: function(res) {
|
|
|
|
- _this.latitude = res.latitude
|
|
|
|
- _this.longitude = res.longitude
|
|
|
|
- _this.$refs.map.goLocation(res.latitude,res.longitude)
|
|
|
|
|
|
+ success: (res) => {
|
|
|
|
+ this.geo = Object.assign({
|
|
|
|
+ latitude: res.latitude + Math.random()/100000,
|
|
|
|
+ longitude: res.longitude
|
|
|
|
+ })
|
|
},
|
|
},
|
|
fail: function(res) {
|
|
fail: function(res) {
|
|
console.log(res)
|
|
console.log(res)
|
|
@@ -457,25 +430,10 @@
|
|
id:item.id,
|
|
id:item.id,
|
|
latitude: item.latitude,
|
|
latitude: item.latitude,
|
|
longitude: item.longitude,
|
|
longitude: item.longitude,
|
|
- width:'34rpx',
|
|
|
|
- height:'40rpx',
|
|
|
|
- iconPath:'../../static/icon/late02.png' ,
|
|
|
|
- active: {
|
|
|
|
- width: '90rpx',
|
|
|
|
- height: '100rpx',
|
|
|
|
- iconPath: item.logo,
|
|
|
|
- },
|
|
|
|
- noActive:{
|
|
|
|
- width:'34rpx',
|
|
|
|
- height:'40rpx',
|
|
|
|
- iconPath:'../../static/icon/late02.png' ,
|
|
|
|
- },
|
|
|
|
- callout1: {
|
|
|
|
- content:item.name,
|
|
|
|
- borderRadius: 10,
|
|
|
|
- padding: 10,
|
|
|
|
- display: "ALWAYS",
|
|
|
|
- },
|
|
|
|
|
|
+ iconPath: '../../static/icon/late02.png',
|
|
|
|
+ activeIconPath: item.logo,
|
|
|
|
+ width: '34rpx',
|
|
|
|
+ height: '40rpx',
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -492,7 +450,7 @@
|
|
}
|
|
}
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
if(!this.beginConfig.hotel_id){
|
|
if(!this.beginConfig.hotel_id){
|
|
- this.$refs.map.markertap({markerId: this.hotelList[0].id,index:0},true,this.search.isSearch)
|
|
|
|
|
|
+ this.$refs.map.markertap(0,true,this.search.isSearch)
|
|
this.beginConfig.hotel_id = 0
|
|
this.beginConfig.hotel_id = 0
|
|
this.search.isSearch = false
|
|
this.search.isSearch = false
|
|
}else{
|
|
}else{
|
|
@@ -545,11 +503,7 @@
|
|
},
|
|
},
|
|
//下面酒店位移
|
|
//下面酒店位移
|
|
moveToMarkId(index){
|
|
moveToMarkId(index){
|
|
- this.scrollData.spa = true;
|
|
|
|
- this.scrolls.scrollX = (256 * index) - (this.screenWidth-256)/2 + 'px';
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- this.scrollData.spa = false
|
|
|
|
- },500)
|
|
|
|
|
|
+ this.$refs.scrollHotel.setActiveIndex(index);
|
|
},
|
|
},
|
|
localToMark(markId,index){
|
|
localToMark(markId,index){
|
|
// this.moveToMarkId(markId)
|
|
// this.moveToMarkId(markId)
|
|
@@ -566,6 +520,9 @@
|
|
this.scrollData.spa = false;
|
|
this.scrollData.spa = false;
|
|
}, 300)
|
|
}, 300)
|
|
},
|
|
},
|
|
|
|
+ updateMapIndex(index){
|
|
|
|
+ this.$refs.map.markertap(index, false)
|
|
|
|
+ },
|
|
moveToTabX(e){
|
|
moveToTabX(e){
|
|
this.scrollData.spa = true;
|
|
this.scrollData.spa = true;
|
|
this.scrolls.scrollX = (256 * this.scrollData.activeIndex+1) - (this.screenWidth-256)/2 + 'px';
|
|
this.scrolls.scrollX = (256 * this.scrollData.activeIndex+1) - (this.screenWidth-256)/2 + 'px';
|