增加设备绑定

This commit is contained in:
xuli3099
2025-07-31 17:36:27 +08:00
parent c7c6ff9671
commit 7f6b8f11b3
14 changed files with 16362 additions and 28 deletions

View File

@@ -9,11 +9,19 @@
</template>
<script setup>
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { useUserStore } from '@/stores/user';
const userStore = useUserStore()
const userStore = useUserStore();
const version="1.0.0"
let version = ref("1.0.0");
const systemInfo = uni.getSystemInfoSync();
// #ifdef APP-PLUS
version = systemInfo.appWgtVersion,//当前版本号
// #endif
// #ifdef H5
version = systemInfo.appVersion,
// #endif
onLoad((opt) => {
console.log("onLoad");
@@ -21,33 +29,13 @@ onLoad((opt) => {
if (userStore.isLogin) {
// userStore.getUser()
// TODO 未登录会在拦截器中处理跳转登录页, 请在 xxx 配置登录页路径
// #ifdef H5
window.setTimeout(()=>{
uni.reLaunch({
url: '/pages/home/home',
});
},1000)
// #endif
// #ifdef APP-PLUS
uni.reLaunch({
url: '/pages/home/home',
url: '/pages/deviceAuth/deviceAuth',
});
// #endif
}else{
// #ifdef H5
window.setTimeout(()=>{
uni.reLaunch({
url: '/pages/login/login',
});
},1000)
// #endif
// #ifdef APP-PLUS
uni.reLaunch({
url: '/pages/login/login',
});
// #endif
uni.reLaunch({
url: '/pages/login/login',
});
}
});