fix: 锁屏页面重构

This commit is contained in:
TsMask
2024-01-17 16:00:55 +08:00
parent 5d1a60d94f
commit 46f0a7a92d
8 changed files with 80 additions and 41 deletions

View File

@@ -1,6 +1,6 @@
import Cookies from 'js-cookie';
import { TOKEN_COOKIE } from '@/constants/token-constants';
import { localRemove } from '@/utils/cache-local-utils';
import { localRemove, localSet } from '@/utils/cache-local-utils';
import { CACHE_LOCAL_LOCK } from '@/constants/cache-keys-constants';
/**获取cookis中Token字符串 */
@@ -11,6 +11,7 @@ export function getToken(): string {
/**设置cookis中Token字符串 */
export function setToken(token: string): void {
Cookies.set(TOKEN_COOKIE, token);
localSet(CACHE_LOCAL_LOCK, 'false');
}
/**移除cookis中Token字符串,localStorage中锁屏字符串 */