修改样式

This commit is contained in:
xuli3099
2025-08-22 15:55:18 +08:00
parent d6053ec1aa
commit 711785fe8e
6 changed files with 88 additions and 55 deletions

View File

@@ -1,6 +1,8 @@
<template>
<view class="container" :style="{ height: `100vh` }">
<view class="bg"></view>
<view class="bg">
<view class="env-txt" v-if="networkEnv==1">企业内网</view>
</view>
<view class="version">Version {{ appVersion }}</view>
<!-- <view class="bottom-bg"></view> -->
@@ -29,6 +31,7 @@ import {showAlert} from '@/utils/message.js'
import { useUserStore } from '@/stores/user';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
// #ifdef APP-PLUS
// 获取 存储手机的module
@@ -58,13 +61,13 @@ onLoad(async(opt) => {
if(!versionVisible.value){
try {
// 授权设备存储
let granted = requestAndroidPermission(systemInfo);
if(granted){
// let granted = requestAndroidPermission(systemInfo);
// if(granted){
// showAlert("22授权成功")
setTimeout(()=>{
// setTimeout(()=>{
selectDeviceId();
},500)
}
// },500)
// }
} catch (error) {
console.error('权限请求出错:', error);
// showAlert(JSON.stringify(error))
@@ -100,12 +103,7 @@ const getOSVesion = async()=>{
// #ifdef H5
verNumber : systemInfo.appVersion,
// #endif
// deviceType:systemInfo.model,//型号
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
// osVersion:systemInfo.osVersion,//操作系统版本
// resolution:systemInfo.windowWidth+"*"+systemInfo.windowHeight,//分辨率
// trademark:systemInfo.deviceBrand,//设备品牌
// uniqueCode:systemInfo.deviceId//设备ID
}
// 当前手机版本
appVersion.value = param.verNumber;
@@ -137,40 +135,44 @@ const selectDeviceId = async()=>{
// let deviceId = uni.getStorageSync('app_device_id');// 本地设备ID
try {
safeSave.getSafeFile({ "key": "app_device_id" }, res2 => {
// showAlert(JSON.stringify(res2));
if (res2.code == 1) {
let deviceId = res2.data;
console.log("读取成功=>",deviceId)
// showAlert("读取成功=>"+deviceId);
getBindStatus({uniqCode:deviceId}).then(res=>{
let bindStatus = res.bindStatus
// setTimeout(()=>{
// 绑定状态1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
if(bindStatus == 4){
// 检查是否已登录 并 获取用户信息
if (userStore.isLogin) {
uni.reLaunch({
url: '/pages/home/home',
});
if(deviceId!=""){
getBindStatus({uniqCode:deviceId}).then(res=>{
let bindStatus = res.bindStatus
// setTimeout(()=>{
// 绑定状态1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
if(bindStatus == 4){
// 检查是否已登录 并 获取用户信息
if (userStore.isLogin) {
uni.reLaunch({
url: '/pages/home/home',
});
}else{
uni.reLaunch({
url: '/pages/login/login',
});
}
}else{
uni.reLaunch({
url: '/pages/login/login',
url: '/pages/deviceAuth/deviceAuth',
});
}
}else{
uni.reLaunch({
url: '/pages/deviceAuth/deviceAuth',
});
}
// },1000)
});
} else {
// showAlert('读取失败:'+res2.msg)
// setTimeout(()=>{
// },1000)
});
}else{
uni.reLaunch({
url: '/pages/deviceAuth/deviceAuth',
});
// },1000)
}
} else {
uni.reLaunch({
url: '/pages/deviceAuth/deviceAuth',
});
}
})
} catch (error) {
@@ -206,12 +208,22 @@ const handleClose=()=>{
position: relative;
padding-top:100px;
}
.container .bg{
background:url('@/static/images/loading-logo.png') no-repeat;
background-size:700rpx 800rpx;
width: 700rpx;
height: 800rpx;
margin:0 auto;
position: relative;
}
.container .bg .env-txt{
position: absolute;
right: 35rpx;
top:10rpx;
color:#fff;
font-size: 36rpx;
font-weight: bold;
}
.container .version{
color:#A8D4FF;