|
@@ -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 = '联系我们'
|
|
|
}
|
|
|
},
|