From 3f747107835f019270a688a15aad4fd843cb8853 Mon Sep 17 00:00:00 2001 From: 明梦爽 <2972214568@qq.com> Date: 星期五, 19 十一月 2021 16:53:47 +0800 Subject: [PATCH] SSH --- src/views/notice.vue | 120 ++++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 73 insertions(+), 47 deletions(-) diff --git a/src/views/notice.vue b/src/views/notice.vue index ae982b2..23866f6 100644 --- a/src/views/notice.vue +++ b/src/views/notice.vue @@ -1,6 +1,6 @@ <template> <div> - <el-row type="flex" class="row-bg underline" justify="space-between"> + <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> @@ -8,16 +8,21 @@ </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.categoryId }}</span> + <span>{{ item.contypeId }}</span> --> + <span>{{ item.years }}</span> + <span>{{ item.date }}</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 +30,47 @@ </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-17',title:'骞抽《灞卞闄㈤珮灞傛浜烘墠鎷涜仒鍏憡'}, + {years:'2021',date:'11-17',title:'鍏充簬寮�灞曗�滄垜涓哄鏍♀�樺崄鍥涗簲鈥欒鍒掑缓瑷�鐚瓥鈥濇椿鍔ㄧ殑閫氱煡'}, + {years:'2021',date:'11-17',title:'骞抽《灞卞闄㈠強闄勫睘鍙h厰鍖婚櫌鎷涜仒鍙h厰鍖诲涓撲笟浜烘墠鍏憡'}, + {years:'2021',date:'11-17',title:'骞抽《灞卞闄�2020-2021瀛﹀勾鏈鏁欏璐ㄩ噺鎶ュ憡'}, + {years:'2021',date:'11-17',title:'鍏充簬鎺ㄨ崘鍏ㄧ渷楂樻牎瀛︾敓宸ヤ綔涓撳搴撲笓瀹剁殑閫氱煡'}, + {years:'2021',date:'11-17',title:'骞抽《灞卞闄�2022灞婃瘯涓氱敓鍐缃戠粶瑙嗛鍙岄�変細閭�璇峰嚱'}, ] + + // { + // 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 +78,34 @@ } </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 rgb(1, 72, 153); +} +.lieBiao { + width: 95%; + height: 55px; + background: rgb(241, 241, 241); + display: flex; + justify-content: space-between; + overflow: hidden; + margin-bottom: 10px; +} +.time { + width: 80px; + overflow: hidden; + display: flex; + // line-height: 20px; + flex-direction: column; + padding: 8px ; + background-color: rgb(1, 72, 153); + color: white; + text-align: center; +} +.title { + width: 500px; + height: 50px; + overflow: hidden; + line-height: 50px; + padding: 0 0 0 10px; +} </style> \ No newline at end of file -- Gitblit v1.8.0