瀏覽代碼

bug 修复

lilei 4 年之前
父節點
當前提交
6f51bc955f
共有 2 個文件被更改,包括 17 次插入20 次删除
  1. 13 10
      libs/axios.js
  2. 4 10
      pages/work/index/index.vue

+ 13 - 10
libs/axios.js

@@ -40,16 +40,19 @@ const request = (opts, hasToken) => {
 					resolve(ret)
 				}else{
 					if(ret.status == '401'){  //  未登录或登录过期
-						uni.showToast({
-							icon:'none',
-							title: '未登录或登录已过期,请重新登录',
-							duration: 5000 
-						})
-						setTimeout(function() {
-						  const currentRoute = getRoutePath();
-						  const url = `/pages/login/login?lanuch=${currentRoute.lanuch}&path=` + encodeURIComponent(currentRoute.url);
-						  uni.redirectTo({ url });
-						}, 1000);
+					    // 除过查询未完成订单的请求
+						if(opts.url.indexOf("order/unFinishedOrderRunStatus")<0){
+							uni.showToast({
+								icon:'none',
+								title: '未登录或登录已过期,请重新登录',
+								duration: 5000 
+							})
+							setTimeout(function() {
+							  const currentRoute = getRoutePath();
+							  const url = `/pages/login/login?lanuch=${currentRoute.lanuch}&path=` + encodeURIComponent(currentRoute.url);
+							  uni.redirectTo({ url });
+							}, 1000);
+						}
 					}
 					else{
 						if(!(ret.status == 500 && opts.url.indexOf("store/validateStoreAndDevice")>=0)){

+ 4 - 10
pages/work/index/index.vue

@@ -222,6 +222,10 @@ export default {
 					if(e.data.msgCode == "PAUSE"){
 						this.startWashCarFail()
 					}
+					// 停车位置不正确,
+					if(e.data.msgCode=="TCWZ_CW"){
+						this.devError(e.data.msgCodeInfo)
+					}
 					// 重新进入页面且还未启动洗车时
 					if(e.data.msgCode == "PAID"){
 						// 更新当前倒计时
@@ -281,16 +285,6 @@ export default {
 					else if(e.data.msgCode=="FW_SUCC"){
 						this.resetRabtSuccess()
 					}
-					// 停车位置不正确,
-					else if(e.data.msgCode=="TCWZ_CW"){
-						this.curWorkStutesText= e.data.msgCodeInfo
-						this.showError = true
-					}
-					// 停车位置正确
-					else if(e.data.msgCode=="TCWZ_ZQ"){
-						this.curWorkStutesText= e.data.msgCodeInfo
-						this.showError = false
-					}
 					// 设备离线,设备异常,暂停营业或复位失败,设备使用中
 					else if(e.data.msgCode=="PAUSE" || e.data.msgCode == "FW_FAIL" || e.data.msgCode == 'ERROR' || e.data.msgCode == 'SB_SYZ'){
 						if(this.status != "error-end"){