From 4d3d02c6f3f06104703a28f10c892fa0fdd0f172 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Fri, 28 Mar 2025 14:23:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 15 ++++++++------- js/public.js | 14 +++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 3003e65..d0fabeb 100644 --- a/index.html +++ b/index.html @@ -163,7 +163,6 @@ window.history.pushState({}, 0, url); } initPage(miniAdmin); - sessionStorage.setItem('us', JSON.stringify(result.data)); } else if (result.code === 401) { closeWindowOpen(); } @@ -172,8 +171,8 @@ }, null); } else { // console.log('走的自己登录'); - // login(miniAdmin); - window.location = 'page/401.html'; + login(miniAdmin); + // window.location = 'page/401.html'; } /* var options = { iniUrl: "api/init.json", // 初始化接口 @@ -225,9 +224,11 @@ // 登录获取token let login_url = dataUrl + 'login/userLogin' const params = { - "username": 'sa', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', + // "username": 'sa', + // "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', + "username": 'bns', + "password": '1769fb2837e10e9d22c1c25add76355a', + } ajaxRequest(login_url, "POST", params, true, function () { }, function (result) { @@ -246,4 +247,4 @@ - \ No newline at end of file + diff --git a/js/public.js b/js/public.js index dbce75a..027ac71 100644 --- a/js/public.js +++ b/js/public.js @@ -1,10 +1,10 @@ -/* const dataUrl = 'http://127.0.0.1:21995/'; // 数据请求路径 -const fileUrl = 'http://127.0.0.1:21995/statics'; // 文件路径 -const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 -const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 */ +// const dataUrl = 'http://127.0.0.1:21521/'; // 数据请求路径 +// const fileUrl = 'http://127.0.0.1:21521/statics'; // 文件路径 +// const signFileUrl = 'http://127.0.0.1:21521/statics'; // 签名文件路径 +// const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 -const dataUrl = 'http://192.168.0.14:21999/'; // 数据请求路径 -const fileUrl = 'http://192.168.0.14:21999/statics'; // 文件路径 +const dataUrl = 'http://192.168.0.16:21999/'; // 数据请求路径 +const fileUrl = 'http://192.168.0.16:21999/statics'; // 文件路径 const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 /* 请求 */ @@ -187,7 +187,7 @@ function getUrlParam(key) { // 预览文件 function commonViewFile(params) { let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); - // path = fileUrl + params + // path = fileUrl + params console.log(path); let encodePath = encodeURIComponent(useBase64.encode64(path)); window.open(viewFileUrl + encodePath + '&token=' + generateToken());