LAPTOP-UBJMM5MG\user 1 年之前
父節點
當前提交
40cc1b9c23
共有 5 個文件被更改,包括 25 次插入11 次删除
  1. 4 1
      src/views/common/home.vue
  2. 16 7
      src/views/common/homepage.vue
  3. 2 2
      src/views/contact/index.vue
  4. 1 1
      src/views/message/index.vue
  5. 2 0
      src/views/myBus.js

+ 4 - 1
src/views/common/home.vue

@@ -427,7 +427,7 @@
           <span>园区小程序</span>
           <img
             style="width: 82%"
-            src="~@/assets/images/xiaochengxuEr.jpg"
+            src="~@/assets/images/xiaochengxzheshi.png"
             alt=""
           >
         </div>
@@ -470,6 +470,7 @@ import {
 } from '@/service/api_service'
 import Base from '@/views/base/base'
 import BaseData from '@/views/base/baseData'
+import myBus from '@/views/myBus'
 export default {
     name: 'Homepage',
     mixins: [Base, BaseData],
@@ -669,6 +670,7 @@ export default {
         },
         toServiceLocator(e) {
             this.$router.push(e)
+            myBus.$emit('reMenu', true)
         },
         reduceAction() {
             if (this.action == 0) {
@@ -733,6 +735,7 @@ export default {
                     this.$router.push({ name: 'companyDetail', params: ac })
                     break
             }
+            myBus.$emit('reMenu', true)
         },
         getPropaganda() {
             const _this = this

+ 16 - 7
src/views/common/homepage.vue

@@ -277,6 +277,7 @@
 
 <script>
 import { getBridf } from '@/service/api_service'
+import myBus from "@/views/myBus";
 export default {
     name: 'Homepage',
     data() {
@@ -287,33 +288,41 @@ export default {
             menuPlace: '首页'
         }
     },
+    activated() {
+        this.getMenu()
+    },
     mounted() {
         this.getData()
         this.getMenu()
+        myBus.$on('reMenu', () => {
+          this.$nextTick(()=>{
+            this.getMenu()
+          })
+        })
     },
     methods: {
         getMenu() {
             if (this.$route.path === '/') {
                 this.menuPlace = '首页'
-            } if (this.$route.path === '/serviceLocator' || this.$route.path === '/surroundings' || this.$route.path === '/industry') {
+            } if (this.$route.path.includes('/serviceLocator') || this.$route.path.includes('/surroundings') || this.$route.path.includes('/industry')) {
                 this.menuPlace = '园区介绍'
             }
-            if (this.$route.path === '/service/characteristic' || this.$route.path === '/service/activities' || this.$route.path === '/service/educate') {
+            if (this.$route.path.includes('/service/characteristic') || this.$route.path.includes('/service/activities') || this.$route.path.includes('/service/educate')) {
                 this.menuPlace = '企业服务'
             }
-            if (this.$route.path === '/zhaoshang/list') {
+            if (this.$route.path.includes('/zhaoshang/list')) {
                 this.menuPlace = '政策服务'
             }
-            if (this.$route.path === '/jobs/list' || this.$route.path === '/jobs/detail') {
+            if (this.$route.path.includes('/jobs/list') || this.$route.path.includes('/jobs/detail')) {
                 this.menuPlace = '优质人才'
             }
-            if (this.$route.path === '/company/list' || this.$route.path === '/company/detail') {
+            if (this.$route.path.includes('/company/list') || this.$route.path.includes('/company/detail')) {
                 this.menuPlace = '知名企业'
             }
-            if (this.$route.path === '/notice/list' || this.$route.path === '/notice/detail') {
+            if (this.$route.path.includes('/notice/list') || this.$route.path.includes('/notice/detail')) {
                 this.menuPlace = '园区通知'
             }
-            if (this.$route.path === '/contact') {
+            if (this.$route.path.includes('/contact')) {
                 this.menuPlace = '联系我们'
             }
         },

+ 2 - 2
src/views/contact/index.vue

@@ -106,7 +106,7 @@
         <div class="qrcode-btn">
           <span>了解更多,欢迎关注</span>
           <span>数字园区服务小程序</span>
-          <img src="~@/assets/images/xiaochengxuEr.jpg" alt="">
+          <img src="~@/assets/images/xiaochengxzheshi.png" alt="">
           <h3>扫一扫</h3>
         </div>
       </div>
@@ -119,7 +119,7 @@
         <div class="qrcode-btn">
           <span>了解更多,欢迎关注</span>
           <span>数字园区小程序</span>
-          <img src="~@/assets/images/xiaochengxuEr.jpg" alt="">
+          <img src="~@/assets/images/xiaochengxzheshi.png" alt="">
         </div>
       </div>
 

+ 1 - 1
src/views/message/index.vue

@@ -7,7 +7,7 @@
       <div class="qrcode-btn">
         <span>了解更多,欢迎关注</span>
         <span>数字园区</span>
-        <img src="~@/assets/images/xiaochengxuEr.jpg" alt="">
+        <img src="~@/assets/images/xiaochengxzheshi.png" alt="">
         <h3>扫一扫</h3>
       </div>
     </div>

+ 2 - 0
src/views/myBus.js

@@ -0,0 +1,2 @@
+import vue from "vue";
+export default new vue();