diff --git a/src/store/modules/mask.ts b/src/store/modules/mask.ts index dc6a03c7..5e4a6a5f 100644 --- a/src/store/modules/mask.ts +++ b/src/store/modules/mask.ts @@ -20,7 +20,7 @@ type MaskStateType = { const useMaskStore = defineStore('mask', { state: (): MaskStateType => ({ type: (localGet(CACHE_LOCAL_MASK) || 'none') as MaskStateType['type'], - lockPasswd: localGet(CACHE_LOCAL_LOCK_PASSWD) || '', + lockPasswd: atob(localGet(CACHE_LOCAL_LOCK_PASSWD) || ''), lockTimeout: 0, }), getters: {}, @@ -59,7 +59,7 @@ const useMaskStore = defineStore('mask', { }, 5_000); } if (type === 'lock') { - localSet(CACHE_LOCAL_LOCK_PASSWD, this.lockPasswd); + localSet(CACHE_LOCAL_LOCK_PASSWD, btoa(this.lockPasswd)); } else { localRemove(CACHE_LOCAL_LOCK_PASSWD); } diff --git a/src/views/tool/lockScreen/index.vue b/src/views/tool/lockScreen/index.vue index 4199e56f..8ad8c979 100644 --- a/src/views/tool/lockScreen/index.vue +++ b/src/views/tool/lockScreen/index.vue @@ -79,7 +79,7 @@ onMounted(() => {
- + { :maxlength="32" style="width: calc(100% - 50px)" @keyup.enter="handleUnlock" - /> + > + + {{ t('components.LockScreen.enter') }} +