邀请成员接口登录过去清除缓存的登录信息

This commit is contained in:
付民康
2025-03-28 10:11:47 +08:00
parent 20595faacf
commit c36bb00e3a

View File

@@ -145,6 +145,7 @@ import {
import {getUserInfo} from "@/api/user";
import dayjs from "dayjs";
import debounce from 'lodash/debounce';
import { useAccount } from '@/utils/hooks/useAccount';
const userInfo = shallowRef<UserInfoType>({
username: '',
@@ -207,6 +208,9 @@ const memberRoleMap = {
[OrganizationMemberRoleEnum.MEMBER]: '成员'
};
const { accountInfo, RemoveInfo } = useAccount();
init();
function init() {
queryUserInfo();
@@ -246,6 +250,7 @@ function confirmCreateOrganizationBtnClick() {
}
async function createOrganization() {
debugger
const params = {
groupName: createFormData.organizationName,
groupDesc: createFormData.organizationProfile
@@ -254,6 +259,9 @@ async function createOrganization() {
try {
const res = await createOrganizationApi(params);
if (res.data?.code !== 200) {
if(res.data?.msg === '未登录') {
RemoveInfo()
}
Message.error(res.data?.msg || '创建失败');
} else {
closeOrganizationModal();