|
|
|
@ -12,15 +12,16 @@ |
|
|
|
|
<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' : '']" |
|
|
|
|
v-for="(item,index) in marker" :key="index" @click="changeType(item)">全部全部{{index}}</view> |
|
|
|
|
v-for="(item,index) in goodsFirstClassList" :key="index" @click="changeType(item)">{{item.name}} |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
<!-- 二级分类 --> |
|
|
|
|
<view class="width100 mart15 backcorfff cover-viewchage alijus fotct" style="border-radius: 22px;"> |
|
|
|
|
<view class="font14 width30w" :class="[selectFirst == 1? 'onchange' : '']" |
|
|
|
|
@click="changeChilerType()">全部 |
|
|
|
|
<!-- :class="[selectFirst == 1? 'onchange' : '']" --> |
|
|
|
|
<view class="font14 width30w onchange text1" @click="changeChilerType()">{{selectFirstName}} |
|
|
|
|
<image mode="widthFix" class="margle" style="width: 8px;" :src="imagewxUrl+imgadres2"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="font14 width30w" :class="[selectFirst == 1? 'onchange' : '']">全部 |
|
|
|
|
<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"> |
|
|
|
@ -36,33 +37,22 @@ |
|
|
|
|
<!-- //显示内容 --> |
|
|
|
|
<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"> |
|
|
|
|
<view class="width90w" :class="[selectFirst == 1? 'onchange' : '']">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"> |
|
|
|
|
<view class="width90w">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"> |
|
|
|
|
<view class="width90w">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"> |
|
|
|
|
<view class="width90w">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"> |
|
|
|
|
<view class="width90w">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
<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> |
|
|
|
|
<image class="icon20" src="../../../static/img/changed.png" mode="widthFix" |
|
|
|
|
v-if="selectFirst == item.id"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"> |
|
|
|
|
<view class="width90w">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width90 bor-botm1 paddtop15 paddbotm15 alijusstart"> |
|
|
|
|
<view class="width90w">发生地方是发生地方</view> |
|
|
|
|
<image class="icon12" src="../../../static/img/jt.png" mode="widthFix"></image> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 二级距离 --> |
|
|
|
|
<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" |
|
|
|
|
v-for="(item,index) in distanceList" :key="index" @click="changeDistance(item)"> |
|
|
|
|
<view class="width90w" :class="[ distance== item.id? 'onchange' : '']">{{item.title}}</view> |
|
|
|
|
<image class="icon20" src="../../../static/img/changed.png" mode="widthFix" |
|
|
|
|
v-if="distance == item"></image> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
@ -72,7 +62,7 @@ |
|
|
|
|
<view class="line-view"></view> |
|
|
|
|
<view class="mart10 fcor666 font13 width100">发现更多商户</view> |
|
|
|
|
<view class="input-box"> |
|
|
|
|
<input placeholder="搜索商品" v-model="couponName" placeholder-style="color:#c0c0c0;" |
|
|
|
|
<input placeholder="搜索商品" v-model="searchName" placeholder-style="color:#c0c0c0;" |
|
|
|
|
@input="toSearch()" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -82,16 +72,14 @@ |
|
|
|
|
<view class="line-view"></view> |
|
|
|
|
<view class="mart10 fcor666 font13 width100">发现更多商户</view> |
|
|
|
|
<view class="input-box"> |
|
|
|
|
<input placeholder="搜索商品" v-model="couponName" placeholder-style="color:#c0c0c0;" |
|
|
|
|
<input placeholder="搜索商品" v-model="searchName" placeholder-style="color:#c0c0c0;" |
|
|
|
|
@input="toSearch()" /> |
|
|
|
|
</view> |
|
|
|
|
<scroll-view class="scoroll-cont width94 mart10" scroll-y="true"> |
|
|
|
|
<view class="width94 alijusstart" @click.stop="updateSelected(1)"> |
|
|
|
|
<view class="width30"> |
|
|
|
|
<image src="../../../static/img/jfx.png" class="icon45" mode="widthFix"> |
|
|
|
|
</image> |
|
|
|
|
</view> |
|
|
|
|
<view class="width70"></view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
@ -100,146 +88,51 @@ |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
getIndustry, |
|
|
|
|
getMapStore |
|
|
|
|
} from '../../../Utils/Api.js'; |
|
|
|
|
let app = getApp(); |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
latitude: 23.106574, //纬度 |
|
|
|
|
longitude: 113.324587, //经度 |
|
|
|
|
latitude: '', //纬度 |
|
|
|
|
longitude: '', //经度 |
|
|
|
|
scale: 13, //缩放级别 |
|
|
|
|
bottomData: false, |
|
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
|
imgadres2: 'xiala.png', |
|
|
|
|
marker: [{ |
|
|
|
|
id: 0, |
|
|
|
|
latitude: 23.13065, //纬度 |
|
|
|
|
longitude: 113.3274, //经度 |
|
|
|
|
iconPath: '../../../static/img/user/user5.png', //显示的图标 |
|
|
|
|
rotate: 0, // 旋转度数 |
|
|
|
|
width: 20, //宽 |
|
|
|
|
height: 30, //高 |
|
|
|
|
// title:'我在这里',//标注点名 |
|
|
|
|
alpha: 0.5, //透明度 |
|
|
|
|
callout: { //自定义标记点上方的气泡窗口 点击有效 |
|
|
|
|
content: '天宝大厦', //文本 |
|
|
|
|
color: '#ffffff', //文字颜色 |
|
|
|
|
fontSize: 14, //文本大小 |
|
|
|
|
borderRadius: 15, //边框圆角 |
|
|
|
|
borderWidth: '10', |
|
|
|
|
bgColor: '#e51860', //背景颜色 |
|
|
|
|
display: 'ALWAYS', //常显 |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 1234597, |
|
|
|
|
latitude: 23.106574, //纬度 |
|
|
|
|
longitude: 113.324587, //经度 |
|
|
|
|
iconPath: '../../../static/img/user/user5.png', //显示的图标 |
|
|
|
|
rotate: 0, // 旋转度数 |
|
|
|
|
width: 20, //宽 |
|
|
|
|
height: 30, //高 |
|
|
|
|
// title:'我在这里',//标注点名 |
|
|
|
|
alpha: 0.5, //透明度 |
|
|
|
|
// label:{//为标记点旁边增加标签 //因背景颜色H5不支持 |
|
|
|
|
// color:'red',//文本颜色 |
|
|
|
|
// }, |
|
|
|
|
callout: { //自定义标记点上方的气泡窗口 点击有效 |
|
|
|
|
content: '广州塔', //文本 |
|
|
|
|
color: '#ffffff', //文字颜色 |
|
|
|
|
fontSize: 14, //文本大小 |
|
|
|
|
borderRadius: 15, //边框圆角 |
|
|
|
|
borderWidth: '10', |
|
|
|
|
bgColor: '#e51860', //背景颜色 |
|
|
|
|
display: 'ALWAYS', //常显 |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 2, |
|
|
|
|
latitude: 23.1338, //纬度 |
|
|
|
|
longitude: 113.33052, //经度 |
|
|
|
|
iconPath: '../../../static/img/user/user5.png', //显示的图标 |
|
|
|
|
rotate: 0, // 旋转度数 |
|
|
|
|
width: 20, //宽 |
|
|
|
|
height: 30, //高 |
|
|
|
|
alpha: 0.5, //透明度 |
|
|
|
|
callout: { //自定义标记点上方的气泡窗口 点击有效 |
|
|
|
|
content: '德隆大厦', //文本 |
|
|
|
|
color: '#ffffff', //文字颜色 |
|
|
|
|
fontSize: 14, //文本大小 |
|
|
|
|
borderRadius: 15, //边框圆角 |
|
|
|
|
borderWidth: '10', |
|
|
|
|
bgColor: '#e51860', //背景颜色 |
|
|
|
|
display: 'ALWAYS', //常显 |
|
|
|
|
}, |
|
|
|
|
marker: '', |
|
|
|
|
typeid: 0, //选择分类 |
|
|
|
|
isSelected: 1, //是否选择下拉 |
|
|
|
|
selectFirst: '', //筛选是否有值 |
|
|
|
|
selectFirstName: '', //筛选值名字 |
|
|
|
|
selectChiler: 2, // 一级子菜单筛选 |
|
|
|
|
selectChilerdistance: 2, // 二级子菜单筛选 |
|
|
|
|
goodsFirstClassList: '', //商品一级分类 |
|
|
|
|
goodsSendotClassList: '', //商品一级分类 |
|
|
|
|
distanceList: [{ |
|
|
|
|
id: 1, |
|
|
|
|
title: '1km' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 3, |
|
|
|
|
latitude: 23.136455, //纬度 |
|
|
|
|
longitude: 113.329002, //经度 |
|
|
|
|
iconPath: '../../../static/img/user/user5.png', //显示的图标 |
|
|
|
|
rotate: 0, // 旋转度数 |
|
|
|
|
width: 20, //宽 |
|
|
|
|
height: 30, //高 |
|
|
|
|
alpha: 0.5, //透明度 |
|
|
|
|
callout: { //自定义标记点上方的气泡窗口 点击有效 |
|
|
|
|
content: '羊城国际商贸中心', //文本 |
|
|
|
|
color: '#ffffff', //文字颜色 |
|
|
|
|
fontSize: 14, //文本大小 |
|
|
|
|
borderRadius: 15, //边框圆角 |
|
|
|
|
borderWidth: '10', |
|
|
|
|
bgColor: '#e51860', //背景颜色 |
|
|
|
|
display: 'ALWAYS', //常显 |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 4, |
|
|
|
|
latitude: 23.224781, //纬度 |
|
|
|
|
longitude: 113.293911, //经度 |
|
|
|
|
iconPath: '../../../static/img/user/user5.png', //显示的图标 |
|
|
|
|
rotate: 0, // 旋转度数 |
|
|
|
|
width: 20, //宽 |
|
|
|
|
height: 30, //高 |
|
|
|
|
alpha: 0.5, //透明度 |
|
|
|
|
callout: { //自定义标记点上方的气泡窗口 点击有效 |
|
|
|
|
content: '天瑞广场A座', //文本 |
|
|
|
|
color: '#ffffff', //文字颜色 |
|
|
|
|
fontSize: 16, //文本大小 |
|
|
|
|
borderRadius: 15, //边框圆角 |
|
|
|
|
borderWidth: '12', |
|
|
|
|
bgColor: '#e51860', //背景颜色 |
|
|
|
|
display: 'ALWAYS', //常显 |
|
|
|
|
}, |
|
|
|
|
title: '3km' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
id: 5, |
|
|
|
|
latitude: 23.072726, //纬度 |
|
|
|
|
longitude: 113.277921, //经度 |
|
|
|
|
iconPath: '../../../static/img/user/user5.png', //显示的图标 |
|
|
|
|
rotate: 0, // 旋转度数 |
|
|
|
|
width: 20, //宽 |
|
|
|
|
height: 30, //高 |
|
|
|
|
alpha: 0.5, //透明度 |
|
|
|
|
callout: { //自定义标记点上方的气泡窗口 点击有效 |
|
|
|
|
content: '大米和小米儿童康复(广州盈丰)中心', //文本 |
|
|
|
|
color: '#ffffff', //文字颜色 |
|
|
|
|
fontSize: 14, //文本大小 |
|
|
|
|
borderRadius: 15, //边框圆角 |
|
|
|
|
borderWidth: '8', |
|
|
|
|
bgColor: '#e51860', //背景颜色 |
|
|
|
|
display: 'ALWAYS', //常显 |
|
|
|
|
}, |
|
|
|
|
title: '5km' |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
typeid: 0, //选择分类 |
|
|
|
|
isSelected: 1, //是否选择下拉 |
|
|
|
|
selectFirst: 1, //筛选是否有值 |
|
|
|
|
selectChiler: 1, // 子菜单筛选 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
], //距离 |
|
|
|
|
distance: '1', |
|
|
|
|
distanceName: '1km', |
|
|
|
|
searchName: '' //搜索名称 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
|
|
|
|
|
this.getIndustry(); |
|
|
|
|
this.latitude = app.globalData.latitude; |
|
|
|
|
this.longitude = app.globalData.longitude; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
mapheight() { |
|
|
|
@ -267,6 +160,46 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
//查询商户列表 |
|
|
|
|
getIndustry() { |
|
|
|
|
getIndustry().then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.goodsFirstClassList = res.return_data; |
|
|
|
|
this.typeid = res.return_data[0].id; |
|
|
|
|
this.goodsSendotClassList = res.return_data[0].childIndustry; |
|
|
|
|
this.selectFirst = res.return_data[0].childIndustry[0].id; |
|
|
|
|
this.selectFirstName = res.return_data[0].childIndustry[0].name; |
|
|
|
|
this.getMapStore(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//查询商户 |
|
|
|
|
getMapStore() { |
|
|
|
|
let datas = { |
|
|
|
|
distance: this.distance, |
|
|
|
|
name: this.searchName, |
|
|
|
|
childId: this.selectFirst, |
|
|
|
|
longitude: app.globalData.longitude, |
|
|
|
|
latitude: app.globalData.latitude |
|
|
|
|
} |
|
|
|
|
getMapStore(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.marker = res.return_data |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//选择二级分类数据 |
|
|
|
|
changeFirstcont(item) { |
|
|
|
|
this.selectFirst = item.id; |
|
|
|
|
this.selectFirstName = item.name; |
|
|
|
|
this.selectChiler = 2; |
|
|
|
|
}, |
|
|
|
|
//选择距离 |
|
|
|
|
changeDistance(item) { |
|
|
|
|
this.distance = item.id; |
|
|
|
|
this.distanceName = item.title; |
|
|
|
|
this.selectChilerdistance = 2; |
|
|
|
|
}, |
|
|
|
|
//地图点击事件 |
|
|
|
|
markertap(e) {}, |
|
|
|
|
//地图点击事件 |
|
|
|
@ -305,9 +238,9 @@ |
|
|
|
|
} |
|
|
|
|
findByLatAndLng(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.city = res.return_data.provinceName; |
|
|
|
|
app.globalData.cityName = res.return_data.provinceName; |
|
|
|
|
app.globalData.qianzhuCityName = res.return_data.cityName; |
|
|
|
|
this.city = res.return_data.provinceName; |
|
|
|
|
app.globalData.cityName = res.return_data.provinceName; |
|
|
|
|
app.globalData.qianzhuCityName = res.return_data.cityName; |
|
|
|
|
app.globalData.cityId = res.return_data.regionId; |
|
|
|
|
// app.globalData.cityId = '500100'; |
|
|
|
|
if (res.return_data.result.addressComponent.adcode) { |
|
|
|
@ -390,6 +323,9 @@ |
|
|
|
|
//选择类型 |
|
|
|
|
changeType(item) { |
|
|
|
|
this.typeid = item.id; |
|
|
|
|
this.goodsSendotClassList = item.childIndustry; |
|
|
|
|
this.selectFirst = item.childIndustry[0].id; |
|
|
|
|
this.selectFirstName = item.childIndustry[0].name; |
|
|
|
|
}, |
|
|
|
|
//子菜单显示 |
|
|
|
|
changeChilerType() { |
|
|
|
@ -399,6 +335,15 @@ |
|
|
|
|
this.selectChiler = 1; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//距离显示 |
|
|
|
|
changeChilerdistance() { |
|
|
|
|
if (this.selectChilerdistance == 1) { |
|
|
|
|
this.selectChilerdistance = 2; |
|
|
|
|
} else { |
|
|
|
|
this.selectChilerdistance = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 是否选择下拉 |
|
|
|
|
updateSelected(item) { |
|
|
|
|
this.isSelected = item; |
|
|
|
|