diff --git a/web/src/layout/navBars/breadcrumb/user.vue b/web/src/layout/navBars/breadcrumb/user.vue index 91be209..a762c37 100644 --- a/web/src/layout/navBars/breadcrumb/user.vue +++ b/web/src/layout/navBars/breadcrumb/user.vue @@ -60,7 +60,7 @@ - {{ userInfos.userName === '' ? 'common' : userInfos.userName }} + {{ userInfos.username === '' ? 'common' : userInfos.username }} diff --git a/web/src/stores/interface/index.ts b/web/src/stores/interface/index.ts index e60a85f..98d016b 100644 --- a/web/src/stores/interface/index.ts +++ b/web/src/stores/interface/index.ts @@ -6,7 +6,7 @@ // 用户信息 export interface UserInfosState { avatar: string; - userName: string; + username: string; name: string; email: string; mobile: string; diff --git a/web/src/stores/userInfo.ts b/web/src/stores/userInfo.ts index 21342ad..4bef2a9 100644 --- a/web/src/stores/userInfo.ts +++ b/web/src/stores/userInfo.ts @@ -10,7 +10,7 @@ export const useUserInfo = defineStore('userInfo', { state: (): UserInfosStates => ({ userInfos: { avatar: '', - userName: '', + username: '', name: '', email: '', mobile: '', @@ -30,7 +30,7 @@ export const useUserInfo = defineStore('userInfo', { actions: { async updateUserInfos() { let userInfos: any = await this.getApiUserInfo(); - this.userInfos.userName = userInfos.data.name; + this.userInfos.username = userInfos.data.name; this.userInfos.avatar = userInfos.data.avatar; this.userInfos.name = userInfos.data.name; this.userInfos.email = userInfos.data.email; @@ -46,7 +46,7 @@ export const useUserInfo = defineStore('userInfo', { this.userInfos = Session.get('userInfo'); } else { let userInfos: any = await this.getApiUserInfo(); - this.userInfos.userName = userInfos.data.name; + this.userInfos.username = userInfos.data.name; this.userInfos.avatar = userInfos.data.avatar; this.userInfos.name = userInfos.data.name; this.userInfos.email = userInfos.data.email; diff --git a/web/src/types/pinia.d.ts b/web/src/types/pinia.d.ts index 09c6e47..feb586b 100644 --- a/web/src/types/pinia.d.ts +++ b/web/src/types/pinia.d.ts @@ -9,7 +9,7 @@ declare interface UserInfosState { photo: string; roles: string[]; time: number; - userName: string; + username: string; [key: string]: T; }; } diff --git a/web/src/types/views.d.ts b/web/src/types/views.d.ts index 6358356..fe9b1aa 100644 --- a/web/src/types/views.d.ts +++ b/web/src/types/views.d.ts @@ -90,7 +90,7 @@ declare type TreeType = { // user declare type RowUserType = { - userName: string; + username: string; userNickname: string; roleSign: string; department: string[]; diff --git a/web/src/utils/menu.ts b/web/src/utils/menu.ts index 9de5a0e..42ff823 100644 --- a/web/src/utils/menu.ts +++ b/web/src/utils/menu.ts @@ -45,6 +45,5 @@ export const handleMenu = (menuData: Array) => { }, ...data ] - console.log(menu) return menu } diff --git a/web/src/views/system/login/component/mobile.vue b/web/src/views/system/login/component/mobile.vue index 9664bb0..6b578c2 100644 --- a/web/src/views/system/login/component/mobile.vue +++ b/web/src/views/system/login/component/mobile.vue @@ -1,7 +1,7 @@