增加 常用服务查询及修改

This commit is contained in:
xuli3099
2025-08-01 18:12:36 +08:00
parent 909187a569
commit 540f513e82
16 changed files with 735 additions and 125 deletions

View File

@@ -82,6 +82,7 @@
<script setup>
import { ref,nextTick,onMounted,onUnmounted,getCurrentInstance } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { v4 as uuidv4 } from 'uuid'
import { getNavBarPaddingTop} from '@/utils/system.js';
import { getBindStatus } from '@/api/auth.js';
@@ -91,6 +92,13 @@ const { proxy } = getCurrentInstance();
import { useUserStore } from '@/stores/user';
const userStore = useUserStore();
onLoad(async(opt) => {
console.log("onLoad");
uni.setStorageSync('page_cache',true);
// uni.preloadPage({url: "/pages/login/login"});
// uni.preloadPage({url: "/pages/home/home"});
})
// 绑定状态1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
let bindStatus = ref(undefined);
let deviceId = ref(undefined);
@@ -141,6 +149,17 @@ let refreshBindStatus = async ()=>{
bindStatus.value = res.bindStatus;
console.log("222bindStatus=>",bindStatus.value)
if(bindStatus.value==2){}else{
if(bindStatus.value==4){
if (userStore.isLogin) {
uni.reLaunch({
url: '/pages/home/home',
});
}else{
uni.reLaunch({
url: '/pages/login/login',
});
}
}
clearInterval(timer);
}
}