diff --git a/.idea/modules.xml b/.idea/modules.xml index 6c36069..49e8e66 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/api/commonRequest.js b/api/commonRequest.js index d44b516..e013785 100644 --- a/api/commonRequest.js +++ b/api/commonRequest.js @@ -1,13 +1,16 @@ let aqEnnable = false // 参数加密开关 -const commonUrl = "http://10.40.92.33:18080/zhgd/"; +//后端路径 +const commonUrl = "http://127.0.0.1:18080/zhgd/"; +//前端路径 +const URL_IP="http://127.0.0.1:1616" /* 登录相关 */ const login_url = commonUrl + "auth/login"; // 登录url const login_out = commonUrl + "auth/logout"; // 登出url const page_jump = commonUrl + "auth/pageJump"; // 登出url -const login_sg_page = "http://10.40.92.33:8100/sg_login.html" // 施工大屏登录页面 -const login_sc_page = "http://10.40.92.33:8101/sc_login.html" // 省侧大屏登录页面 -const login_sg_index = "http://10.40.92.33:8100/pages/home/navigation.html" // 施工大屏首页 -const login_sc_index = "http://10.40.92.33:8101/pages/web/index.html" // 省侧大屏首页 +const login_sg_page = URL_IP+"/sg_login.html" // 施工大屏登录页面 +const login_sc_page = URL_IP+"/sc_login.html" // 省侧大屏登录页面 +const login_sg_index = URL_IP+"/pages/home/navigation.html" // 施工大屏首页 +const login_sc_index = URL_IP+"/pages/web/index.html" // 省侧大屏首页 /* POST 请求 */ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType, isAes) { diff --git a/js/login/login.js b/js/login/login.js index be85304..dd62736 100644 --- a/js/login/login.js +++ b/js/login/login.js @@ -18,8 +18,9 @@ layui.use(function () { } let encryptStr = encryptCBC(JSON.stringify(params)); ajaxRequest(login_url, "POST", encryptStr, true, function () { - $('.layui-btn-fluid').empty().append('登录中,请稍后...').attr("disabled", true); + // $('.layui-btn-fluid').empty().append('登录中,请稍后...').attr("disabled", true); }, function (result) { + // $('.layui-btn-fluid').empty().append(' '); if (result.code === 200) { top.layer.msg(result.msg, { icon: 1, time: 500 }, function () { sessionStorage.setItem("zhgd_token", result.data.access_token); @@ -34,6 +35,8 @@ layui.use(function () { }); } else if (result.code === 500) { layer.msg(result.msg, { icon: 2 }); + }else if (result.code === 201) { + layer.msg(result.msg, { icon: 2 }); } }, function (xhr, status, error) { error(xhr, status, error)