liuyu 4 years ago
parent
commit
a6a426d2a6
2 changed files with 39 additions and 2 deletions
  1. 20 1
      src/views/meetingBrief/detail.vue
  2. 19 1
      src/views/meetingBrief/index.vue

+ 20 - 1
src/views/meetingBrief/detail.vue

@@ -73,10 +73,29 @@ export default {
   },
   created() {
     this.search();
+    this.getTitle();
   },
   methods: {
     ...contact(['query']),
     ...news(['fetch']),
+    getTitle() {
+      if (this.type === '0') {
+        this.title = '会议简介';
+      } else if (this.type === '1') {
+        this.title = '会议日程';
+      } else if (this.type === '2') {
+        this.title = '主办方介绍';
+      } else if (this.type === '3') {
+        this.title = '协办方介绍';
+      } else if (this.type === '4') {
+        this.title = '专家介绍';
+      } else if (this.type === '6') {
+        this.title = '温馨提示';
+      } else if (this.type === '7') {
+        this.title = '联系客服';
+      }
+      // console.log(this.title);
+    },
     async search() {
       if (this.type == '7') {
         let res = await this.query();
@@ -104,7 +123,7 @@ export default {
     },
   },
   mounted() {
-    this.title = this.$route.meta.title;
+    // this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
 };

+ 19 - 1
src/views/meetingBrief/index.vue

@@ -69,9 +69,27 @@ export default {
   },
   created() {
     this.search();
+    this.getTitle();
   },
   methods: {
     ...news({ newsquery: 'query' }),
+    getTitle() {
+      if (this.type === '0') {
+        this.title = '会议简介';
+      } else if (this.type === '1') {
+        this.title = '会议日程';
+      } else if (this.type === '2') {
+        this.title = '主办方介绍';
+      } else if (this.type === '3') {
+        this.title = '协办方介绍';
+      } else if (this.type === '4') {
+        this.title = '专家介绍';
+      } else if (this.type === '6') {
+        this.title = '温馨提示';
+      } else if (this.type === '7') {
+        this.title = '联系客服';
+      }
+    },
     async search() {
       let res = await this.newsquery({ type: this.type });
       if (this.$checkRes(res)) {
@@ -89,7 +107,7 @@ export default {
     },
   },
   mounted() {
-    this.title = this.$route.meta.title;
+    //this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
 };