|
@@ -37,10 +37,10 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- // 没有数据的话,或者请求中,不允许刷新
|
|
|
- if( this.isReqing ) return ;
|
|
|
// 登录提示
|
|
|
if( !this.$checkAccess.alterLogin() ) return ;
|
|
|
+ // 没有数据的话,或者请求中,不允许刷新
|
|
|
+ if( this.isReqing ) return ;
|
|
|
// 请求参数
|
|
|
this.requestParam.page = 1;
|
|
|
// 是否是最后一页
|
|
@@ -59,10 +59,10 @@
|
|
|
});
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
- // 如果请求中,不允许请求,
|
|
|
- if( this.isReqing ) return uni.stopPullDownRefresh();;
|
|
|
// 登录提示
|
|
|
if( !this.$checkAccess.alterLogin() ) return uni.stopPullDownRefresh();
|
|
|
+ // 如果请求中,不允许请求,
|
|
|
+ if( this.isReqing ) return uni.stopPullDownRefresh();
|
|
|
// 初始化页码为1
|
|
|
this.requestParam.page = 1;
|
|
|
// 是否是最后一页
|
|
@@ -82,14 +82,14 @@
|
|
|
uni.stopPullDownRefresh();
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
+ // 登录提示
|
|
|
+ if( !this.$checkAccess.alterLogin() ) return ;
|
|
|
// 如果页码是0,避免第一页重复
|
|
|
if( this.requestParam.page < 1 ) return;
|
|
|
// 最后一页不再请求
|
|
|
if( this.isLast ) return;
|
|
|
// 请求中,不再请求
|
|
|
if( this.isReqing ) return;
|
|
|
- // 登录提示
|
|
|
- if( !this.$checkAccess.alterLogin() ) return ;
|
|
|
// 增加一页
|
|
|
this.requestParam.page = this.requestParam.page+1;
|
|
|
// 设置请求中
|