From 013c334556cc87aa52ae1bce65eaa67e54125587 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 20 一月 2026 15:31:25 +0800
Subject: [PATCH] 修正 自动登录报异常行为

---
 .env.development                                                       |    2 +-
 .env.production                                                        |    8 ++++----
 src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue |   23 +++++++++++++++--------
 3 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/.env.development b/.env.development
index 8f619ba..74294f0 100644
--- a/.env.development
+++ b/.env.development
@@ -10,7 +10,7 @@
 # VUE_APP_BASE_API = 'http://220.189.218.155:9010/API/'
 # VUE_APP_BASE_API = 'http://localhost:8082/LuBaoAPI/'
 #閿﹂殕
-# VUE_APP_BASE_API = 'http://192.168.1.11/API/'
+VUE_APP_BASE_API_INNER = 'http://192.168.1.11/API/'
 VUE_APP_BASE_API = http://61.174.29.234:8880/API/
 #鏉滆春
 # VUE_APP_BASE_API = http://localhost:8082/API/
diff --git a/.env.production b/.env.production
index 88d9951..6b9d2a0 100644
--- a/.env.production
+++ b/.env.production
@@ -5,11 +5,11 @@
 ENV = 'production'
 
 # 瀹佹尝 鍥涚淮灏�
-# VUE_APP_BASE_API = http://192.168.0.236:9010/API/
-# VUE_APP_BASE_API = http://220.189.218.155:9010/API/
+VUE_APP_BASE_API_INNER = http://192.168.0.236:9010/API/
+VUE_APP_BASE_API = http://220.189.218.155:9010/API/
 # 浣欏 閿﹂殕 鏅鸿兘瀹跺眳
-# VUE_APP_BASE_API = http://192.168.1.11/API/
-VUE_APP_BASE_API = http://61.174.29.234:8880/API/
+# VUE_APP_BASE_API_INNER = http://192.168.1.11/API/
+# VUE_APP_BASE_API = http://61.174.29.234:8880/API/
 # 鏅轰簯杩堟�滾-MOM绠$悊绯荤粺/鐢熶骇鐜
 # VUE_APP_BASE_API = http://47.96.97.237/API/
 #鏉滆春
diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
index 25fc7de..694dd7d 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
@@ -291,13 +291,13 @@
     },
     async created() {
         await this.loging();                                            //鑷姩鐧诲綍
-        this.judgeIsLoging();                                           //鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
+        await this.judgeIsLoging();                                           //鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
         await this.get_OrganizationList();                              //椤甸潰鍒濆鍖� 鑾峰彇缁勭粐涓嬫媺鍒楄〃鏁版嵁
         await this.initPageData();                                      //椤甸潰鍒濆鍖�
     },
     methods: {
         //#region 鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
-        judgeIsLoging(){
+        async judgeIsLoging(){
             if (sessionStorage["login"] != "login") {
                 this.$modal.msgError("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛侊紒");
                 this.$router.push({ path: "/" }).catch(() => { })
@@ -306,7 +306,7 @@
         //#endregion
 
         //#region 椤甸潰鍒濆鍖�
-        initPageData(){
+        async initPageData(){
             var params = this.get_UrlVars();
             var OperationType = params[params[0]];      //鎿嶄綔绫诲瀷
 
@@ -729,11 +729,11 @@
 
             if (HOrgID == 0) {
                 //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
-                if (sessionStorage.login != "login") {
-                    this.$modal.msgError("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�!");
-                    this.$router.push({ path: "/" }).catch(() => { })
-                }
-                return;
+                // if (sessionStorage.login != "login") {
+                //     this.$modal.msgError("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�!");
+                //     this.$router.push({ path: "/" }).catch(() => { })
+                // }
+                // return;
             }
 
             var sql_getHOrgName = "select HName from Xt_Organizations where HItemID = " + HOrgID;
@@ -763,6 +763,8 @@
                 this.$router.push({ path: "/" }).catch(() => { })
             });
 
+
+            // 鍐欏叆sessionStorage 闇�瑕佹椂闂达紝鍚庣画鎿嶄綔闇�瑕佺瓑寰� 鍐欏叆sessionStorage瀹屾垚鍚庡啀鎵ц
             var sql_login = "select * from h_v_Gy_Czygl_Login where Czymc = '" + HUserName + "'";
             axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
                 params: { 
@@ -819,6 +821,11 @@
                         sessionStorage["Organization"] = HOrgName;
                         sessionStorage["HTranSlate"] = "1";
                         sessionStorage["HAutoLogin"] = "1";
+
+                        // 娣诲姞涓�涓欢鏃讹紝淇濊瘉鍐欏叆sessionStorage瀹屾垚鍚庡啀璋冪敤鍚庣画涓氬姟浠g爜
+                        setTimeout(() => {
+                            
+                        }, 1000);
                     } else {
                         this.$modal.msgError("鍔犺浇澶辫触锛侊紒璐﹀彿涓嶅瓨鍦紝璇疯仈绯荤鐞嗗憳缁存姢璐﹀彿淇℃伅锛侊紒");
                         this.$router.push({ path: "/" }).catch(() => { });

--
Gitblit v1.9.1