|
@ -8,15 +8,15 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="listcard-content"> |
|
|
<view class="listcard-content"> |
|
|
<view class="listcard-content_title"> |
|
|
<view class="listcard-content_title"> |
|
|
<text>{{item.code}}</text> |
|
|
<text>{{item.params}}</text> |
|
|
<text class="text2">{{item.ctime | formatCreateTime }}</text> |
|
|
<text class="text2">{{item.cdate}}</text> |
|
|
</view> |
|
|
</view> |
|
|
<text class="listcard-content_title_text">{{item.params}}</text> |
|
|
<text class="listcard-content_title_text">{{item.content}}</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <uni-load-more :status="loadingType"></uni-load-more> --> |
|
|
<uni-load-more :status="loadingType"></uni-load-more> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
@ -31,6 +31,7 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
|
|
|
loadingType: 'more', //加载更多状态 |
|
|
pic1: "http://mall.yyundong.com/wl.png", |
|
|
pic1: "http://mall.yyundong.com/wl.png", |
|
|
pic2: "http://mall.yyundong.com/tx.png", |
|
|
pic2: "http://mall.yyundong.com/tx.png", |
|
|
pic3: "http://mall.yyundong.com/tz.png", |
|
|
pic3: "http://mall.yyundong.com/tz.png", |
|
@ -59,6 +60,8 @@ |
|
|
// this.loadData(); |
|
|
// this.loadData(); |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
|
|
|
this.pageNum = 1; |
|
|
|
|
|
this.goodsList = []; |
|
|
this.loadData(); |
|
|
this.loadData(); |
|
|
}, |
|
|
}, |
|
|
onPageScroll(e) { |
|
|
onPageScroll(e) { |
|
@ -73,6 +76,10 @@ |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.pageNum = 1; |
|
|
this.pageNum = 1; |
|
|
this.loadData('refresh'); |
|
|
this.loadData('refresh'); |
|
|
|
|
|
setTimeout(function() { |
|
|
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
|
|
}, 2000); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
//加载更多 |
|
|
//加载更多 |
|
|
onReachBottom() { |
|
|
onReachBottom() { |
|
@ -105,21 +112,21 @@ |
|
|
} else { |
|
|
} else { |
|
|
this.loadingType = 'more'; |
|
|
this.loadingType = 'more'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let params = { |
|
|
let params = { |
|
|
// pageNum: this.pageNum |
|
|
pageNum: this.pageNum |
|
|
}; |
|
|
}; |
|
|
|
|
|
console.log("pageNum>>>>>", this.pageNum) |
|
|
|
|
|
|
|
|
let list = await Api.apiCall('get', Api.member.mesList, params); |
|
|
let list = await Api.apiCall('get', Api.member.mesList, params); |
|
|
console.log("消息列表", list) |
|
|
console.log("消息列表", list) |
|
|
this.goodsList = list; |
|
|
// this.goodsList = list; |
|
|
// let goodsList = await this.$api.json('goodsList'); |
|
|
// let goodsList = await this.$api.json('goodsList'); |
|
|
// if (type === 'refresh') { |
|
|
if (type === 'refresh') { |
|
|
// this.goodsList = []; |
|
|
this.goodsList = []; |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
// this.goodsList = this.goodsList.concat(goodsList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.goodsList = this.goodsList.concat(list.records); |
|
|
|
|
|
console.log("消息列表>>>>>", this.goodsList.length) |
|
|
//判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了) |
|
|
//判断是否还有下一页,有是more 没有是nomore(测试数据判断大于20就没有了) |
|
|
this.loadingType = this.goodsList.length > list.total ? 'nomore' : 'more'; |
|
|
this.loadingType = this.goodsList.length > list.total ? 'nomore' : 'more'; |
|
|
if (type === 'refresh') { |
|
|
if (type === 'refresh') { |
|
@ -208,6 +215,7 @@ |
|
|
|
|
|
|
|
|
.text2 { |
|
|
.text2 { |
|
|
color: #999; |
|
|
color: #999; |
|
|
|
|
|
margin-right: 10px; |
|
|
font-size: 18px; |
|
|
font-size: 18px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|