feat: 调整登录逻辑

This commit is contained in:
duanshuwen committed 2025-09-12 22:20:01 +08:00
1 parent 07752394eb
commit c03a4200be
12 files changed
+248 -175

No files matched your search

+5 -1
View File
@@ -38,6 +38,7 @@
<script setup>
import { ref, onMounted } from "vue";
import { getLoginUserPhone } from "@/request/api/LoginApi";
import { checkToken } from "@/hooks/useGoLogin";
// 假数据
const userInfo = ref({
@@ -60,11 +61,14 @@ const menuList = ref([
// 生命周期钩子
onMounted(() => {
getLoginUserPhoneInfo();
checkToken().then(() => {
getLoginUserPhoneInfo();
});
});
const getLoginUserPhoneInfo = async () => {
const res = await getLoginUserPhone();
if (res.code === 0) {
userInfo.value.phone = res.data;
}