liuyg
2021-12-15 ae038d50b068a02c4fe53725095dc952bf75b797
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 = ''
        }
    }
}