From cae892f7fa165fadbf0c4e8928846f715cda7a88 Mon Sep 17 00:00:00 2001 From: 明梦爽 <2972214568@qq.com> Date: 星期三, 23 三月 2022 18:29:30 +0800 Subject: [PATCH] 增加介绍文档 --- src/views/homePage/moreMessage.vue | 80 +++++++++++++++++++++++---------------- 1 files changed, 47 insertions(+), 33 deletions(-) diff --git a/src/views/homePage/moreMessage.vue b/src/views/homePage/moreMessage.vue index 88b6789..7b25d0d 100644 --- a/src/views/homePage/moreMessage.vue +++ b/src/views/homePage/moreMessage.vue @@ -17,14 +17,14 @@ </li> </ul> <!-- 鍒嗛〉 --> - <div class="fenye"> + <div> <el-pagination background - @current-change="handleCurrentChange" - :current-page.sync="currentPage" + @current-change="handleCurrentChange1" + :current-page="currentPagenotice" :page-size="pageSize" layout="prev, pager, next,total" - :total="total"> + :total="totalnotice"> </el-pagination> </div> </el-card> @@ -43,14 +43,14 @@ </li> </ul> <!-- 鍒嗛〉 --> - <div class="fenye"> + <div> <el-pagination background - @current-change="handleCurrentChange" - :current-page.sync="currentPage" + @current-change="handleCurrentChange2" + :current-page.sync="currentPageschool" :page-size="pageSize" layout="prev, pager, next,total" - :total="total"> + :total="totalschool"> </el-pagination> </div> </el-card> @@ -70,14 +70,14 @@ </li> </ul> <!-- 鍒嗛〉 --> - <div class="fenye"> + <div> <el-pagination background - @current-change="handleCurrentChange" - :current-page.sync="currentPage" + @current-change="handleCurrentChange3" + :current-page.sync="currentPagework" :page-size="pageSize" layout="prev, pager, next,total" - :total="total"> + :total="totalwork"> </el-pagination> </div> </el-card> @@ -95,9 +95,13 @@ noticeList: [], schoolList: [], workList: [], - currentPage:1, - pageSize:4, - total:0, + currentPagenotice:1, //閫氱煡鍏憡鐨勫綋鍓嶉〉 + currentPageschool:1, //瀛﹂櫌鍔ㄦ�佺殑褰撳墠椤� + currentPagework:1, //宸ヤ綔鍔ㄦ�佺殑褰撳墠椤� + pageSize:10, + totalnotice:0, //閫氱煡鍏憡鏂伴椈鐨勬�绘潯鏁� + totalschool:0, //瀛﹂櫌鍔ㄦ�佹柊闂荤殑鎬绘潯鏁� + totalwork:0, //宸ヤ綔鍔ㄦ�佹柊闂荤殑鎬绘潯鏁� } }, mounted(){ @@ -106,24 +110,36 @@ this.getschool(); }, methods: { - handleCurrentChange(val){ - console.log(`褰撳墠椤�: ${val}`); + //閫氱煡鍏憡鐨勫垎椤靛垏鎹� + handleCurrentChange1(val){ + // console.log(`褰撳墠椤�: ${val}`); + this.currentPagenotice = val; this.getnotice(); - this.getwork(); + }, + //瀛﹂櫌鍔ㄦ�佺殑鍒嗛〉鍒囨崲 + handleCurrentChange2(val){ + // console.log(`褰撳墠椤�: ${val}`); + this.currentPageschool = val; this.getschool(); + }, + //宸ヤ綔鍔ㄦ�佺殑鍒嗛〉鍒囨崲 + handleCurrentChange3(val){ + // console.log(`褰撳墠椤�: ${val}`); + this.currentPagework = val; + this.getwork(); }, //鑾峰彇鏂伴椈鍒楄〃 getnotice(){ const data = { - current:this.currentPage, + current:this.currentPagenotice, newsCategoryId:42, size:this.pageSize } getNewsList(data).then(res => { - console.log(res); + // console.log(res); if(res.code == 200){ this.noticeList = res.data.records - this.total = Number(res.data.total) + this.totalnotice = res.data.total } }).catch(error => { console.log(error); @@ -131,15 +147,15 @@ }, getwork(){ const data = { - current:this.currentPage, + current:this.currentPagework, newsCategoryId:43, size:this.pageSize } getNewsList(data).then(res => { - console.log(res); + // console.log(res); if(res.code == 200){ this.workList = res.data.records - this.total = Number(res.data.total) + this.totalwork = Number(res.data.total) } }).catch(error => { console.log(error); @@ -147,15 +163,15 @@ }, getschool(){ const data = { - current:this.currentPage, + current:this.currentPageschool, newsCategoryId:44, size:this.pageSize } getNewsList(data).then(res => { - console.log(res); + // console.log(res); if(res.code == 200){ this.schoolList = res.data.records - this.total = Number(res.data.total) + this.totalschool = Number(res.data.total) } }).catch(error => { console.log(error); @@ -196,7 +212,7 @@ border-bottom: 1px solid #0f99e9; } .lieBiao { - width: 95%; + width: 100%; height: 60px; background: rgb(241, 241, 241); margin-bottom: 10px; @@ -204,14 +220,12 @@ .time { width: 100px; padding: 17px 0px; - display: flex; - flex-direction: column; background-color: rgb(1, 72, 153); color: white; text-align: center; } .title { - width: 550px; + width: 980px; height: 50px; overflow: hidden; line-height: 60px; @@ -219,7 +233,7 @@ padding: 0 0 0 10px; } .ul{ - width: 700px; - margin: 0 auto; + width: 1100px; + margin: 0; } </style> \ No newline at end of file -- Gitblit v1.8.0