Merge branch 'main' of http://124.243.245.42:3000/sdz/qingdao-employment-service
This commit is contained in:
12
App.vue
12
App.vue
@@ -42,14 +42,14 @@ onLaunch((options) => {
|
|||||||
useUserStore().changMiniProgramAppStatus(true);
|
useUserStore().changMiniProgramAppStatus(true);
|
||||||
useUserStore().changMachineEnv(true);
|
useUserStore().changMachineEnv(true);
|
||||||
(function loop() {
|
(function loop() {
|
||||||
console.log('📍一体机尝试获取定位');
|
console.log('一体机尝试获取定位');
|
||||||
useLocationStore()
|
useLocationStore()
|
||||||
.getLocation()
|
.getLocation()
|
||||||
.then(({ longitude, latitude }) => {
|
.then(({ longitude, latitude }) => {
|
||||||
console.log(`✅一体机获取定位成功:lng:${longitude},lat${latitude}`);
|
console.log(`一体机获取定位成功:lng:${longitude},lat${latitude}`);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log('❌一体机获取定位失败,30s后尝试重新获取');
|
console.log('一体机获取定位失败,30s后尝试重新获取');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loop();
|
loop();
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -88,7 +88,7 @@ onHide(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function handleInactivity() {
|
function handleInactivity() {
|
||||||
console.log('【全局】60秒无操作,执行安全逻辑');
|
console.warn('60秒无操作,执行安全逻辑');
|
||||||
if (inactivityModalTimer) {
|
if (inactivityModalTimer) {
|
||||||
clearTimeout(inactivityModalTimer);
|
clearTimeout(inactivityModalTimer);
|
||||||
inactivityModalTimer = null;
|
inactivityModalTimer = null;
|
||||||
@@ -120,7 +120,7 @@ function handleInactivity() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// 2. 启动 10 秒倒计时
|
// 2. 启动 20 秒倒计时
|
||||||
inactivityModalTimer = setTimeout(() => {
|
inactivityModalTimer = setTimeout(() => {
|
||||||
inactivityModalTimer = null;
|
inactivityModalTimer = null;
|
||||||
console.log('【自动登出】10秒无响应,强制清理状态');
|
console.log('【自动登出】10秒无响应,强制清理状态');
|
||||||
@@ -129,7 +129,7 @@ function handleInactivity() {
|
|||||||
uni.$emit('hide-global-popup');
|
uni.$emit('hide-global-popup');
|
||||||
|
|
||||||
performLogout();
|
performLogout();
|
||||||
}, 10000);
|
}, 20000);
|
||||||
} else {
|
} else {
|
||||||
inactivityManager?.resume();
|
inactivityManager?.resume();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export const useRecommedIndexedDBStore = defineStore("indexedDB", () => {
|
|||||||
async function addRecord(payload) {
|
async function addRecord(payload) {
|
||||||
const totalRecords = await baseDB.db.getRecordCount(tableName.value);
|
const totalRecords = await baseDB.db.getRecordCount(tableName.value);
|
||||||
if (totalRecords >= total.value) {
|
if (totalRecords >= total.value) {
|
||||||
console.log(`⚠数据超过 ${total.value} 条,删除最早的一条...`);
|
console.log(`数据超过 ${total.value} 条,删除最早的一条...`);
|
||||||
await baseDB.db.deleteOldestRecord(tableName.value);
|
await baseDB.db.deleteOldestRecord(tableName.value);
|
||||||
}
|
}
|
||||||
if (!baseDB.isDBReady) await baseDB.initDB();
|
if (!baseDB.isDBReady) await baseDB.initDB();
|
||||||
|
|||||||
@@ -85,11 +85,11 @@ class ScreenDetectionManager {
|
|||||||
|
|
||||||
// 添加加载成功/失败监听
|
// 添加加载成功/失败监听
|
||||||
this.cssLink.onload = () => {
|
this.cssLink.onload = () => {
|
||||||
console.log('🎨 宽屏 CSS 文件加载成功');
|
console.log('宽屏 CSS 文件加载成功');
|
||||||
};
|
};
|
||||||
|
|
||||||
this.cssLink.onerror = () => {
|
this.cssLink.onerror = () => {
|
||||||
console.error('❌ 宽屏 CSS 文件加载失败');
|
console.error('宽屏 CSS 文件加载失败');
|
||||||
this.cssLink = null;
|
this.cssLink = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ class ScreenDetectionManager {
|
|||||||
try {
|
try {
|
||||||
this.cssLink.parentNode.removeChild(this.cssLink);
|
this.cssLink.parentNode.removeChild(this.cssLink);
|
||||||
this.cssLink = null;
|
this.cssLink = null;
|
||||||
console.log('🗑️ 宽屏 CSS 文件已移除');
|
console.log('宽屏 CSS 文件已移除');
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('移除 CSS 失败:', error);
|
console.error('移除 CSS 失败:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user