|
@@ -75,9 +75,9 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
- this.getRow();
|
|
|
|
|
|
+ this.resetPage();
|
|
uni.$on("updatePointTaskList",()=>{
|
|
uni.$on("updatePointTaskList",()=>{
|
|
- this.getRow(1);
|
|
|
|
|
|
+ this.resetPage();
|
|
})
|
|
})
|
|
},
|
|
},
|
|
onUnload() {
|
|
onUnload() {
|
|
@@ -93,9 +93,9 @@ export default {
|
|
// tabs通知swiper切换
|
|
// tabs通知swiper切换
|
|
tabsChange(index) {
|
|
tabsChange(index) {
|
|
this.swiperCurrent = index;
|
|
this.swiperCurrent = index;
|
|
|
|
+ this.resetPage();
|
|
},
|
|
},
|
|
swiperChange(event) {
|
|
swiperChange(event) {
|
|
- console.log(event.detail);
|
|
|
|
this.list = [];
|
|
this.list = [];
|
|
this.status = 'loading';
|
|
this.status = 'loading';
|
|
},
|
|
},
|
|
@@ -108,16 +108,13 @@ export default {
|
|
// swiper滑动结束,分别设置tabs和swiper的状态
|
|
// swiper滑动结束,分别设置tabs和swiper的状态
|
|
animationfinish(e) {
|
|
animationfinish(e) {
|
|
let current = e.detail.current;
|
|
let current = e.detail.current;
|
|
- if (current != this.current) {
|
|
|
|
- this.$refs.uTabs.setFinishCurrent(current);
|
|
|
|
- this.swiperCurrent = current;
|
|
|
|
- this.current = current;
|
|
|
|
- this.getRow();
|
|
|
|
- }
|
|
|
|
|
|
+ this.$refs.uTabs.setFinishCurrent(current);
|
|
|
|
+ this.swiperCurrent = current;
|
|
|
|
+ this.current = current;
|
|
|
|
+ this.resetPage();
|
|
},
|
|
},
|
|
// scroll-view到底部加载更多
|
|
// scroll-view到底部加载更多
|
|
onreachBottom() {
|
|
onreachBottom() {
|
|
- console.log(this.list.length, this.total);
|
|
|
|
if (this.list.length < this.total) {
|
|
if (this.list.length < this.total) {
|
|
this.pageNo += 1;
|
|
this.pageNo += 1;
|
|
this.getRow();
|
|
this.getRow();
|
|
@@ -125,6 +122,11 @@ export default {
|
|
this.status = 'nomore';
|
|
this.status = 'nomore';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ resetPage(){
|
|
|
|
+ this.status = 'loading';
|
|
|
|
+ this.list = [];
|
|
|
|
+ this.getRow(1);
|
|
|
|
+ },
|
|
// 查询列表
|
|
// 查询列表
|
|
getRow(pageNo) {
|
|
getRow(pageNo) {
|
|
let _this = this;
|
|
let _this = this;
|