소스 검색

parkingLock页面没有订单ID不继续往下的业务逻辑

tianhui 3 년 전
부모
커밋
06e0478bca
1개의 변경된 파일11개의 추가작업 그리고 7개의 파일을 삭제
  1. 11 7
      pages/parkingLock/parkingLock.vue

+ 11 - 7
pages/parkingLock/parkingLock.vue

@@ -139,14 +139,18 @@
 			}
 		},
 		onShow() {
+			if(this.orderId){
+				this.timer1 = setInterval(() => {
+					// uni.showLoading({
+					//     title: '订单查询中'
+					// });
+					this.show = true
+					this.getOrderDetails(this.orderId)
+				}, 2000)				
+			}else{
+				this.show = false
+			}
 			
-			this.timer1 = setInterval(() => {
-				// uni.showLoading({
-				//     title: '订单查询中'
-				// });
-				this.show = true
-				this.getOrderDetails(this.orderId)
-			}, 2000)
 		},
 		onHide() {
 			if (this.timer) {