Browse Source

news请求

lrf402788946 5 years ago
parent
commit
9b60291ebb
1 changed files with 18 additions and 1 deletions
  1. 18 1
      src/views/master/news/detail.vue

+ 18 - 1
src/views/master/news/detail.vue

@@ -1,6 +1,14 @@
 <template>
   <div id="detail">
-    <login-Detail :topinfo="site" :menulist="menu" :type="type" :bannerinfo="master.bannerinfo" :noticedetail="info" :footinfo="site"></login-Detail>
+    <login-Detail
+      v-loading="loading"
+      :topinfo="site"
+      :menulist="menu"
+      :type="type"
+      :bannerinfo="master.bannerinfo"
+      :noticedetail="info"
+      :footinfo="site"
+    ></login-Detail>
   </div>
 </template>
 
@@ -21,6 +29,7 @@ export default {
     await this.getMenu();
     this.masterData();
     await this.search();
+    this.$set(this, `loading`, false);
   },
   data: () => ({
     site: {},
@@ -32,6 +41,7 @@ export default {
     corpInfo: {},
     //jobfair用
     corpList: [],
+    loading: true,
   }),
   computed: {
     type() {
@@ -193,6 +203,13 @@ export default {
       }
     },
     //jobfair结束
+    //info部分
+    async getInfo() {
+      let result = await this.newsOperation({ type: 'search', data: { id: this.id } });
+      if (`${result.errcode}` === '0') {
+        this.$set(this, `info`, result.data);
+      }
+    },
   },
 };
 </script>