fix: 锁屏重启检查404时重试
This commit is contained in:
@@ -7,7 +7,7 @@ import { defineStore } from 'pinia';
|
||||
/**锁屏信息类型 */
|
||||
type Locked = {
|
||||
/**锁屏类型 */
|
||||
type: 'none' | 'lock' | 'reload' | 'reset' ;
|
||||
type: 'none' | 'lock' | 'reload' | 'reset';
|
||||
/**lock 超时锁屏时间,秒*/
|
||||
lockTimeout: number;
|
||||
};
|
||||
@@ -29,6 +29,11 @@ const useLockedStore = defineStore('locked', {
|
||||
this.fnLock('none');
|
||||
window.location.reload();
|
||||
}, 2_000);
|
||||
} else {
|
||||
// 延迟5秒
|
||||
setTimeout(() => {
|
||||
this.relaodWait();
|
||||
}, 5_000);
|
||||
}
|
||||
} catch (error) {
|
||||
// 延迟5秒
|
||||
@@ -38,7 +43,7 @@ const useLockedStore = defineStore('locked', {
|
||||
}
|
||||
},
|
||||
// 设置锁定
|
||||
async fnLock(type: Locked['type'] ) {
|
||||
async fnLock(type: Locked['type']) {
|
||||
this.type = type;
|
||||
localSet(CACHE_LOCAL_LOCK, type);
|
||||
if (type === 'reload') {
|
||||
|
||||
Reference in New Issue
Block a user