|
@@ -79,7 +79,7 @@
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tabsList = res.data;
|
|
|
- this.getList(0, 1, 10, this.tabsList[0].text);
|
|
|
+ this.getList(1, 10);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -118,16 +118,15 @@
|
|
|
},
|
|
|
/**
|
|
|
* 获取列表
|
|
|
- * @param { Number } idx
|
|
|
* @param { Number } pageNum
|
|
|
* @param { Number } pageSize
|
|
|
* @param { Number } artCategoryId
|
|
|
*/
|
|
|
- getList(idx, pageNum, pageSize, artCategoryId) {
|
|
|
+ getList(pageNum, pageSize) {
|
|
|
this.$u.api.policyInfo.getPolicyInfoList({
|
|
|
pageNum,
|
|
|
pageSize,
|
|
|
- artCategoryId
|
|
|
+ artCategoryId: this.tabsList[this.tabCurrent].text
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$refs.policyInfoPaging.complete(res.rows || []);
|
|
@@ -136,28 +135,28 @@
|
|
|
icon: 'none',
|
|
|
title: res.msg
|
|
|
});
|
|
|
- this.$refs.policyInfoPaging.complete([]);
|
|
|
+ this.$refs.policyInfoPaging.complete(false);
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
- // console.log("err: ",err);
|
|
|
uni.showToast({
|
|
|
title: '系统异常!',
|
|
|
type: 'error'
|
|
|
});
|
|
|
- this.$refs.policyInfoPaging.complete([]);
|
|
|
+ this.$refs.policyInfoPaging.complete(false);
|
|
|
});
|
|
|
},
|
|
|
// tab栏切换
|
|
|
tabsChange(index) {
|
|
|
this.tabCurrent = index;
|
|
|
- this.getList(index, 1, 10, this.tabsList[index]?.text);
|
|
|
+ this.$refs.policyInfoPaging.reload(true);
|
|
|
+ // this.getList(1, 10, this.tabsList[index]?.text);
|
|
|
},
|
|
|
/**
|
|
|
* 列表加载触发
|
|
|
*/
|
|
|
policyInfoQueryList(pageNo, pageSize) {
|
|
|
if (this.tabsList.length > 0) {
|
|
|
- this.getList(this.tabCurrent, pageNo, pageSize, this.tabsList[this.tabCurrent]?.text);
|
|
|
+ this.getList(pageNo, pageSize);
|
|
|
}
|
|
|
},
|
|
|
/**
|