chore: get start from deploying

This commit is contained in:
jialin
2025-02-24 11:34:40 +08:00
parent 1dd7037aa0
commit bcbefe29e7
11 changed files with 214 additions and 26 deletions
+5
View File
@@ -192,3 +192,8 @@ export const base64ToFile = (base64String: string, fileName: string) => {
return null;
}
};
// check onlinestatus
export const isOnline = () => {
return window.navigator.onLine;
};
+22 -1
View File
@@ -1,5 +1,7 @@
import localStore from './store';
const IS_FIRST_LOGIN = 'is_first_login';
const store = localStore.createInstance({ name: '_xWXJKJ_S1Sna_' });
const rememberMe = (key: string, data: any) => {
@@ -20,6 +22,25 @@ const removeRememberMe = (key: string) => {
}
};
export { getRememberMe, rememberMe, removeRememberMe };
const readState = (key: string) => {
if (store) {
return store.getItem(key);
}
};
const writeState = (key: string, data: any) => {
if (store) {
store.setItem(key, data);
}
};
export {
IS_FIRST_LOGIN,
getRememberMe,
readState,
rememberMe,
removeRememberMe,
writeState
};
export default store;