|
|
|
@ -2,105 +2,106 @@ |
|
|
|
|
<view class="map-container"> |
|
|
|
|
<map style="width: 100%; height: 10vh;" :style="{height:mapheight}" :latitude="latitude" :longitude="longitude" |
|
|
|
|
:markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap'> |
|
|
|
|
<!-- <cover-view class="cover-view-loca" :style='{bottom:coverbottom}' @click="onControltap"> |
|
|
|
|
<cover-image class="cover-image" @click="play" src="../../../static/img/adresw.png"></cover-image> |
|
|
|
|
<cover-view> |
|
|
|
|
定位 |
|
|
|
|
<cover-view class="cover-view-loca" :style='{bottom:coverbottom}' @click="onControltap"> |
|
|
|
|
<cover-image class="cover-image" src="../../../static/img/dispos.png"></cover-image> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> --> |
|
|
|
|
<!-- 一级分类 --> |
|
|
|
|
<view class="width100 cover-views mart15"> |
|
|
|
|
<cover-view class="width100 cover-views mart15"> |
|
|
|
|
<scroll-view class="width90 cover-view-cont" scroll-x="true"> |
|
|
|
|
<view class="cover-view-head font14" :class="[typeid == item.id ? 'onclick' : '']" |
|
|
|
|
<cover-view class="cover-view-head font14" :class="[typeid == item.id ? 'onclick' : '']" |
|
|
|
|
v-for="(item,index) in goodsFirstClassList" :key="index" @click="changeType(item)">{{item.name}} |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
</scroll-view> |
|
|
|
|
<!-- 二级分类 --> |
|
|
|
|
<view class="width100 mart15 backcorfff cover-viewchage alijus fotct" style="border-radius: 22px;"> |
|
|
|
|
<cover-view class="width100 mart15 backcorfff cover-viewchage alijus fotct" |
|
|
|
|
style="border-radius: 22px;"> |
|
|
|
|
<!-- :class="[selectFirst == 1? 'onchange' : '']" --> |
|
|
|
|
<view class="font14 width30w onchange text1" @click="changeChilerType()">{{selectFirstName}} |
|
|
|
|
<cover-view class="font14 width30w fotct onchange text1" |
|
|
|
|
@click="changeChilerType()">{{selectFirstName}} |
|
|
|
|
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="font14 width30w onchange" @click="changeChilerdistance()">{{distanceName}} |
|
|
|
|
</cover-view> |
|
|
|
|
<cover-view class="font14 width30w onchange" @click="changeChilerdistance()">{{distanceName}} |
|
|
|
|
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="font14 width30w"> |
|
|
|
|
</cover-view> |
|
|
|
|
<cover-view class="font14 width30w"> |
|
|
|
|
<!-- 全部 |
|
|
|
|
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
<!-- //模态框 --> |
|
|
|
|
<view class="change-cont" v-if="selectChiler == 1"> |
|
|
|
|
<view class="width100 backcorfff"></view> |
|
|
|
|
</view> |
|
|
|
|
<cover-view class="change-cont" v-if="selectChiler == 1 || selectChilerdistance == 1"> |
|
|
|
|
<cover-view class="width100 backcorfff"></cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
<!-- //显示内容 --> |
|
|
|
|
<view class="change-optiac paddbotm20" v-if="selectChiler == 1"> |
|
|
|
|
<cover-view class="change-optiac paddbotm20" v-if="selectChiler == 1"> |
|
|
|
|
<scroll-view scroll-y="true" class="width100 height260"> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart" |
|
|
|
|
<cover-view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart" |
|
|
|
|
v-for="(item,index) in goodsSendotClassList" :key="item.id" @click="changeFirstcont(item)"> |
|
|
|
|
<view class="width90w" :class="[selectFirst == item.id? 'onchange' : '']">{{item.name}}</view> |
|
|
|
|
<cover-view class="width90w font14" |
|
|
|
|
:class="[selectFirst == item.id? 'onchange' : '']">{{item.name}}</cover-view> |
|
|
|
|
<image class="icon20" src="../../../static/img/changed.png" mode="widthFix" |
|
|
|
|
v-if="selectFirst == item.id"></image> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
<!-- 二级距离 --> |
|
|
|
|
<view class="change-optiac paddbotm20" v-if="selectChilerdistance == 1"> |
|
|
|
|
<cover-view class="change-optiac paddbotm20" v-if="selectChilerdistance == 1"> |
|
|
|
|
<scroll-view scroll-y="true" class="width100 height260"> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart" |
|
|
|
|
<cover-view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart" |
|
|
|
|
v-for="(item,index) in distanceList" :key="index" @click="changeDistance(item)"> |
|
|
|
|
<view class="width90w" :class="[ distance== item.id? 'onchange' : '']">{{item.title}}</view> |
|
|
|
|
<cover-view class="width90w font14" |
|
|
|
|
:class="[ distance== item.id? 'onchange' : '']">{{item.title}}</cover-view> |
|
|
|
|
<image class="icon20" src="../../../static/img/changed.png" mode="widthFix" |
|
|
|
|
v-if="distance == item"></image> |
|
|
|
|
</view> |
|
|
|
|
v-if="distance == item.id"></image> |
|
|
|
|
</cover-view> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
|
|
|
|
|
<!-- 未打开筛选前 --> |
|
|
|
|
<view class="cover-view-foot" v-if="isSelected == 1"> |
|
|
|
|
<view class="line-view" @click="updateSelected(2)"></view> |
|
|
|
|
<view class="mart10 fcor666 font13 width100" @click="updateSelected(2)">发现更多商户</view> |
|
|
|
|
<view class="input-box"> |
|
|
|
|
<cover-view class="cover-view-foot" v-if="isSelected == 1"> |
|
|
|
|
<cover-view class="line-view" @click="updateSelected(2)"></cover-view> |
|
|
|
|
<cover-view class="paddtop10 fcor666 font13 width100" @click="updateSelected(2)">点击发现更多商户</cover-view> |
|
|
|
|
<cover-view class="input-box"> |
|
|
|
|
<input placeholder="搜索商品" v-model="searchName" placeholder-style="color:#c0c0c0;" |
|
|
|
|
@click="updateSelected(2)" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
|
|
|
|
|
<!-- 打开筛选后 --> |
|
|
|
|
<view class="cover-view-foot-behind" v-if="isSelected == 2"> |
|
|
|
|
<view class="line-view" @click="updateSelected(1)"></view> |
|
|
|
|
<view class="mart10 fcor666 font13 width100" @click="updateSelected(1)">发现更多商户</view> |
|
|
|
|
<view class="input-box"> |
|
|
|
|
<cover-view class="cover-view-foot-behind" v-if="isSelected == 2"> |
|
|
|
|
<cover-view class="line-view" @click="updateSelected(1)"></cover-view> |
|
|
|
|
<cover-view class="paddtop10 fcor666 font13 width100" @click="updateSelected(1)">点击发现更多商户</cover-view> |
|
|
|
|
<cover-view class="input-box"> |
|
|
|
|
<input placeholder="搜索商品" v-model="searchName" placeholder-style="color:#c0c0c0;" |
|
|
|
|
@input="getMapStore()" /> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
<scroll-view class="scoroll-cont width94 mart10" scroll-y="true"> |
|
|
|
|
<view v-if="marker == '' " class="mart30 fotct font14 fcor666 fotct width100"> |
|
|
|
|
<cover-view v-if="marker == '' " class="mart30 fotct font14 fcor666 fotct width100"> |
|
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width96 height80 bor-botm1 alijusstart" v-for="(box,i) in marker" :key="i" |
|
|
|
|
</cover-view> |
|
|
|
|
<cover-view class="width96 height80 bor-botm1 alijusstart" v-for="(box,i) in marker" :key="i" |
|
|
|
|
@click="seeloaction(box)"> |
|
|
|
|
<image mode="widthFix" :src="box.logo" class="recontleft flleft border-r" |
|
|
|
|
style="max-width: 50px;min-width: 50px;"> |
|
|
|
|
</image> |
|
|
|
|
<view class="fotlt paddleft5"> |
|
|
|
|
<view class="text2 width100 font18 fontwig6"> |
|
|
|
|
<cover-view class="fotlt paddleft5"> |
|
|
|
|
<cover-view class="text2 width100 font16 fontwig6"> |
|
|
|
|
{{box.callout.content}} |
|
|
|
|
</view> |
|
|
|
|
<view class="height22"> |
|
|
|
|
<view class="width70 flleft text1 font13 fcor999"> |
|
|
|
|
</cover-view> |
|
|
|
|
<cover-view class="height22"> |
|
|
|
|
<cover-view class="width70 flleft text1 font13 fcor999"> |
|
|
|
|
{{box.callout.address}} |
|
|
|
|
</view> |
|
|
|
|
<view class="width30 flright font13 fcor666 fotct"> |
|
|
|
|
</cover-view> |
|
|
|
|
<cover-view class="width30 flright font13 fcor666 fotct"> |
|
|
|
|
<image mode="widthFix" :src="imagewxUrl+imgadres4" style="width: 10px;"></image> |
|
|
|
|
{{box.distance}}km |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
</cover-view> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
|
</cover-view> |
|
|
|
|
|
|
|
|
|
</map> |
|
|
|
|
</view> |
|
|
|
@ -151,9 +152,11 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
this.getIndustry(); |
|
|
|
|
this.latitude = app.globalData.latitude; |
|
|
|
|
this.longitude = app.globalData.longitude; |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
// this.latitude = app.globalData.latitude; |
|
|
|
|
// this.longitude = app.globalData.longitude; |
|
|
|
|
this.onControltap(); |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
mapheight() { |
|
|
|
@ -209,8 +212,8 @@ |
|
|
|
|
name: this.searchName, |
|
|
|
|
type: this.typeplat, |
|
|
|
|
childId: this.selectFirst, |
|
|
|
|
longitude: app.globalData.longitude, |
|
|
|
|
latitude: app.globalData.latitude |
|
|
|
|
longitude: this.longitude, |
|
|
|
|
latitude: this.latitude |
|
|
|
|
} |
|
|
|
|
getMapStore(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
@ -235,15 +238,26 @@ |
|
|
|
|
this.getMapStore(); |
|
|
|
|
}, |
|
|
|
|
//地图点击事件 |
|
|
|
|
markertap(e) {}, |
|
|
|
|
markertap(e) { |
|
|
|
|
// #ifdef H5 |
|
|
|
|
let markerId = e.detail.markerId; |
|
|
|
|
for (var i = 0; i < this.marker.length; i++) { |
|
|
|
|
if (markerId == this.marker[i].id) { |
|
|
|
|
this.seeloaction(this.marker[i]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
//地图点击事件 |
|
|
|
|
callouttap(e) { |
|
|
|
|
// #ifdef MP |
|
|
|
|
let markerId = e.markerId; |
|
|
|
|
for (var i = 0; i < this.marker.length; i++) { |
|
|
|
|
if (markerId == this.marker[i].id) { |
|
|
|
|
this.seeloaction(this.marker[i]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
postionIng() { |
|
|
|
@ -356,8 +370,26 @@ |
|
|
|
|
}, |
|
|
|
|
// 定位点击事件 |
|
|
|
|
onControltap() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '定位中' |
|
|
|
|
}) |
|
|
|
|
uni.getLocation({ |
|
|
|
|
geocode: true, |
|
|
|
|
type: 'wgs84', |
|
|
|
|
success: (res) => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
console.log(res, '获取当前位置') |
|
|
|
|
this.longitude = res.longitude; |
|
|
|
|
this.latitude = res.latitude; |
|
|
|
|
this.getIndustry(); |
|
|
|
|
}, |
|
|
|
|
fail() { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
}, |
|
|
|
|
address: (res) => { |
|
|
|
|
console.log('address', res) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//选择类型 |
|
|
|
|
changeType(item) { |
|
|
|
@ -372,6 +404,7 @@ |
|
|
|
|
if (this.selectChiler == 1) { |
|
|
|
|
this.selectChiler = 2; |
|
|
|
|
} else { |
|
|
|
|
this.selectChilerdistance = 2; |
|
|
|
|
this.selectChiler = 1; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -380,6 +413,7 @@ |
|
|
|
|
if (this.selectChilerdistance == 1) { |
|
|
|
|
this.selectChilerdistance = 2; |
|
|
|
|
} else { |
|
|
|
|
this.selectChiler = 2; |
|
|
|
|
this.selectChilerdistance = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -455,6 +489,7 @@ |
|
|
|
|
justify-content: center; |
|
|
|
|
width: 40px; |
|
|
|
|
height: 40px; |
|
|
|
|
border-radius: 50%; |
|
|
|
|
color: #484848; |
|
|
|
|
background-color: #fff; |
|
|
|
|
background-size: 60px 60px; |
|
|
|
@ -466,8 +501,8 @@ |
|
|
|
|
|
|
|
|
|
.cover-image { |
|
|
|
|
display: inline-block; |
|
|
|
|
width: 15px; |
|
|
|
|
height: 15px; |
|
|
|
|
width: 20px; |
|
|
|
|
height: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.cover-view-foot { |
|
|
|
|