培训文档加刷新
This commit is contained in:
@ -23,25 +23,28 @@
|
||||
</div>
|
||||
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.pushUser }}</div>
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
</div>
|
||||
<div class="imgWrap">
|
||||
<img :src="item.themePicture">
|
||||
<div class="name">{{item.name}}</div>
|
||||
</div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<div class="doc flexBetween common">
|
||||
<div class="left">{{ item.docType?.label }}</div>
|
||||
<div class="right">
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px">{{ item.listShowButton==null ? '已处理' : '未处理' }}</span>
|
||||
<span style="opacity: .9;color: #ccc">阅读 {{item.readCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.pushUser }}</div>
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="imgWrap">
|
||||
<img :src="item.themePicture">
|
||||
<div class="name">{{item.name}}</div>
|
||||
</div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<div class="doc flexBetween common">
|
||||
<div class="left">{{ item.docType?.label }}</div>
|
||||
<div class="right">
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px">{{ item.listShowButton==null ? '已处理' : '未处理' }}</span>
|
||||
<span style="opacity: .9;color: #ccc">阅读 {{item.readCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<div class="empty" style="display: flex;justify-content: center;align-items: center;height:calc(100% - 46px);background-color: #FAFAFA" v-show="showEmpty">
|
||||
<img src="@/assets/empty.png" style="width: 100%"/>
|
||||
</div>
|
||||
@ -63,7 +66,8 @@ export default {
|
||||
pageList:[],
|
||||
keyword:'',
|
||||
show:false,
|
||||
showEmpty:false
|
||||
showEmpty:false,
|
||||
isLoading:false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -73,6 +77,13 @@ export default {
|
||||
// handleEnterKey() {
|
||||
// this.getList()
|
||||
// },
|
||||
onRefresh() {
|
||||
this.getList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async getList(){
|
||||
let res= await pageList({
|
||||
pageNum:this.pageNum,
|
||||
@ -119,6 +130,7 @@ export default {
|
||||
padding: 0 8px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20px;
|
||||
.itemWrap{
|
||||
margin-bottom: 16px;
|
||||
@include wh(100%, 300px);
|
||||
|
Reference in New Issue
Block a user