fix(core): 修复页面未完全加载时使用Mixly.Storage储存数据会导致boardType值为空

This commit is contained in:
王立帮
2025-04-29 00:53:44 +08:00
parent 071c7b7c35
commit 10dd1a8489

View File

@@ -14,7 +14,7 @@ const {
const { laytpl } = layui;
const { SELECTED_BOARD } = Config;
const { BOARD } = Config;
Storage.user = function (key, value) {
let storagePath = path.join(LocalStorage.PATH['USER'], key);
@@ -28,7 +28,7 @@ Storage.user = function (key, value) {
Storage.board = function (key, value) {
let storagePath = path.join(laytpl(LocalStorage.PATH['BOARD']).render({
boardType: SELECTED_BOARD.boardType
boardType: BOARD.boardType
}), key);
if (arguments.length > 1) {
LocalStorage.set(storagePath, value);
@@ -40,8 +40,7 @@ Storage.board = function (key, value) {
Storage.thirdParty = function (name, key, value) {
let storagePath = path.join(laytpl(LocalStorage.PATH['THIRD_PARTY']).render({
boardType: SELECTED_BOARD.boardType,
boardName: SELECTED_BOARD.boardName,
boardType: BOARD.boardType,
thirdPartyName: name ?? 'default'
}), key);
if (arguments.length > 1) {