邀请成员接口登录过去清除缓存的登录信息
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user