提交 44f10579 作者: 方治民

fix: 替换 APP 打包 logo、引导页跳转逻辑错误等问题

上级 725577fa
# API 接口地址
# VITE_GLOB_API_URL=http://111.22.182.169:49600
VITE_GLOB_API_URL=http://36.133.16.81:42111
VITE_GLOB_API_URL=http://111.22.182.169:49600
# VITE_GLOB_API_URL=http://36.133.16.81:42111
# API 接口地址前缀
# VITE_GLOB_API_URL_PREFIX=/jeecgboot
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
VITE_GLOB_API_URL_PREFIX=/jeecgboot
# VITE_GLOB_API_URL_PREFIX=/jeecg-boot
......@@ -44,7 +44,7 @@
})
onError((err) => {
Message.toast(`App Error: ${err}`)
// Message.toast(`App Error: ${err}`)
console.error('App Error:', err)
})
......
......@@ -6,8 +6,8 @@ enum Api {
sysLogin = '/sys/mLogin', // 登陆
/* phoneLogin = '/sys/phoneLogin',
sms = '/sys/sms', */
phoneLogin = '/sys/phoneLogin',
sms = '/sys/getLoginVerifyCode',
phoneLogin = '/sys/phoneLogin',
sms = '/sys/getLoginVerifyCode',
dictList = '/sys/dict/queryAllDictItems', // 获取字典数据
location = '/tianditu/geocode', // 根据经纬度获取地址
sysRegister = '/app/user/register', // 注册
......@@ -20,6 +20,8 @@ export function getUserInfo(params = {}) {
return otherHttp.get({
url: Api.getUserInfo,
data: params,
}, {
errorMessageMode: null
})
}
......
<script setup lang="ts">
// import { PUSH_CLIENT_KEY } from '/@/enums/cacheEnum'
import { useUserStore } from '@/store/modules/user'
import { closeSplashscreenAndChechUpgrade } from '@/utils/upgrade'
import { checkUpgrade } from '@/utils/upgrade'
import { isDevMode } from '@/utils/env'
import Link from '@/utils/const/link'
import * as API from '/@/api/model/userInfo'
......@@ -9,25 +9,9 @@
const userStore = useUserStore()
onShow(async () => {
// 获取推送标识并设置 PushClientId 缓存
// uni.getPushClientId({
// success: (res) => {
// uni.setStorageSync(PUSH_CLIENT_KEY, res.cid)
// },
// })
// 检查是否有 token
const token = userStore.getToken
if (token) {
// // 检查登录状态
// try {
// const valid = await Auth.valid.request()
// if (valid && userStore.getUserInfo) {
// model.isLogin = true
// }
// } catch (error) {
// console.log('error', error)
// }
model.isLogin = true
}
......@@ -41,7 +25,7 @@
} else {
// 关闭启动页并检查更新
try {
await closeSplashscreenAndChechUpgrade()
await checkUpgrade()
} catch (error) {
console.log('error', error)
} finally {
......@@ -319,14 +303,14 @@
@change="(e) => (model.form.data.read = e.checked)"
style="margin-right: 10rpx; width: 32rpx; height: 32rpx; margin-top: 2rpx"
/>
<text style="color: #999999;;font-size:28rpx;">已阅读并同意</text>
<text style="color: #999;;font-size:28rpx;">已阅读并同意</text>
</fui-label>
<fui-text
@tap="Link.to(Link.services, '服务协议')"
size="28rpx"
text="《服务协议》"
color="#4da25b"
/><text style="color: #999999;;font-size:28rpx;"></text>
/><text style="color: #999;;font-size:28rpx;"></text>
<fui-text
@tap="Link.to(Link.privacy, '隐私政策')"
size="28rpx"
......@@ -381,6 +365,7 @@
height: calc(100vh);
block-size: 100% 100%;
background-color: #fafefc;
.login_top_bg{
width:750rpx;
height:1324rpx;
......@@ -388,23 +373,28 @@
left:0rpx;
top:0rpx;
}
.login_top_warp{
width:750rpx;
height:482rpx;
position: relative;
.login_hello{
position: absolute;
left: 50rpx;
top: 226rpx;
color: rgba(51, 51, 51, 1);
color: rgb(51 51 51 / 100%);
.text_hello{
font-size: 32rpx;
font-weight: 400;
letter-spacing: 0rpx;
line-height: 40rpx;
}
.login_server_name{
margin-top:32rpx;
.text_server_name{
font-size: 40rpx;
font-weight: 500;
......@@ -420,36 +410,43 @@
justify-content: center;
flex-wrap:wrap;
position: relative;
.login-input-area{
width: 650rpx;
// border:1rpx red solid;
.user_phone{
display:flex;
align-items: center;
.user_phone_img{
width: 40rpx;
height: 40rpx;
}
}
.user_text_view{
margin-left:12rpx;
height: 40rpx;
line-height: 40rpx;
.view_text{
font-size: 30rpx;
font-weight: 500;
letter-spacing: 0rpx;
color: rgba(51, 51, 51, 1);
color: rgb(51 51 51 / 100%);
}
}
.input-bottom-border{
border-bottom: 2rpx #eeeeee solid;
border-bottom: 2rpx #eee solid;
}
.mt50{
margin-top:50rpx;
}
}
}
.submit_btn_view{
margin-top:120rpx;
width:650rpx;
......
<script setup lang="ts">
// import { onMounted, onUnmounted, ref } from 'vue'
import { getQueryByType } from '/@/api/model/dict'
import { useUserStore } from '@/store/modules/user'
const mediaUrl = ref('')
const seconds = ref(4)
let timer = null
onLoad(() => {
getServiceItems()
const userStore = useUserStore()
const model = reactive({
isLogin: false,
show: false,
})
onLoad(async () => {
try {
await getServiceItems()
} finally {
// #ifdef APP-PLUS
plus.navigator.closeSplashscreen()
// #endif
}
})
async function navigateToLogin() {
// 检查是否有 token
const token = userStore.getToken
if (token) {
model.isLogin = true
}
try {
if (model.isLogin) {
// 刷新用户信息
await userStore.refreshUserInfo()
// 跳转到登录页
goHome()
Message.toast(`欢迎回来~`)
} else {
// 跳转到登录页
toLogin()
}
} catch (error) {
// 跳转到登录页
toLogin()
}
}
/**
* 跳转到门户页
*/
function goHome() {
uni.reLaunch({
url: '/pages/shouye/shouye',
})
}
/**
* 跳转到登录页
*/
function toLogin() {
uni.reLaunch({
url: '/pages/login/login',
})
}
onMounted(() => {
countdown()
})
onUnmounted(() => {
clearTimerInterval()
})
function clearTimerInterval() {
clearInterval(timer)
}
function getServiceItems() {
getQueryByType({ type: 2 }).then((res) => {
return getQueryByType({ type: 2 }).then((res) => {
mediaUrl.value = res[0].mediaUrl
})
}
......@@ -32,11 +91,6 @@
}
}, 1000)
}
function navigateToLogin() {
uni.redirectTo({
url: '/pages/login/login',
})
}
</script>
<template>
......@@ -76,10 +130,12 @@
height: 100vh;
width: 750rpx;
position: relative;
.splash_bg {
width: 100%;
height: 100vh;
}
.middle_logo_content {
position: absolute;
top: 250rpx;
......@@ -88,6 +144,7 @@
display: flex;
flex-direction: column;
align-items: center;
.logo_view {
width: 136rpx;
height: 136rpx;
......@@ -96,36 +153,43 @@
display: flex;
justify-content: center;
align-items: center;
.splash_logo {
width: 110rpx;
height: 110rpx;
}
}
.logo_text_bg {
margin-top: 32rpx;
width: 192rpx;
height: 64rpx;
}
.server_text_bg {
width: 528rpx;
height: 116rpx;
}
.outline_bg {
margin-top: -36rpx;
width: 464rpx;
height: 54rpx;
}
}
.countdown_view {
position: absolute;
left: 612rpx;
top: 118rpx;
width: 108rpx;
height: 52rpx;
.shadow_img {
width: 108rpx;
height: 52rpx;
}
.countdown_val {
width: 108rpx;
height: 52rpx;
......
unpackage/res/icons/1024x1024.png

180.3 KB | W: | H:

unpackage/res/icons/1024x1024.png

104.0 KB | W: | H:

unpackage/res/icons/1024x1024.png
unpackage/res/icons/1024x1024.png
unpackage/res/icons/1024x1024.png
unpackage/res/icons/1024x1024.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/120x120.png

12.3 KB | W: | H:

unpackage/res/icons/120x120.png

7.9 KB | W: | H:

unpackage/res/icons/120x120.png
unpackage/res/icons/120x120.png
unpackage/res/icons/120x120.png
unpackage/res/icons/120x120.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/144x144.png

16.8 KB | W: | H:

unpackage/res/icons/144x144.png

9.9 KB | W: | H:

unpackage/res/icons/144x144.png
unpackage/res/icons/144x144.png
unpackage/res/icons/144x144.png
unpackage/res/icons/144x144.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/152x152.png

18.4 KB | W: | H:

unpackage/res/icons/152x152.png

10.6 KB | W: | H:

unpackage/res/icons/152x152.png
unpackage/res/icons/152x152.png
unpackage/res/icons/152x152.png
unpackage/res/icons/152x152.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/167x167.png

21.6 KB | W: | H:

unpackage/res/icons/167x167.png

11.9 KB | W: | H:

unpackage/res/icons/167x167.png
unpackage/res/icons/167x167.png
unpackage/res/icons/167x167.png
unpackage/res/icons/167x167.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/180x180.png

24.4 KB | W: | H:

unpackage/res/icons/180x180.png

13.1 KB | W: | H:

unpackage/res/icons/180x180.png
unpackage/res/icons/180x180.png
unpackage/res/icons/180x180.png
unpackage/res/icons/180x180.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/192x192.png

27.3 KB | W: | H:

unpackage/res/icons/192x192.png

14.2 KB | W: | H:

unpackage/res/icons/192x192.png
unpackage/res/icons/192x192.png
unpackage/res/icons/192x192.png
unpackage/res/icons/192x192.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/20x20.png

851 Bytes | W: | H:

unpackage/res/icons/20x20.png

873 Bytes | W: | H:

unpackage/res/icons/20x20.png
unpackage/res/icons/20x20.png
unpackage/res/icons/20x20.png
unpackage/res/icons/20x20.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/29x29.png

1.4 KB | W: | H:

unpackage/res/icons/29x29.png

1.3 KB | W: | H:

unpackage/res/icons/29x29.png
unpackage/res/icons/29x29.png
unpackage/res/icons/29x29.png
unpackage/res/icons/29x29.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/40x40.png

2.2 KB | W: | H:

unpackage/res/icons/40x40.png

2.0 KB | W: | H:

unpackage/res/icons/40x40.png
unpackage/res/icons/40x40.png
unpackage/res/icons/40x40.png
unpackage/res/icons/40x40.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/58x58.png

3.8 KB | W: | H:

unpackage/res/icons/58x58.png

3.1 KB | W: | H:

unpackage/res/icons/58x58.png
unpackage/res/icons/58x58.png
unpackage/res/icons/58x58.png
unpackage/res/icons/58x58.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/60x60.png

4.0 KB | W: | H:

unpackage/res/icons/60x60.png

3.2 KB | W: | H:

unpackage/res/icons/60x60.png
unpackage/res/icons/60x60.png
unpackage/res/icons/60x60.png
unpackage/res/icons/60x60.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/72x72.png

5.4 KB | W: | H:

unpackage/res/icons/72x72.png

4.1 KB | W: | H:

unpackage/res/icons/72x72.png
unpackage/res/icons/72x72.png
unpackage/res/icons/72x72.png
unpackage/res/icons/72x72.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/76x76.png

5.8 KB | W: | H:

unpackage/res/icons/76x76.png

4.4 KB | W: | H:

unpackage/res/icons/76x76.png
unpackage/res/icons/76x76.png
unpackage/res/icons/76x76.png
unpackage/res/icons/76x76.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/80x80.png

6.4 KB | W: | H:

unpackage/res/icons/80x80.png

4.8 KB | W: | H:

unpackage/res/icons/80x80.png
unpackage/res/icons/80x80.png
unpackage/res/icons/80x80.png
unpackage/res/icons/80x80.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/87x87.png

7.3 KB | W: | H:

unpackage/res/icons/87x87.png

5.3 KB | W: | H:

unpackage/res/icons/87x87.png
unpackage/res/icons/87x87.png
unpackage/res/icons/87x87.png
unpackage/res/icons/87x87.png
  • 2-up
  • Swipe
  • Onion skin
unpackage/res/icons/96x96.png

8.6 KB | W: | H:

unpackage/res/icons/96x96.png

6.1 KB | W: | H:

unpackage/res/icons/96x96.png
unpackage/res/icons/96x96.png
unpackage/res/icons/96x96.png
unpackage/res/icons/96x96.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论