|
@@ -17,8 +17,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view style="padding-top: 30vh;"><u-empty :text="noDataText" v-if="list.length == 0 && status != 'loading'" mode="list"></u-empty></view>
|
|
|
- <view style="padding: 20upx;"><u-loadmore v-if="total > pageSize || status == 'loading'" :status="status" /></view>
|
|
|
+ <u-empty style="padding-top: 30vh;" :text="noDataText" v-if="list.length == 0 && status != 'loading'" mode="list"></u-empty>
|
|
|
+ <view style="padding: 20upx;" v-if="total > pageSize || status == 'loading'"><u-loadmore :status="status" /></view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -55,9 +55,7 @@ export default {
|
|
|
this.getList();
|
|
|
// 刷新列表
|
|
|
uni.$on('updateCheckTaskConfigList', () => {
|
|
|
- this.pageNo = 1;
|
|
|
- this.list = [];
|
|
|
- this.getList();
|
|
|
+ this.getList(1);
|
|
|
});
|
|
|
},
|
|
|
// 新增
|
|
@@ -70,7 +68,6 @@ export default {
|
|
|
onReachBottom() {
|
|
|
console.log('onReachBottom');
|
|
|
if (this.list.length < this.total) {
|
|
|
- this.pageNo++;
|
|
|
this.getList();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -82,14 +79,19 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取列表
|
|
|
- getList() {
|
|
|
+ getList(pageNo) {
|
|
|
let _this = this;
|
|
|
+ if(pageNo==1){
|
|
|
+ this.pageNo = 1
|
|
|
+ this.list = []
|
|
|
+ }
|
|
|
let params = {
|
|
|
pageNo: this.pageNo,
|
|
|
pageSize: this.pageSize
|
|
|
};
|
|
|
this.status = 'loading';
|
|
|
getCheckTaskConfigList(params).then(res => {
|
|
|
+ console.log(res)
|
|
|
if (res.status == 200) {
|
|
|
let list = res.data.list;
|
|
|
if (_this.pageNo > 1) {
|
|
@@ -98,6 +100,7 @@ export default {
|
|
|
_this.list = list;
|
|
|
}
|
|
|
_this.total = res.data.count;
|
|
|
+ _this.pageNo++;
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.message,
|