feat: 新增登录功能交互

This commit is contained in:
duanshuwen
2025-07-26 17:57:25 +08:00
parent 5321b27176
commit 00c2b9e2d7
20 changed files with 393 additions and 100 deletions

17
App.vue
View File

@@ -1,8 +1,21 @@
<script setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { checkPhone } from "@/manager/LoginManager";
import { goHome } from "@/hooks/useGoHome";
onLaunch(() => {
onLaunch(async () => {
console.log("App Launch");
const token = uni.getStorageSync("token");
// 检测是否绑定手机号和token
if (token) {
const res = await checkPhone();
if (res.data) {
goHome();
}
}
});
onShow(() => {
@@ -20,7 +33,7 @@ page,
body,
#app {
font-family: PingFang SC, PingFang SC;
background-color: #E9F3F7;
background-color: #e9f3f7;
height: 100vh;
width: 100vw;
}