From f0719da71fc0caa65c724ca5392cc3295bf3a9c3 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 08 八月 2022 11:03:31 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI

---
 WebTM/views/user/login.html |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/WebTM/views/user/login.html b/WebTM/views/user/login.html
index a887f3d..cf6d621 100644
--- a/WebTM/views/user/login.html
+++ b/WebTM/views/user/login.html
@@ -121,10 +121,15 @@
                         }
                         $("#Organization").append(Organization);
                         form.render('select');
+
+                        //璇诲彇閰嶇疆鏂囦欢
+                        get_ReadConfigFile();
                     }
                     layer.closeAll("loading");
                 }
             })
+
+         
 
             //form.render();
 
@@ -152,6 +157,33 @@
                     $("#LAY-user-login-password").focus();
                 }
             })
+
+
+            //璇诲彇閰嶇疆鏂囦欢
+            function get_ReadConfigFile() {
+                //鑾峰彇鏈湴瀛樺偍鐨勬暟鎹�
+                var data = localStorage.getItem("data");
+                if (data != null) {
+                    var data2 = JSON.parse(data);
+                    $("#LAY-user-login-username").val(data2["UserID"]);
+                    $("#Organization").val(data2["OrgID"]);
+                    form.render('select');
+                }
+                console.log(JSON.parse(data));
+            }
+
+            //瀛樺偍閰嶇疆鏂囦欢
+            function get_WriteConfigFile() {
+                //娓呯┖鏈湴瀛樺偍鐨勬暟鎹�
+                localStorage.clear();
+                var data = {
+                    UserID: sessionStorage["Czybm"]
+                    , OrgID: sessionStorage["OrganizationID"]
+                }
+                //鏈湴瀛樺偍
+                localStorage.setItem("data", JSON.stringify(data));
+            }
+
             //鐧诲綍
             function loging() {
                 if ($("#Organization").val() == 0) {
@@ -211,6 +243,7 @@
                             } else {//PC绔�
                                 window.location.href = '../../views/index.html'
                             }
+                            get_WriteConfigFile();
                         }
                         else {
                             // $("#verifycode").click();
@@ -225,6 +258,7 @@
                     }
                 })
             }
+
             function playSound() {
                 var audio = document.getElementById("cs");
                 if (audio == null)

--
Gitblit v1.9.1