|
|
@@ -9,7 +9,7 @@ export async function queryCurrent() { |
|
|
|
if(!accountId) { |
|
|
|
return errorReponse(''); |
|
|
|
} |
|
|
|
const res = await fetchApi<API.ResponseData<any>>('user/queryUserByUserId', { id: accountId }); |
|
|
|
const res = await fetchApi<API.ResponseData<DATA.User>>('user/queryUserByUserId', { id: accountId }); |
|
|
|
|
|
|
|
// const data = firstCharToLowerCase(Object.assign({}, propertyOf(res)('Data.UserExt', {}), res.data || {})); |
|
|
|
// data.roleName = roleMap[data.permission] || ''; |
|
|
@@ -62,5 +62,5 @@ export async function login(account: string, password: string) { |
|
|
|
|
|
|
|
export function logout() { |
|
|
|
storage.clear(); |
|
|
|
history.replace('/login'); |
|
|
|
window.location.href = '/login'; |
|
|
|
} |