| 
					
				 | 
			
			
				@@ -309,38 +309,41 @@ const useStores = defineStore("useStores", { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     GetWxOpenId(type, options) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       let url = "https://manager.usky.cn/mobile/#/" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (type == 1 && common.isWechatMp()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (localStorage.getItem("wxOpenId") && localStorage.getItem("App-Token")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          getPageAuthorization({ openId: localStorage.getItem("wxOpenId") }).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.data?.openid && res.data?.accessToken) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              window.location.href = `${url}pages/index`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.LogOut().then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                localStorage.removeItem("wxOpenId") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                localStorage.removeItem("App-Token") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = config.baseUrl + "/service-iot/weChat/getFirst1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(localStorage.getItem("wxOpenId")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(localStorage.getItem("App-Token")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            window.location.href = `${url}pages/index`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            getPageAuthorization({ openId: localStorage.getItem("wxOpenId") }).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if (res?.data?.openid && res?.data?.accessToken) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                window.location.href = `${url}pages/index`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.LogOut().then() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (window.location.href.indexOf("openId=") == -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             window.location.href = config.baseUrl + "/service-iot/weChat/getFirst1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             localStorage.setItem("wxOpenId", common.getUrlList().openId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            GetWxOpenId(1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } else if (type == 2 && common.isWechatMp()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (localStorage.getItem("wxOpenId") && localStorage.getItem("App-Token")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          getPageAuthorization({ openId: localStorage.getItem("wxOpenId") }).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (!res.data?.openid || !res.data?.accessToken) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              this.LogOut().then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                localStorage.removeItem("wxOpenId") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                localStorage.removeItem("App-Token") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                window.location.href = config.baseUrl + "/service-iot/weChat/getFirst1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          window.location.href = config.baseUrl + "/service-iot/weChat/getFirst1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(localStorage.getItem("wxOpenId")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          if(!localStorage.getItem("App-Token")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            getPageAuthorization({ openId: localStorage.getItem("wxOpenId") }).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              if (res?.data?.openid && res?.data?.accessToken) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                window.location.href = `${url}pages/index`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.LogOut().then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  window.location.href = `${url}pages/login`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            window.location.href = config.baseUrl + "/service-iot/weChat/getFirst1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 |