feat: 获取扫码的参数

This commit is contained in:
2025-09-04 21:27:58 +08:00
parent 46a3b6a878
commit 613a2be148
5 changed files with 75 additions and 38 deletions

46
App.vue
View File

@@ -1,36 +1,36 @@
<script setup>
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { onLaunch, onShow, onHide, onLoad } from "@dcloudio/uni-app";
import { checkPhone } from "@/manager/LoginManager";
import { goLogin } from "@/hooks/useGoLogin";
import { goHome } from "@/hooks/useGoHome";
onLaunch(async () => {
console.log("App Launch");
console.log("App Launch");
const token = uni.getStorageSync("token");
const token = uni.getStorageSync("token");
// 检测是否绑定手机号和token
if (!token) {
goLogin();
// 检测是否绑定手机号和token
if (!token) {
goLogin();
return;
}
if (token) {
const res = await checkPhone();
if (res.data) {
goHome();
}
return;
}
if (token) {
const res = await checkPhone();
if (res.data) {
goHome();
}
}
});
onShow(() => {
console.log("App Show");
console.log("App Show");
});
onHide(() => {
console.log("App Hide");
console.log("App Hide");
});
</script>
@@ -41,18 +41,18 @@ onHide(() => {
page,
body,
#app {
font-family: PingFang SC, PingFang SC;
background-color: #e9f3f7;
height: 100vh;
width: 100vw;
font-family: PingFang SC, PingFang SC;
background-color: #e9f3f7;
height: 100vh;
width: 100vw;
}
/*每个页面公共css */
::-webkit-scrollbar {
display: none;
display: none;
}
.mb12 {
margin-bottom: 12px;
margin-bottom: 12px;
}
</style>