Commit 9d81c70b authored by xinzhedeai's avatar xinzhedeai

infowindow dynamic route

parent fce271ad
......@@ -244,6 +244,11 @@ export default {
document.getElementById("closeInfoWindowBtn").onclick = () => {
VUE.infoWindow.close();
};
document.getElementById("goMoreBtn").onclick = function () {
// alert(this.getAttribute('data-id'))
// VUE.$route.push('/home/enterprise')
location.href = '/home/tech?id=' + this.getAttribute('data-id')
};
});
},
showInfoWindow(marker, item) {
......@@ -257,7 +262,7 @@ export default {
<dd><font>使用总面积:</font><span>${item.totalArea || 0}(㎡)</span></dd>
<dd><font>总收入:</font><span>${item.totalIncome || 0}万元</span></dd>
</dl>
<button type="button" id="goMoreBtn">更多</button>
<button type="button" id="goMoreBtn" data-id="${item.incubatorName}">更多</button>
</div>`;
this.infoWindow.setContent(content);
this.infoWindow.open(this.map, marker.getPosition());
......
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