From ae038d50b068a02c4fe53725095dc952bf75b797 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 15 Dec 2021 17:36:21 +0800
Subject: [PATCH] 冲突

---
 src/components/map/index.vue |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index fe26a72..7f499cd 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -45,11 +45,13 @@
                 </div>
                 <div class="popup-nav">
                     <ul>
-                        <li class="come-here-fun">
+                        <li class="come-here-fun"
+                            :terminus="terminus">
                             <i class="popup-icon come-nav deblurring"></i>
                             到这
                         </li>
-                        <li class="get-to-fun">
+                        <li class="get-to-fun"
+                            :startingPoint="startingPoint">
                             <i class="popup-icon start-nav deblurring"></i>
                             出发
                         </li>
@@ -126,7 +128,8 @@
 
         <left-nav ref="leftNav"></left-nav>
 
-        <campusNav :comeName="comeName"
+        <campusNav ref="campusNavRoute"
+                   :comeName="comeName"
                    :getToName="getToName"
                    v-show="campusNavFlag" />
 
@@ -165,7 +168,15 @@
         ...mapGetters([
             'viewer',
             'popupBgUrl',
-            'pupupQRUrl'
+            'pupupQRUrl',
+            // 终点
+            'terminus',
+            // 起点
+            'startingPoint',
+            // 点信息
+            'pointPosition',
+            // 点名称
+            'stateName'
         ])
     },
     mounted () {
@@ -183,13 +194,17 @@
                 $(this).parent().siblings().children(`div:eq(${$(this).index()})`).addClass('on').siblings().removeClass('on')
             })
 
+            // 终点
             $('#map_popup_content').on('click', '.popup-nav .come-here-fun', function (e) {
-                that.comeName = '成交楼'
+                that.comeName = that.stateName
+                that.$store.commit('SET_TERMINUS', that.pointPosition)
                 if (that.campusNavFlag == false) that.campusNavFlag = true
             })
 
+            // 起点
             $('#map_popup_content').on('click', '.popup-nav .get-to-fun', function (e) {
-                that.getToName = '活动中心'
+                that.getToName = that.stateName
+                that.$store.commit('SET_STARTINGPOINT', that.pointPosition)
                 if (that.campusNavFlag == false) that.campusNavFlag = true
             })
 
@@ -385,6 +400,11 @@
     methods: {
         closeCampusNav () {
             this.campusNavFlag = false
+            this.$refs.campusNavRoute.clearLayer()
+            this.$store.commit('SET_STARTINGPOINT', null)
+            this.$store.commit('SET_TERMINUS', null)
+            this.comeName = ''
+            this.getToName = ''
         }
     }
 }

--
Gitblit v1.9.3