fix: 锁屏重启判断
This commit is contained in:
@@ -53,16 +53,14 @@ function backLogin() {
|
||||
const isLocked = computed(() => lockedStore.type !== 'none');
|
||||
|
||||
onMounted(() => {
|
||||
debugger
|
||||
console.log(lockedStore.type);
|
||||
// 本地锁定类型设置
|
||||
lockedStore.fnLock(lockedStore.type);
|
||||
getConfigKey('sys.lockTime')
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
lockedStore.lockTimeout = res.data;
|
||||
timeoutDuration = res.data * 1000;
|
||||
}
|
||||
// 本地锁定类型设置
|
||||
lockedStore.fnLock(lockedStore.type);
|
||||
})
|
||||
.finally(() => {
|
||||
if (timeoutDuration !== 0) {
|
||||
|
||||
@@ -21,7 +21,6 @@ const useLockedStore = defineStore('locked', {
|
||||
actions: {
|
||||
// 重启等待-轮询
|
||||
async relaodWait() {
|
||||
debugger
|
||||
try {
|
||||
const res = await getSysConf();
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
@@ -29,7 +28,6 @@ const useLockedStore = defineStore('locked', {
|
||||
window.location.reload();
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
// 延迟5秒
|
||||
setTimeout(() => {
|
||||
this.relaodWait();
|
||||
|
||||
Reference in New Issue
Block a user