空白格 3 tahun lalu
induk
melakukan
06f2b0ad3d
3 mengubah file dengan 29 tambahan dan 16 penghapusan
  1. 2 2
      common/config.js
  2. 11 8
      common/http.interceptor.js
  3. 16 6
      pages/parkingLock/parkingLock.vue

+ 2 - 2
common/config.js

@@ -2,8 +2,8 @@ const config = {
 	// wxAppid:'wxbe90cc7c5233dd84',// 测试wxAppid 
 	// wxAppid: 'wx45c3cf2b632f5fd5', // 正式wxAppid
 	
-	baseUrl:'https://wx.hw.hongweisoft.com/parking',// 64服务器
-	// baseUrl: 'https://parking.pdzhtc.com', //正式接口访问地址
+	// baseUrl:'https://wx.hw.hongweisoft.com/parking',// 64服务器
+	baseUrl: 'https://parking.pdzhtc.com', //正式接口访问地址
 }
 export {
 	config

+ 11 - 8
common/http.interceptor.js

@@ -54,21 +54,24 @@ const install = (Vue, vm) => {
 				localStorage.clear()
 			} else {
 				localStorage.setItem('backUrl', location.href)
+				localStorage.removeItem('lifeData')
 				uni.showModal({
 					title: '提示',
-					content: '用户未注册或注册信息已失效, 请重新登录',
-					success: function (res) {
+					content: '未查询到登录信息或信息已失效, 请重新登录',
+					showCancel: false,
+					success: function(res) {
 						if (res.confirm) {
 							uni.navigateTo({
 								url: "/pages/center/phoneLogin/phoneLogin"
 							})
-						} else if (res.cancel) {
-							uni.showToast({
-								title: '您已取消跳转到登录页',
-								icon: 'none',
-								duration: 3000
-							})
 						}
+						// else if (res.cancel) {
+						// 	uni.showToast({
+						// 		title: '您已取消跳转到登录页',
+						// 		icon: 'none',
+						// 		duration: 3000
+						// 	})
+						// }
 					}
 				});
 			}

+ 16 - 6
pages/parkingLock/parkingLock.vue

@@ -247,7 +247,7 @@
 				//添加车牌弹窗
 				ShowaddvehicleNo: false,
 				// 车位锁状态 1:支付 2:开始开锁 3:开锁中 4:开锁完成
-				parkingLockStatus: 1,
+				parkingLockStatus: 0,
 				// 支付方式选择弹框
 				payWayPop: false,
 				// 订单编号
@@ -441,7 +441,8 @@
 				}).then(res => {
 
 					console.log(res)
-					if (res.code === 200) {
+					if (res.code === 200 && res.data.id) {
+						this.parkingLockStatus = 1
 						// 获取页面完整url
 						const local = window.location.href
 						// 获取url后面的参数
@@ -461,6 +462,15 @@
 							clearInterval(this.timer1)
 							this.checkEqupment()
 						}
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg || '订单无数据',
+							type: 'error',
+						});
+						this.show = false;
+						if (this.timer1) {
+							clearInterval(this.timer1)
+						}
 					}
 				}).catch(() => {
 					this.show = false;
@@ -494,10 +504,10 @@
 							}
 						}
 					}).catch(() => {
-						this.$refs.uToast.show({
-							title: '程序错误!订单编号:' + orderNo,
-							type: 'error',
-						});
+						// this.$refs.uToast.show({
+						// 	title: '程序错误!订单编号:' + orderNo,
+						// 	type: 'error',
+						// });
 					})
 			},
 			// 返回首页