明梦爽
2021-11-18 1714ea49fbbeb8bcb9f9f896ffb873362e8cdca8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<template>
  <div>
    <el-row type="flex" class="row-bg underline" justify="space-between">
      <span class="color"><b>通知公告</b></span>
      <span @click="goMore('通知公告')" class="liPointer">
        更多<i class="el-icon-d-arrow-right"></i>
      </span>
    </el-row>
    <div>
      <ul>
        <li
          class="lieBiao liPointer"
          :key="index"
          v-for="(item, index) in noticeList"
        >
          <div class="time">
            <span>{{ item.categoryId }}</span>
            <span>{{ item.contypeId }}</span>
          </div>
          <div class="title" @click="toNoticeMsg(item.title)">
            {{ item.title }}
          </div>
        </li>
      </ul>
    </div>
  </div>
</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'},
        {
          categoryId: 1,
          contypeId: 2,
          coverPath: '13',
          dataString: '123',
          title:"12"
        }
    }
  },
  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
        }
      })
    },
    goMore(val) {
      this.$router.push({
        path: '/home/moreMessage',
        query: {
          type: val
        }
      })
    }
  }
}
</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;
}
</style>