feat : 一体机定位直到成功,其他环境循环2分钟定位, 上传加入文件校验

This commit is contained in:
2025-12-19 14:46:37 +08:00
parent fdd5577c85
commit 7e8bef0cb9
8 changed files with 343 additions and 263 deletions

12
App.vue
View File

@@ -24,6 +24,7 @@ onLaunch((options) => {
getUserInfo();
useUserStore().changMiniProgramAppStatus(false);
useUserStore().changMachineEnv(false);
useLocationStore().getLocationLoop()//循环获取定位
return;
}
if (isY9MachineType()) {
@@ -32,7 +33,14 @@ onLaunch((options) => {
useUserStore().logOutApp();
useUserStore().changMiniProgramAppStatus(true);
useUserStore().changMachineEnv(true);
useLocationStore().getLocation();
useLocationStore().getLocation()
.then(({longitude,latitude})=>{
console.log(`✅一体机获取定位成功:lng:${longitude},lat${latitude}`)
})
.catch(err=>{
console.log('❌一体机获取定位失败,30s后尝试重新获取')
useLocationStore().getLocation()
})
uQRListen = new IncreaseRevie();
inactivityManager = new GlobalInactivityManager(handleInactivity, 60 * 1000);
inactivityManager.start();
@@ -40,6 +48,7 @@ onLaunch((options) => {
}
// 正式上线去除此方法
console.warn('浏览器环境');
useLocationStore().getLocationLoop()//循环获取定位
useUserStore().changMiniProgramAppStatus(true);
useUserStore().changMachineEnv(false);
useUserStore().initSeesionId(); //更新
@@ -57,6 +66,7 @@ onLaunch((options) => {
onMounted(() => {});
onShow(() => {
console.log('App Show');
});