From f4f958d2e9e619ad0fc18ecda76fa8d3371b1e9c Mon Sep 17 00:00:00 2001 From: H0nGzA1 <2505811377@qq.com> Date: Wed, 17 May 2023 23:48:59 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E2=9A=A1=20=E4=BC=98=E5=8C=96=E7=BB=86?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/layout/navBars/breadcrumb/user.vue | 2 +- web/src/stores/interface/index.ts | 2 +- web/src/stores/userInfo.ts | 6 +++--- web/src/types/pinia.d.ts | 2 +- web/src/types/views.d.ts | 2 +- web/src/utils/menu.ts | 1 - web/src/views/system/login/component/mobile.vue | 6 +++--- 7 files changed, 10 insertions(+), 11 deletions(-) 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 @@