From faf8c086a3b24bec039c57186a4d452e7d31429b Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Tue, 9 Dec 2025 15:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=B3=E8=BD=AC=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- czl-screen/lodingIndex.html | 5 ++- czl-web/lodingIndex.html | 7 ++-- czl-web/pages/user/addUserForm.html | 11 ++++-- ldlz-web/src/views/ywgllogin.vue | 12 ++---- login.html | 7 ++-- public/html/index.html | 60 +++++++++++++++++++++++++---- public/html/userForm.html | 2 +- public/login/public.js | 3 +- public/public.js | 4 +- smz-screen/lodingIndex.html | 7 ++-- smz-web/js/publicJs.js | 2 +- smz-web/lodingIndex.html | 10 ++--- 12 files changed, 90 insertions(+), 40 deletions(-) diff --git a/czl-screen/lodingIndex.html b/czl-screen/lodingIndex.html index 382956a..d7b10a6 100644 --- a/czl-screen/lodingIndex.html +++ b/czl-screen/lodingIndex.html @@ -215,15 +215,16 @@ const urlParam = new URLSearchParams(url.search); const path = url.pathname; // 输出: "/page" const token = urlParam.get('token'); // 输出: "value1" + let username=localStorage.getItem("public_username"); if(token){ const params = { - "username": token, + "username": encrypt(username), } $.ajax({ headers:{ "Authorization":public_token }, - url: request_url + 'czldp/publicLogin/defaultLogin', + url: request_url + '/czldp/publicLogin/defaultLogin', data: JSON.stringify(params), async : true, method:"POST", diff --git a/czl-web/lodingIndex.html b/czl-web/lodingIndex.html index 1a0700b..cfa2837 100644 --- a/czl-web/lodingIndex.html +++ b/czl-web/lodingIndex.html @@ -216,15 +216,16 @@ const urlParam = new URLSearchParams(url.search); const path = url.pathname; // 输出: "/page" const token = urlParam.get('token'); // 输出: "value1" - if(token){ + let username=localStorage.getItem("public_username"); + if(username){ const params = { - "username": token, + "username": encrypt(username), } $.ajax({ headers:{ "Authorization":public_token }, - url: request_url + 'czl/publicLogin/defaultLogin', + url: request_url + '/czl/publicLogin/defaultLogin', data: JSON.stringify(params), async : true, method:"POST", diff --git a/czl-web/pages/user/addUserForm.html b/czl-web/pages/user/addUserForm.html index d0e52aa..4e199ee 100644 --- a/czl-web/pages/user/addUserForm.html +++ b/czl-web/pages/user/addUserForm.html @@ -202,10 +202,13 @@ * @returns {boolean} */ function addInfo(formData) { - if (!phone_reg($("#phone").val())) { - layer.msg("手机号码错误,请仔细核对!", {icon: 0}); - return false; - } + if(id == ''){ + if (!phone_reg($("#phone").val())) { + layer.msg("手机号码错误,请仔细核对!", {icon: 0}); + return false; + } + } + if ($("#department").val() == "点击进行部门选择") { layer.msg("请选择部门!", {icon: 0}); return false; diff --git a/ldlz-web/src/views/ywgllogin.vue b/ldlz-web/src/views/ywgllogin.vue index 8eb7d71..6d6d64a 100644 --- a/ldlz-web/src/views/ywgllogin.vue +++ b/ldlz-web/src/views/ywgllogin.vue @@ -209,11 +209,7 @@ export default { uuid: "", }, loading: false, - // 验证码开关 - captchaOnOff: true, - // 注册开关 - register: false, - redirect: undefined, + }; }, watch: { @@ -228,6 +224,7 @@ export default { next(); // 必须调用next()来解决路由守卫的promise }, created() { + debugger //平台单独的登录 2024年4月16日11:23:58 this.getLoginByNameAndTokenJ(); }, @@ -236,7 +233,6 @@ export default { * 只传递token */ getLoginByNameAndTokenJ() { - debugger console.log(window.location.href); let url=window.location.href.split("?"); @@ -274,12 +270,12 @@ export default { this.$store.dispatch("DefaultLogin", loginForm).then(() => { this.$router.push({ path: this.redirect || "/" }).catch(() => { }); }).catch(() => { - // window.location.href = 'http://127.0.0.1:8848/hn_cloud_web/login.html'; + window.location.href = 'http://127.0.0.1:8848/hn_cloud_web/login.html'; }); // this.$message.error("用户token为空"); } else { //本地环境 - // window.location.href = 'http://127.0.0.1:8848/hn_cloud_web/login.html'; + window.location.href = 'http://127.0.0.1:8848/hn_cloud_web/login.html'; // console.log("tick为空..") } }, diff --git a/login.html b/login.html index 6afe926..e79baa9 100644 --- a/login.html +++ b/login.html @@ -51,13 +51,13 @@ - + diff --git a/public/html/userForm.html b/public/html/userForm.html index 70a29fb..5cbd950 100644 --- a/public/html/userForm.html +++ b/public/html/userForm.html @@ -1,5 +1,5 @@ - + diff --git a/public/login/public.js b/public/login/public.js index 11ecab7..8b13789 100644 --- a/public/login/public.js +++ b/public/login/public.js @@ -1,2 +1 @@ -let IP_ADDRESS='http://192.168.0.38:42880'; -let contentPath="/hn_cloud_web/"; + diff --git a/public/public.js b/public/public.js index 709e2c8..79b7c7e 100644 --- a/public/public.js +++ b/public/public.js @@ -1,2 +1,4 @@ -let request_url="http://192.168.0.38:42880/" +let web_url="http://127.0.0.1:8848" +let contentPath="/hn_cloud_web"; +let request_url="http://192.168.0.38:42880" let public_token=localStorage.getItem("public_token") \ No newline at end of file diff --git a/smz-screen/lodingIndex.html b/smz-screen/lodingIndex.html index 2023b2f..60342ed 100644 --- a/smz-screen/lodingIndex.html +++ b/smz-screen/lodingIndex.html @@ -216,15 +216,16 @@ const urlParam = new URLSearchParams(url.search); const path = url.pathname; // 输出: "/page" const token = urlParam.get('token'); // 输出: "value1" - if(token){ + let username=localStorage.getItem("public_username"); + if(username){ const params = { - "username": token, + "username": encryptCBC(username), } $.ajax({ headers:{ "Authorization":public_token }, - url: request_url + 'realnameweb/publicLogin/defaultLogin', + url: request_url + '/realnameweb/publicLogin/defaultLogin', data: JSON.stringify(params), async : true, method:"POST", diff --git a/smz-web/js/publicJs.js b/smz-web/js/publicJs.js index 3db9c72..efb380b 100644 --- a/smz-web/js/publicJs.js +++ b/smz-web/js/publicJs.js @@ -1,4 +1,4 @@ -var ctxPath = "http://192.168.0.50:42880/realname" +var ctxPath = "http://192.168.0.38:42880/realname" //湖南 let contentPath="/hn_cloud_web/smz-web" diff --git a/smz-web/lodingIndex.html b/smz-web/lodingIndex.html index a583e25..dc86f96 100644 --- a/smz-web/lodingIndex.html +++ b/smz-web/lodingIndex.html @@ -216,21 +216,21 @@ const urlParam = new URLSearchParams(url.search); const path = url.pathname; // 输出: "/page" const token = urlParam.get('token'); // 输出: "value1" - if(token){ + let username=localStorage.getItem("public_username"); + if(username){ const params = { - "username": token, + "username": encryptCBC(username), } $.ajax({ headers:{ "Authorization":public_token }, - url: request_url + 'realname/publicLogin/defaultLogin', + url: request_url + '/realname/publicLogin/defaultLogin', data: JSON.stringify(params), async : true, method:"POST", contentType:'application/json;charset=UTF-8', success : function(data) { - debugger if(data.code && data.code!='200'){ window.location.href="../login.html"; }else{ @@ -255,7 +255,7 @@ }else{ // alert("请先登录"); - // window.location.href="../login.html"; + window.location.href="../login.html"; }