Skip to content

Commit

Permalink
jiakun
Browse files Browse the repository at this point in the history
  • Loading branch information
jiakun0926 committed Oct 18, 2019
1 parent b20e887 commit d4cc41b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/views/nearbyMap/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
<span>45min</span>
</div>
<div class="look">查看</div>
<div class="look" @click='toCinemaInfo(item.id)'>查看</div>
</div>
</div>
</swiper-slide>
Expand Down Expand Up @@ -74,6 +74,11 @@ export default {
back() {
this.$router.go(-1);
},
toCinemaInfo(val){
var index = this.cinemaInfo.findIndex(ele => ele.id == val)
localStorage.setItem("cinemaObj", JSON.stringify(this.cinemaInfo[index]));
this.$router.push({ name: "cinemaInfo" });
},
addMap() {
// 百度地图API功能
var map = new BMap.Map("mapDiv"); // 创建Map实例
Expand Down Expand Up @@ -113,11 +118,7 @@ export default {
this.map.pointLat = mapInfo.pointLat;
this.map.pointLng = mapInfo.pointLng;
this.map.cityName = mapInfo.cityName;
},
destroyed() {
window.localStorage.removeItem("mapInfo");
}
};
</script>

Expand Down

0 comments on commit d4cc41b

Please sign in to comment.