lilei 4 anos atrás
pai
commit
d4b04e1748
3 arquivos alterados com 25 adições e 36 exclusões
  1. 1 1
      libs/axios.js
  2. 23 35
      pages/index/index.vue
  3. 1 0
      pages/work/index/index.vue

+ 1 - 1
libs/axios.js

@@ -49,7 +49,7 @@ const request = (opts, hasToken) => {
 						  const currentRoute = getRoutePath();
 						  const url = `/pages/login/login?lanuch=${currentRoute.lanuch}&path=` + encodeURIComponent(currentRoute.url);
 						  uni.redirectTo({ url });
-						}, 5000);
+						}, 1000);
 					}
 					else{
 						uni.showToast({

+ 23 - 35
pages/index/index.vue

@@ -275,43 +275,31 @@
 			// 扫码洗车
 			scanCode () {
 				let _this = this
-				uni.scanCode({
-				    success: function (res) {
-				        console.log('条码类型:' + res.scanType);
-				        console.log('条码内容:' + res.result);
-						if(res.scanType !== 'WX_CODE'){
-							_this.toashMsg("无法识别此二维码")
-						}
-						uni.navigateTo({
-							url: res.result
-						})
-				    }
-				});
 				// 检验是否登录或登录是否过期
-				// checkLogin().then(res => {
-				// 	if (res.status == '200') {
-				// 		uni.scanCode({
-				// 		    success: function (res) {
-				// 		        console.log('条码类型:' + res.scanType);
-				// 		        console.log('条码内容:' + res.result);
-				// 				if(res.scanType !== 'WX_CODE'){
-				// 					_this.toashMsg("无法识别此二维码")
-				// 				}
-				// 				uni.navigateTo({
-				// 					url: res.result
-				// 				})
-				// 		    }
-				// 		});
+				checkLogin().then(res => {
+					if (res.status == '200') {
+						uni.scanCode({
+						    success: function (res) {
+						        console.log('条码类型:' + res.scanType);
+						        console.log('条码内容:' + res.result);
+								// if(res.scanType !== 'WX_CODE'){
+								// 	_this.toashMsg("无法识别此二维码")
+								// }
+								uni.navigateTo({
+									url: res.result
+								})
+						    }
+						});
 						
-				// 		// uni.navigateTo({
-				// 		// 	url: `/pages/getOrder/getOrder?scene=100037,9998`
-				// 		// })
-				// 	} else if (res.status == '9001') {
-				// 		uni.navigateTo({
-				// 			url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/index/index')
-				// 		})
-				// 	}
-				// })
+						// uni.navigateTo({
+						// 	url: `/pages/getOrder/getOrder?scene=100037,9998`
+						// })
+					} else if (res.status == '9001') {
+						uni.navigateTo({
+							url: `/pages/login/login?lanuch=${false}&path=` + encodeURIComponent('/pages/index/index')
+						})
+					}
+				})
 			},
 			// 创建标记点 OPEN :正常营业  CLOSED:暂停营业  TO_BE_OPENED:待开业
 			createMarker(point) {

+ 1 - 0
pages/work/index/index.vue

@@ -151,6 +151,7 @@ export default {
 					this.curWorkStutesText= e.data.msgCodeInfo
 					// 显示复位提示弹框
 					this.showStop = true;
+					this.status = 'stop';
 					this.stopWashCarSuccess();
 				}
 				// 急停