From 2d1aa8078b5c455e856572b61251830ea2b128a6 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期三, 21 九月 2022 15:57:29 +0800
Subject: [PATCH] 优化
---
WebTM/views/user/login.html | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/WebTM/views/user/login.html b/WebTM/views/user/login.html
index a887f3d..203229a 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,32 @@
$("#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');
+ }
+ }
+
+ //瀛樺偍閰嶇疆鏂囦欢
+ 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) {
@@ -164,8 +195,7 @@
var PassWord = $("#LAY-user-login-password").val();
layer.load(3);
$.ajax({
- type: "get",
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetUser",
+ type: "get",
url: GetWEBURL() + "/Web/GetUser",
data: { "UserName": UserName, "PassWord": PassWord, "HOrgName": $("#Organization").val() },
success: function (result) {
@@ -211,6 +241,7 @@
} else {//PC绔�
window.location.href = '../../views/index.html'
}
+ get_WriteConfigFile();
}
else {
// $("#verifycode").click();
@@ -225,6 +256,7 @@
}
})
}
+
function playSound() {
var audio = document.getElementById("cs");
if (audio == null)
--
Gitblit v1.9.1