增加 常用服务查询及修改
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user