From 149ca94b739f7f2286a502c1dc6627817a43f2a5 Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期一, 08 八月 2022 18:02:46 +0800
Subject: [PATCH] 修改readme
---
src/views/notice.vue | 43 +++++++++++++++++++++----------------------
1 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/src/views/notice.vue b/src/views/notice.vue
index 907d956..22659f8 100644
--- a/src/views/notice.vue
+++ b/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;">
@@ -24,17 +22,16 @@
</template>
<script>
import axios from 'axios'
-import {getMinTitle,getNewsList} from '../api/api'
+import { getMinTitle, getNewsList } from '../api/api'
export default {
name: 'notice',
data() {
return {
- noticeList: [],
+ noticeList: []
}
},
- created() {
- },
- mounted(){
+ created() {},
+ mounted() {
//鑾峰彇灏忔爣棰�
// axios.get('http://localhost:8080/news_category/list/1').then(res => {
// console.log(res);
@@ -48,27 +45,29 @@
},
methods: {
//鑾峰彇鏂伴椈鍒楄〃
- getnews(){
+ getnews() {
const data = {
- current:1,
- newsCategoryId:42,
- size:6
+ current: 1,
+ newsCategoryId: 42,
+ size: 6
}
- getNewsList(data).then(res => {
- console.log(res);
- if(res.code == 200){
- this.noticeList = res.data.records
- }
- }).catch(error => {
- console.log(error);
- })
+ getNewsList(data)
+ .then(res => {
+ console.log(res)
+ if (res.code == 200) {
+ this.noticeList = res.data.records
+ }
+ })
+ .catch(error => {
+ console.log(error)
+ })
},
// 鍘诲埌鏂伴椈灞曠ず椤�
toNoticeMsg(id) {
this.$router.push({
path: '/home/news',
query: {
- id:id,
+ id: id
}
})
},
@@ -114,4 +113,4 @@
// background-color: rgb(179, 19, 19);
padding: 0 0 0 10px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0