zaijin há 3 anos atrás
pai
commit
1b050b41d0
1 ficheiros alterados com 12 adições e 6 exclusões
  1. 12 6
      pages/parkingLock/parkingLock.vue

+ 12 - 6
pages/parkingLock/parkingLock.vue

@@ -244,16 +244,13 @@
 				this.orderList.push(page.orderId)
 				this.deviceNo = page.deviceNo
 			} else {
-				this.tipsMsg = page.msg
+				this.tipsMsg = page.msg || '参数丢失!';
 				this.parkingLockStatus = 5
 			}
 		},
 		onShow() {
 			if (this.orderId) {
 				this.timer1 = setInterval(() => {
-					// uni.showLoading({
-					//     title: '订单查询中'
-					// });
 					this.show = true
 					this.getOrderDetails(this.orderId)
 				}, 2000)
@@ -381,8 +378,7 @@
 				// });
 				this.$u.api.getOrderDetail({
 						id: id
-					})
-					.then(res => {
+					}).then(res => {
 
 						console.log(res)
 						if (res.code === 200) {
@@ -408,6 +404,11 @@
 								this.checkEqupment()
 							}
 						}
+					}).catch(() => {
+						this.$refs.uToast.show({
+							title: '程序错误!订单Id:' + id,
+							type: 'error',
+						});
 					})
 			},
 			// 检测设备
@@ -434,6 +435,11 @@
 								this.parkingLockStatus = 3
 							}
 						}
+					}).catch(() => {
+						this.$refs.uToast.show({
+							title: '程序错误!订单编号:' + orderNo,
+							type: 'error',
+						});
 					})
 			},
 			// 返回首页