fix: textarea scroll bar, deactive count message

This commit is contained in:
jialin
2025-10-21 13:24:21 +08:00
parent 32ad9525a6
commit ccb6e72057
10 changed files with 52 additions and 18 deletions
+16 -2
View File
@@ -13,6 +13,7 @@ import {
writeState
} from '@/utils/localstore/index';
import { RequestConfig, history } from '@umijs/max';
import { message } from 'antd';
const loginPath = '/login';
@@ -51,13 +52,26 @@ export async function getInitialState(): Promise<{
const fetchUserInfo = async (): Promise<Global.UserInfo> => {
try {
const data = await queryCurrentUserState({
skipErrorHandler: true
skipErrorHandler: false
});
if (data.is_admin) {
getUpdateCheck();
}
return data;
} catch (error) {
} catch (error: any) {
const data = error?.response?.data;
if (data?.code === 401) {
message.error({
content: (
<div>
<span>{data?.message || 'Please login again.'}</span>
<br />
<div>Please contact the administrator.</div>
</div>
),
duration: 5
});
}
history.push(loginPath);
}
return {} as Global.UserInfo;