refactor(user): 重构用户信息获
This commit is contained in:
@ -105,7 +105,7 @@
|
||||
import { Button, Checkbox, Form, FormItem, Input, message, Tabs, Typography } from 'ant-design-vue';
|
||||
import PuzzleVerification from '../PuzzleVerification.vue';
|
||||
import SelectAccountModal from '../select-account-modal/index.vue';
|
||||
import { fetchAuthorizationsCaptcha, fetchLoginCaptCha, fetchProfileInfo, postLoginPassword } from '@/api/all/login';
|
||||
import { fetchAuthorizationsCaptcha, fetchLoginCaptCha, fetchUserInfo, postLoginPassword } from '@/api/all/login';
|
||||
import { postClearRateLimiter } from '@/api/all/common';
|
||||
import { joinEnterpriseByInviteCode } from '@/api/all';
|
||||
import { computed, onUnmounted, reactive, ref } from 'vue';
|
||||
@ -268,7 +268,7 @@ const onTabChange = () => {
|
||||
|
||||
// 获取用户信息
|
||||
const getProfileInfo = async () => {
|
||||
const { code, data } = await fetchProfileInfo();
|
||||
const { code, data } = await fetchUserInfo();
|
||||
if (code === 200) {
|
||||
const enterprises = data['enterprises'];
|
||||
mobileNumber.value = data['mobile'];
|
||||
@ -283,6 +283,7 @@ const getProfileInfo = async () => {
|
||||
selectAccountModalRef.value.open();
|
||||
}
|
||||
} else {
|
||||
userStore.setUserInfo(data);
|
||||
router.push({ name: 'Trial' });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user