Commit c6f0e158 authored by shilei's avatar shilei

地图marker点击

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