字典存入缓存
This commit is contained in:
@ -3,7 +3,7 @@ import { Form, Input, Button, Checkbox, Tabs, message } from 'antd';
|
||||
import { UserOutlined, LockOutlined, EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
||||
import { history, useIntl } from 'umi';
|
||||
import './login.less';
|
||||
import { getCaptcha, supplierLogin, expertLogin, accountLogin, getUserinfo } from '@/servers/api/login';
|
||||
import { getCaptcha, supplierLogin, expertLogin, accountLogin, getUserinfo, refreshDictCache } from '@/servers/api/login';
|
||||
|
||||
import { encryptWithRsa } from '@/utils/encryptWithRsa'
|
||||
|
||||
@ -80,6 +80,12 @@ const LoginPage: React.FC = () => {
|
||||
}
|
||||
sessionStorage.setItem('currentUser', JSON.stringify(loginRes.data));
|
||||
|
||||
refreshDictCache().then((res) => {
|
||||
if(res.code == 200) {
|
||||
sessionStorage.setItem('dict', JSON.stringify(res.data))
|
||||
}
|
||||
})
|
||||
|
||||
getUserinfo().then(async (res) => {
|
||||
// if(res.code == 200) {
|
||||
const roleIdList = res.authorityList.map((item: any) => {
|
||||
|
Reference in New Issue
Block a user