2025-07-22 11:21:01 +08:00
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<view class="container" :style="{ height: `100vh` }">
|
|
|
|
|
<view class="bg"></view>
|
|
|
|
|
<view class="version">Version {{ version }}</view>
|
|
|
|
|
<view class="bottom-bg"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-07-31 17:36:27 +08:00
|
|
|
import { ref } from 'vue';
|
2025-07-22 11:21:01 +08:00
|
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
|
|
|
import { useUserStore } from '@/stores/user';
|
2025-07-31 17:36:27 +08:00
|
|
|
const userStore = useUserStore();
|
2025-07-22 11:21:01 +08:00
|
|
|
|
2025-07-31 17:36:27 +08:00
|
|
|
let version = ref("1.0.0");
|
|
|
|
|
const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
version = systemInfo.appWgtVersion,//当前版本号
|
|
|
|
|
// #endif
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
version = systemInfo.appVersion,
|
|
|
|
|
// #endif
|
2025-07-22 11:21:01 +08:00
|
|
|
|
|
|
|
|
onLoad((opt) => {
|
|
|
|
|
console.log("onLoad");
|
|
|
|
|
// 检查是否已登录 并 获取用户信息
|
|
|
|
|
if (userStore.isLogin) {
|
|
|
|
|
// userStore.getUser()
|
|
|
|
|
// TODO 未登录会在拦截器中处理跳转登录页, 请在 xxx 配置登录页路径
|
|
|
|
|
uni.reLaunch({
|
2025-07-31 17:36:27 +08:00
|
|
|
url: '/pages/deviceAuth/deviceAuth',
|
2025-07-22 11:21:01 +08:00
|
|
|
});
|
|
|
|
|
}else{
|
2025-07-31 17:36:27 +08:00
|
|
|
uni.reLaunch({
|
|
|
|
|
url: '/pages/login/login',
|
|
|
|
|
});
|
2025-07-22 11:21:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.container {
|
|
|
|
|
background:#307AF5 !important;
|
|
|
|
|
height:100vh !important;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.container .bg{
|
|
|
|
|
background:url('@/static/images/loading-logo.png') no-repeat;
|
|
|
|
|
background-size:700rpx 800rpx;
|
|
|
|
|
width: 700rpx;
|
|
|
|
|
height: 800rpx;
|
|
|
|
|
margin:0 auto;
|
|
|
|
|
}
|
|
|
|
|
.container .version{
|
|
|
|
|
color:#A8D4FF;
|
|
|
|
|
font-size:32rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top:35rpx;
|
|
|
|
|
}
|
|
|
|
|
.container .bottom-bg{
|
|
|
|
|
background:url('@/static/images/loading-txt.png') no-repeat;
|
|
|
|
|
background-size:656rpx 123rpx;
|
|
|
|
|
width: 656rpx;
|
|
|
|
|
height: 123rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom:48rpx;
|
|
|
|
|
left:50%;
|
|
|
|
|
margin-left:-328rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|