!68 调用获取用户信息接口增加 await

Merge pull request !68 from yuanl/master
This commit is contained in:
lengleng 2023-09-08 03:24:43 +00:00 committed by Gitee
commit 999704dc61
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 5 deletions

View File

@ -145,10 +145,10 @@ export const checkToken = (refreshTime: number, refreshLock: boolean) => {
*
*/
export const getUserInfo = () => {
return request({
url: '/admin/user/info',
method: 'get',
});
return request({
url: '/admin/user/info',
method: 'get',
});
};
export const logout = () => {

View File

@ -122,7 +122,7 @@ export const useUserInfo = defineStore('userInfo', {
* @async
*/
async setUserInfos() {
getUserInfo().then((res) => {
await getUserInfo().then((res) => {
const userInfo: any = {
user: res.data.sysUser,
time: new Date().getTime(),