From 1714ea49fbbeb8bcb9f9f896ffb873362e8cdca8 Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期四, 18 十一月 2021 10:47:59 +0800
Subject: [PATCH] 动态获取

---
 src/views/notice.vue |  109 ++++++++++++++++++++++++++++++------------------------
 1 files changed, 61 insertions(+), 48 deletions(-)

diff --git a/src/views/notice.vue b/src/views/notice.vue
index ae982b2..78dbb4a 100644
--- a/src/views/notice.vue
+++ b/src/views/notice.vue
@@ -8,16 +8,18 @@
     </el-row>
     <div>
       <ul>
-        <li 
+        <li
           class="lieBiao liPointer"
           :key="index"
-          v-for="(item ,index) in noticeList"
+          v-for="(item, index) in noticeList"
         >
           <div class="time">
-            <span>{{ item.date }}</span>
-            <span>{{ item.years }}</span>
+            <span>{{ item.categoryId }}</span>
+            <span>{{ item.contypeId }}</span>
           </div>
-          <div class="title" @click="toNoticeMsg(item.title)">{{ item.title }}</div>
+          <div class="title" @click="toNoticeMsg(item.title)">
+            {{ item.title }}
+          </div>
         </li>
       </ul>
     </div>
@@ -25,33 +27,44 @@
 </template>
 <script>
 export default {
-  name:'notice',
-  data(){
-    return{
-      noticeList:[
-        {years:'2021',date:'11-2',title:'鎴戞槸鏍囬1'},
-        {years:'2021',date:'11-2',title:'鎴戞槸鏍囬2'},
-        {years:'2021',date:'11-2',title:'鎴戞槸鏍囬3'},
-        {years:'2021',date:'11-2',title:'鎴戞槸鏍囬4'},
-        {years:'2021',date:'11-2',title:'鎴戞槸鏍囬5'},
-
-      ]
+  name: 'notice',
+  data() {
+    return {
+      noticeList:
+        // {years:'2021',date:'11-2',title:'鎴戞槸鏍囬1'},
+        // {years:'2021',date:'11-2',title:'鎴戞槸鏍囬2'},
+        // {years:'2021',date:'11-2',title:'鎴戞槸鏍囬3'},
+        // {years:'2021',date:'11-2',title:'鎴戞槸鏍囬4'},
+        // {years:'2021',date:'11-2',title:'鎴戞槸鏍囬5'},
+        {
+          categoryId: 1,
+          contypeId: 2,
+          coverPath: '13',
+          dataString: '123',
+          title:"12"
+        }
     }
   },
-  methods:{
-    toNoticeMsg(t){
+  created(){
+    // getnews() {
+    //   const res = this.$http.post('newsTheme/insert',this.noticeList)
+    //   console.log(res);
+    // }
+  },
+  methods: {
+    toNoticeMsg(t) {
       this.$router.push({
-        path:'/home/noticeMessage',
-        query:{
-          title:t
+        path: '/home/noticeMessage',
+        query: {
+          title: t
         }
       })
     },
-    goMore(val){
+    goMore(val) {
       this.$router.push({
-        path:'/home/moreMessage',
-        query:{
-          type:val,
+        path: '/home/moreMessage',
+        query: {
+          type: val
         }
       })
     }
@@ -59,27 +72,27 @@
 }
 </script>
 <style lang="less" scoped>
-  .underline{
-    border-bottom: 1px solid #0f99e9;
-  }
-  .lieBiao{
-    width: 95%;
-    height: 80px;
-    background: rgb(202, 202, 202);
-    display: flex;
-    justify-content: space-between;
-    overflow: hidden;
-    margin-bottom: 10px;
-  }
-  .time{
-    width: 100px;
-    overflow: hidden;
-    display: flex;
-    flex-direction: column;
-  }
-  .title{
-    width: 500px;
-    height: 70px;
-    overflow: hidden;
-  }
+.underline {
+  border-bottom: 1px solid #0f99e9;
+}
+.lieBiao {
+  width: 95%;
+  height: 80px;
+  background: rgb(202, 202, 202);
+  display: flex;
+  justify-content: space-between;
+  overflow: hidden;
+  margin-bottom: 10px;
+}
+.time {
+  width: 100px;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+}
+.title {
+  width: 500px;
+  height: 70px;
+  overflow: hidden;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0