Sfoglia il codice sorgente

【Mod】刷新订单信息

liuxiangxin 6 mesi fa
parent
commit
bbb14c4226
1 ha cambiato i file con 6 aggiunte e 19 eliminazioni
  1. 6 19
      pages/orders/index.vue

+ 6 - 19
pages/orders/index.vue

@@ -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;
 			// 请求列表