From bed94b0c0500055f9fc7730ea2cf3f203b231b36 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Tue, 26 Nov 2024 17:11:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0401=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 ++ index.html | 11 ++++- js/public.js | 1 - page/401.html | 110 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 page/401.html diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/index.html b/index.html index a46b650..5d7d72a 100644 --- a/index.html +++ b/index.html @@ -141,6 +141,12 @@ miniAdmin = layui.miniAdmin, miniTongji = layui.miniTongji; let token = getUrlParam('token'); + if (!token) { + let gz_token = sessionStorage.getItem("gz-token"); + if (gz_token) { + token = gz_token; + } + } console.log('当前登录的token:' + token); if (token) { console.log('走的跳转登录'); @@ -151,8 +157,9 @@ } sessionStorage.setItem('gz-token', token); } else { - console.log('走的自己登录'); - login(); + // console.log('走的自己登录'); + // login(); + window.location = 'page/401.html'; } var options = { iniUrl: "api/init.json", // 初始化接口 diff --git a/js/public.js b/js/public.js index 707fc92..dbce75a 100644 --- a/js/public.js +++ b/js/public.js @@ -5,7 +5,6 @@ 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 signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 /* 请求 */ diff --git a/page/401.html b/page/401.html new file mode 100644 index 0000000..ffb1ecf --- /dev/null +++ b/page/401.html @@ -0,0 +1,110 @@ + + + + + 401 + + + + + + + + + + +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
OH! + +
+
+

很抱歉,暂无访问权限

+
+
+
+ + + + \ No newline at end of file