1.修改地图可视化

dev
杨杰 2 years ago
parent 068b10b451
commit b09beafa80
  1. 31
      pages/tabBar/category/category.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="map-container"> <view class="map-container">
<map style="width: 100%; height: 10vh;" :style="{height:mapheight}" :latitude="latitude" <map style="width: 100%; height: 10vh;" :style="{height:mapheight}" :latitude="latitude" :longitude="longitude"
:longitude="longitude" :markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap'> :markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap'>
<!-- <cover-view class="cover-view-loca" :style='{bottom:coverbottom}' @click="onControltap"> <!-- <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-image class="cover-image" @click="play" src="../../../static/img/adresw.png"></cover-image>
<cover-view> <cover-view>
@ -79,9 +79,10 @@
<view v-if="marker == '' " class="mart30 fotct font14 fcor666 fotct width100"> <view v-if="marker == '' " class="mart30 fotct font14 fcor666 fotct width100">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image>
</view> </view>
<view class="width96 height80 bor-botm1 alijusstart" v-for="(box,i) in marker" :key="i"> <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" <image mode="widthFix" :src="box.logo" class="recontleft flleft border-r"
style="max-height: 60px;" @click="toCategory(box)"> style="max-height: 60px;">
</image> </image>
<view class="fotlt paddleft5"> <view class="fotlt paddleft5">
<view class="text2 width100 font18 fontwig6"> <view class="text2 width100 font18 fontwig6">
@ -213,14 +214,14 @@
changeFirstcont(item) { changeFirstcont(item) {
this.selectFirst = item.id; this.selectFirst = item.id;
this.selectFirstName = item.name; this.selectFirstName = item.name;
this.selectChiler = 2; this.selectChiler = 2;
this.getMapStore(); this.getMapStore();
}, },
// //
changeDistance(item) { changeDistance(item) {
this.distance = item.id; this.distance = item.id;
this.distanceName = item.title; this.distanceName = item.title;
this.selectChilerdistance = 2; this.selectChilerdistance = 2;
this.getMapStore(); this.getMapStore();
}, },
// //
@ -348,7 +349,7 @@
this.typeid = item.id; this.typeid = item.id;
this.goodsSendotClassList = item.childIndustry; this.goodsSendotClassList = item.childIndustry;
this.selectFirst = item.childIndustry[0].id; this.selectFirst = item.childIndustry[0].id;
this.selectFirstName = item.childIndustry[0].name; this.selectFirstName = item.childIndustry[0].name;
this.getMapStore(); this.getMapStore();
}, },
// //
@ -371,7 +372,21 @@
// //
updateSelected(item) { updateSelected(item) {
this.isSelected = item; this.isSelected = item;
} },
seeloaction(item) {
// #ifdef H5
window.location.href =
`http://apis.map.qq.com/uri/v1/marker?marker=coord:(${item.latitude},${item.longitude})&addr:${item.address}`;
// #endif
// #ifdef MP
uni.openLocation({
latitude: Number(item.latitude), //
longitude: Number(item.longitude), //
name: item.store_name,
address: item.address
})
// #endif
},
} }
} }
</script> </script>

Loading…
Cancel
Save