明梦爽
2022-04-17 5529b7077126be368abd444d45ec085d8c7779e3
src/views/notice.vue
@@ -3,9 +3,7 @@
    <!-- 通知公告导航条 -->
    <el-row type="flex" class="row-bg underline marb10" justify="space-between">
      <span class="color"><b>通知公告</b></span>
      <span @click="goMore('通知公告')" class="liPointer">
        更多<i class="el-icon-d-arrow-right"></i>
      </span>
      <span @click="goMore('通知公告')" class="liPointer"> 更多<i class="el-icon-d-arrow-right"></i> </span>
    </el-row>
    <!-- 通知公告新闻列表 -->
    <div style="max-height:382px;overflow:hidden;">
@@ -29,11 +27,10 @@
  name: 'notice',
  data() {
    return {
     noticeList: [],
      noticeList: []
    }
  },
  created() {
  },
  created() {},
  mounted(){
    //获取小标题
    // axios.get('http://localhost:8080/news_category/list/1').then(res => {
@@ -54,13 +51,15 @@
        newsCategoryId:42,
        size:6
      }
      getNewsList(data).then(res => {
        console.log(res);
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.noticeList = res.data.records
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    // 去到新闻展示页
@@ -68,7 +67,7 @@
      this.$router.push({
        path: '/home/news',
        query: {
          id:id,
          id: id
        }
      })
    },