|
|
@@ -5,21 +5,23 @@ |
|
|
|
<!-- <div @click="goparticulars">
|
|
|
|
<detail v-for="(item, index) in newsList" :key="index" />
|
|
|
|
</div> -->
|
|
|
|
<div class="detailBox" v-for="(item, index) in newsList" :key="index" @click="goparticulars(item)">
|
|
|
|
<div class="imgBox">
|
|
|
|
<img class="img" :src="item.mainPicRealPath" />
|
|
|
|
<div class="text">
|
|
|
|
<h3>{{item.title}}</h3>
|
|
|
|
<p v-html="item.content"></p>
|
|
|
|
<span class="time">{{item.publishDate}} <span class="el-icon-view"> {{item.view}}</span></span>
|
|
|
|
<div class="newsList">
|
|
|
|
<div class="detailBox" v-for="(item, index) in newsList" :key="index" @click="goparticulars(item)">
|
|
|
|
<div class="imgBox">
|
|
|
|
<img class="img" :src="item.mainPicRealPath" />
|
|
|
|
<div class="text">
|
|
|
|
<h3>{{item.title}}</h3>
|
|
|
|
<p v-html="item.content"></p>
|
|
|
|
<span class="time">{{item.publishDate}} <span class="el-icon-view"> {{item.view}}</span></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-pagination class="pagination" :current-page.sync="paging.pageNum" :page-size="paging.pageSize" @current-change="handleCurrentChange"
|
|
|
|
background
|
|
|
|
layout="prev, pager, next"
|
|
|
|
:total="paging.total">
|
|
|
|
</el-pagination>
|
|
|
|
</div>
|
|
|
|
<el-pagination :current-page.sync="paging.pageNum"
|
|
|
|
background
|
|
|
|
layout="prev, pager, next"
|
|
|
|
:total="paging.total">
|
|
|
|
</el-pagination>
|
|
|
|
</div>
|
|
|
|
<sidebar />
|
|
|
|
</div>
|
|
|
@@ -64,7 +66,10 @@ export default { |
|
|
|
this.paging.total = Number(res.total)
|
|
|
|
this.newsList = res.list
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
this.getNewsList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.getNewsList()
|
|
|
@@ -72,9 +77,18 @@ export default { |
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.el-pagination{
|
|
|
|
|
|
|
|
.newsList{
|
|
|
|
height: 550px;
|
|
|
|
overflow: auto;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
.newsList .el-pagination{
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 20px;
|
|
|
|
position:absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 40%;
|
|
|
|
}
|
|
|
|
.detailBox {
|
|
|
|
margin-top: 30px;
|
|
|
|