|
@@ -63,30 +63,17 @@
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
- // 初始化页码为1
|
|
|
- this.requestParam.page = 1;
|
|
|
- // 是否是最后一页
|
|
|
- this.isLast = false;
|
|
|
- // 设置请求中
|
|
|
- this.isReqing = true;
|
|
|
- // 登录提示
|
|
|
- if( !this.$checkAccess.alterLogin() ) return ;
|
|
|
- // 请求列表
|
|
|
- this.$http.request('api/orders/get_list',this.requestParam).then((re)=>{
|
|
|
- // 设置非请求中
|
|
|
- this.isReqing = false;
|
|
|
- // 成功结果
|
|
|
- if( re.code == 'success' ){
|
|
|
- if(re.data.last_page <= this.requestParam.page ) this.isLast = true;
|
|
|
- this.orderList = re.data.data;
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
// 登录提示
|
|
|
if( !this.$checkAccess.alterLogin() ) return ;
|
|
|
// 没有数据的话,或者请求中,不允许刷新
|
|
|
- if( this.orderList.length > 0 || this.isReqing ) return ;
|
|
|
+ if( this.isReqing ) return ;
|
|
|
+ // 初始化页码为1
|
|
|
+ this.requestParam.page = 1;
|
|
|
+ // 是否是最后一页
|
|
|
+ this.isLast = false;
|
|
|
// 设置请求中
|
|
|
this.isReqing = true;
|
|
|
// 请求列表
|