提交 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
})
}
......
{
"name": "湘农数智农服",
"appid": "__UNI__FD09823",
"description": "湘农数智农服 APP",
"versionName": "1.0.29",
"versionCode": 10029,
"transformPx": false,
"locale": "zh-Hans",
"vueVersion": "3",
/* 5+App特有相关 */ // 配置文件详细说明
"name" : "湘农数智农服",
"appid" : "__UNI__FD09823",
"description" : "湘农数智农服 APP",
"versionName" : "1.0.30",
"versionCode" : 10030,
"transformPx" : false,
"locale" : "zh-Hans",
"vueVersion" : "3",
/* 5+App特有相关 */// 配置文件详细说明
// https://uniapp.dcloud.net.cn/collocation/manifest-app.html#full-manifest
"app-plus": {
"usingComponents": true,
"nvueCompiler": "uni-app",
"nvueStyleCompiler": "uni-app",
"nvueLaunchMode": "fast",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": false,
"autoclose": false,
"waiting": true
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"nvueLaunchMode" : "fast",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"autoclose" : false,
"waiting" : true
},
"screenOrientation": [
"portrait-primary",
"landscape-primary"
],
"compatible": {
"screenOrientation" : [ "portrait-primary", "landscape-primary" ],
"compatible" : {
// 忽略版本提示
"ignoreVersion": true
"ignoreVersion" : true
},
/* 模块配置 */
"modules": {
"Geolocation": {},
"Camera": {},
"VideoPlayer": {},
"Barcode": {},
"Bluetooth": {}
"modules" : {
"Geolocation" : {},
"Camera" : {},
"VideoPlayer" : {},
"Barcode" : {},
"Bluetooth" : {}
},
/* 应用发布信息 */
"distribute": {
"distribute" : {
/* android打包配置 */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
......@@ -57,126 +54,120 @@
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"permissionPhoneState": {
"permissionPhoneState" : {
// app首次启动关闭权限申请
"request": "none"
"request" : "none"
},
"minSdkVersion": 23,
"targetSdkVersion": 30,
"abiFilters": [
"armeabi-v7a",
"arm64-v8a"
]
"minSdkVersion" : 23,
"targetSdkVersion" : 30,
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
},
/* ios打包配置 */
"ios": {
"dSYMs": false,
"privacyDescription": {
"NSUserTrackingUsageDescription": "请放心,开启权限不会获取您在其他站点的隐私信息,该权限仅用于标识设备并保障服务安全与提示浏览体验",
"NSLocationAlwaysAndWhenInUseUsageDescription": "该应用需要你的地理位置,以便检查你当前位置信息",
"NSLocationAlwaysUsageDescription": "该应用需要你的地理位置,以便检查你当前位置信息",
"NSLocationWhenInUseUsageDescription": "该应用需要你的地理位置,以便检查你当前位置信息",
"NSPhotoLibraryUsageDescription": "请允许访问您的照片图库,以便能够上传应用异常问题的截图"
"ios" : {
"dSYMs" : false,
"privacyDescription" : {
"NSUserTrackingUsageDescription" : "请放心,开启权限不会获取您在其他站点的隐私信息,该权限仅用于标识设备并保障服务安全与提示浏览体验",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的地理位置,以便检查你当前位置信息",
"NSLocationAlwaysUsageDescription" : "该应用需要你的地理位置,以便检查你当前位置信息",
"NSLocationWhenInUseUsageDescription" : "该应用需要你的地理位置,以便检查你当前位置信息",
"NSPhotoLibraryUsageDescription" : "请允许访问您的照片图库,以便能够上传应用异常问题的截图"
}
},
/* SDK配置 */
"sdkConfigs": {
"ad": {},
"statics": {},
"geolocation": {
"system": {
"__platform__": [
"ios",
"android"
]
"sdkConfigs" : {
"ad" : {},
"statics" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
}
}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen": {
"useOriginalMsgbox": true
"splashscreen" : {
"useOriginalMsgbox" : true
}
},
"uniStatistics": {
"enable": true
"uniStatistics" : {
"enable" : true
},
"nativePlugins": {
"lemonjk-FileSelect": {
"appid_android": "com.yiring.app.agri",
"__plugin_info__": {
"name": "FileSelect",
"description": "文件选取插件",
"platforms": "Android,iOS",
"url": "",
"android_package_name": "",
"ios_bundle_id": "com.yiring.app.agri",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {
"appid_android": {
"des": "请填写你当前应用的包名,必需填写,否则可能无法使用。(在菜单中->发行->原生App-云打包中可以查看包名信息)",
"key": "",
"value": ""
"nativePlugins" : {
"lemonjk-FileSelect" : {
"appid_android" : "com.yiring.app.agri",
"__plugin_info__" : {
"name" : "FileSelect",
"description" : "文件选取插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "com.yiring.app.agri",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"appid_android" : {
"des" : "请填写你当前应用的包名,必需填写,否则可能无法使用。(在菜单中->发行->原生App-云打包中可以查看包名信息)",
"key" : "",
"value" : ""
}
}
}
}
}
},
"uniStatistics": {
"enable": true,
"version": "2",
"debug": false
"uniStatistics" : {
"enable" : true,
"version" : "2",
"debug" : false
},
/* 快应用特有相关 */
"quickapp": {},
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents": true
"usingComponents" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true
"mp-toutiao" : {
"usingComponents" : true
}
}
<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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论