优化小程序部分

This commit is contained in:
hero920103 committed 2026-10-31 19:17:37 +08:00
1 parent 727319a6eb
commit d4e89788c5
46 files changed
+4906 -63

No files matched your search

+20 -34
View File
@@ -1,52 +1,38 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
<view class="boot">
<image class="boot-logo" src="/static/logo.png" mode="aspectFit"></image>
<text class="boot-text">正在进入…</text>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
import { onShow } from '@dcloudio/uni-app'
import { isLoggedIn } from '@/utils/auth.js'
},
methods: {
}
}
/**
* 启动跳板页:若启动入口指向本页(脚手架默认首页),先做登录检测再分流,
* 未登录直接进登录页,已登录进首页(pages/nav/nav)。
*/
onShow(() => {
uni.reLaunch({ url: isLoggedIn() ? '/pages/nav/nav' : '/pages/login/login' })
})
</script>
<style>
.content {
.boot {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
.boot-logo {
width: 180rpx;
height: 180rpx;
margin-bottom: 32rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
.boot-text {
font-size: 28rpx;
color: #8f8f94;
}
</style>