Commit c6f0e158 authored by shilei's avatar shilei

地图marker点击

parent 64738c21
<template> <template>
<media-card <media-card
:img="areaInfo.imgUrl || ''" :img="detail.imgUrl || ''"
:title="areaInfo.name || ''" :title="detail.name || ''"
:cardId="areaInfo.id" :cardId="detail.id"
@click="toDetail" @click="toDetail"
:key="areaInfo.id" :key="detail.id"
> >
<template v-slot:rightMedia> <template v-slot:rightMedia>
<view> <view>
<div class="flex right-media f18"> <div class="flex right-media f18">
<div class="ell"> <div class="ell">
<span class="c80">建筑面积:</span>{{ areaInfo.area || "--" }} <span class="c80">建筑面积:</span>{{ detail.area || "--" }}
</div> </div>
</div> </div>
<div class="f18 flex right-footer"> <div class="f18 flex right-footer">
<div style="width: 180rpx" class="ell"> <div style="width: 180rpx" class="ell">
<span class="c80">载体类型:</span> <span class="c80">载体类型:</span>
<span>{{ areaInfo.type || "--" }}</span> <span>{{ detail.type || "--" }}</span>
</div> </div>
<div style="margin-left: 18rpx; width: 180rpx" class="ell"> <div style="margin-left: 18rpx; width: 180rpx" class="ell">
<span class="c80">建筑结构:</span>{{ areaInfo.structure || "--" }} <span class="c80">建筑结构:</span>{{ detail.structure || "--" }}
</div> </div>
</div> </div>
</view> </view>
...@@ -42,14 +42,6 @@ export default { ...@@ -42,14 +42,6 @@ export default {
default: "", default: "",
}, },
}, },
data() {
return {
areaInfo: {},
};
},
mounted() {
this.areaInfo = this.detail;
},
methods: { methods: {
toDetail() { toDetail() {
console.log('载体toDetail', this.detail) console.log('载体toDetail', this.detail)
......
<template> <template>
<media-card <media-card
:img="parkInfo.imgUrl || ''" :img="detail.imgUrl || ''"
:title="parkInfo.name || ''" :title="detail.name || ''"
:keyWords="keyWords" :keyWords="keyWords"
:cardId="parkInfo.id" :cardId="detail.id"
@click="toDetail" @click="toDetail"
:key="parkInfo.id" :key="detail.id"
> >
<template v-slot:rightMedia> <template v-slot:rightMedia>
<view> <view>
<div class="f24 flex right-footer"> <div class="f24 flex right-footer">
<div style="width: 200rpx"> <div style="width: 200rpx">
<span class="c80">级别:</span> <span class="c80">级别:</span>
<span>{{ parkInfo.levelName || "--" }}</span> <span>{{ detail.levelName || "--" }}</span>
</div> </div>
<div style="margin-left: 10rpx"> <div style="margin-left: 10rpx">
<span class="c80">面积:</span <span class="c80">面积:</span
>{{ parkInfo.coverArea ? parkInfo.coverArea + "亩" : "--" }} >{{ detail.coverArea ? detail.coverArea + "亩" : "--" }}
</div> </div>
</div> </div>
</view> </view>
...@@ -42,18 +42,7 @@ export default { ...@@ -42,18 +42,7 @@ export default {
default: "", default: "",
}, },
}, },
data() {
return {
parkInfo: {},
};
},
mounted() {
this.parkInfo = this.detail;
},
methods: { methods: {
changeCollecte(e) {
this.parkInfo.isCollection = e;
},
toDetail() { toDetail() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/detail/industrialDetail?id" + this.detail.id, url: "/pages/detail/industrialDetail?id" + this.detail.id,
......
...@@ -328,15 +328,10 @@ export default { ...@@ -328,15 +328,10 @@ export default {
this.activeInfo = {}; this.activeInfo = {};
}, },
handleMarkerClick(e) { handleMarkerClick(e) {
console.log('handleMarkerClick', e)
this.activeInfo = {}
const temp = this.dataList.filter(item => item.id === e.detail.markerId)[0]; const temp = this.dataList.filter(item => item.id === e.detail.markerId)[0];
console.log(temp)
setTimeout(() => {
this.$set(this, 'activeInfo', temp) this.$set(this, 'activeInfo', temp)
})
console.log(this.activeInfo)
} }
}, },
computed: { computed: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment