You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
569 B

6 months ago
import { log } from './log';
export const systemInfo = () => {
//ver${__APP_INFO__.pkg.version} 暂时不用pack
log.info(`The ${import.meta.env.VITE_GLOB_APP_TITLE} compiled at ${__APP_INFO__.buildTime}.`);
};
export const getLocalSetting = () => {
return JSON.parse(localStorage.getItem(import.meta.env.VITE_GLOB_APP_TITLE)) || {};
};
export const setLocalSetting = (setting) => {
const _setting = getLocalSetting() || {};
return localStorage.setItem(
import.meta.env.VITE_GLOB_APP_TITLE,
JSON.stringify(Object.assign(_setting, setting)),
);
};