From 658a77440ab7d59ddab8aa965b79853dbcc65b4f Mon Sep 17 00:00:00 2001 From: dev01 Date: Thu, 10 Aug 2023 10:18:36 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=99=BB=E5=87=BA]=20=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=85=A8=E5=9F=9F=E8=AE=8A=E6=95=B8=20sessio?= =?UTF-8?q?nStorage=20|=20=E4=BF=AE=E6=AD=A3=E7=B3=BB=E7=B5=B1=E7=9B=A3?= =?UTF-8?q?=E6=8E=A7=E9=81=B8=E5=96=AE=E9=BB=9E=E9=81=B8=E5=A4=A7=E6=A8=93?= =?UTF-8?q?=E7=84=A1=E6=B3=95=E5=BE=80=20dashboard=20=E5=B0=8E=E5=90=91?= =?UTF-8?q?=E9=A0=81=E9=9D=A2=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/index.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Frontend/index.html b/Frontend/index.html index fac730a..8426c23 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -1101,6 +1101,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li // - 上方 HTML 引用套件若有使用 jquery 內存數據程序 (ex: $(x).data() , $(x).trigger("custom event") , $.fn.custom ...) // - 會被清洗,有類似程序需放入 loadPack1 Function rquired 引用 // (原 datatable.bundle.js require 會出問題,先以 cdn datatable.min.js引用) + require.undef('baja!'); require(["jquery"], loadedBasePack); }); @@ -1126,8 +1127,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li "lib/chart.js_4.1.2/chart.umd", "lib/dropzone/dropzone-min", "lib/jstree-master/jstree.min", - "lib/notifications/sweetalert2/sweetalert2.bundle", - "baja!" + "lib/notifications/sweetalert2/sweetalert2.bundle", + "baja!", ], loadedMasterPack); } /** @@ -1301,11 +1302,14 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li sessionStorage.setItem("lastPage", page); sessionStorage.setItem("pageAct", JSON.stringify(pageAct)); // 讀取子頁面 + $("#app").load(`_${page}.html`, loadCallback); }); onEvent("click", "#logout", function () { localStorage.removeItem("JWT-Authorization"); + sessionStorage.removeItem("pageAct"); + sessionStorage.removeItem("lastPage"); location.href = "/logout"; }); @@ -1461,7 +1465,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li if (lastPage) { let lastPageAct = {}; - if (isJSON(sessionStorage.getItem("pageAct"))) { + if (sessionStorage.getItem("pageAct") && isJSON(sessionStorage.getItem("pageAct"))) { lastPageAct = JSON.parse(sessionStorage.getItem("pageAct")); }