perf: 用户没有英文名时显示账号名

main
LiaoYijun 2 months ago
parent 1eea61a255
commit d1c70bb690

@ -4,6 +4,7 @@ import { appendRequestParams, fetchJSON, postForm } from '@/utils/request'
import { HT_HOST } from "@/config" import { HT_HOST } from "@/config"
import { loadPageSpy } from '@/pageSpy' import { loadPageSpy } from '@/pageSpy'
import { usingStorage } from '@/hooks/usingStorage' import { usingStorage } from '@/hooks/usingStorage'
import { isEmpty } from "@/utils/commons";
const KEY_LOGIN_TOKEN = 'G-STR:LOGIN_TOKEN' const KEY_LOGIN_TOKEN = 'G-STR:LOGIN_TOKEN'
const KEY_TRAVEL_AGENCY_ID = 'G-INT:TRAVEL_AGENCY_ID' const KEY_TRAVEL_AGENCY_ID = 'G-INT:TRAVEL_AGENCY_ID'
@ -76,10 +77,10 @@ const useAuthStore = create(devtools((set, get) => ({
set(() => ({ set(() => ({
currentUser: { currentUser: {
username: userJson.LoginName, username: userJson.LoginName,
realname: userJson.real_name, realname: isEmpty(userJson.real_name) ? userJson.LoginName : userJson.real_name,
rolesName: userJson.roles_name, rolesName: userJson.roles_name,
emailAddress: userJson.LMI_listmail, emailAddress: userJson.LMI_listmail,
travelAgencyName: userJson.VName, travelAgencyName: isEmpty(userJson.VName) ? userJson.LMI_VEI_SN : userJson.VName
} }
})) }))

Loading…
Cancel
Save