From eb241ea3ec4aabec5ea147cb804ec95017db7329 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Tue, 3 May 2022 02:02:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A3=20=E6=9E=B6=E6=9E=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=87=8D=E6=96=B0=E9=85=8D=E7=BD=AE,=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BA=E7=9B=AE=E5=89=8D=E5=85=AC=E5=8F=B8=E6=9C=80?= =?UTF-8?q?=E5=90=88=E9=80=82=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../override/KiccCustomTokenServices.java | 2 + .../kicc/gateway/filter/ApiLoggingFilter.java | 3 +- .../header/components/lock/LockModal.vue | 6 +- .../header/components/user-dropdown/index.vue | 6 +- kicc-ui/src/store/modules/lock.ts | 1 + .../workbench/components/WorkbenchHeader.vue | 2 +- kicc-ui/src/views/sys/lock/LockPage.vue | 117 +++++++----------- .../views/sys/login/SessionTimeoutLogin.vue | 4 +- kicc-ui/src/views/system/dept/DeptModal.vue | 2 +- kicc-ui/src/views/system/menu/MenuModal.vue | 2 +- 10 files changed, 62 insertions(+), 83 deletions(-) diff --git a/kicc-common/kicc-common-security/src/main/java/com/cloud/kicc/common/security/override/KiccCustomTokenServices.java b/kicc-common/kicc-common-security/src/main/java/com/cloud/kicc/common/security/override/KiccCustomTokenServices.java index 9fb41b8b..42be3734 100644 --- a/kicc-common/kicc-common-security/src/main/java/com/cloud/kicc/common/security/override/KiccCustomTokenServices.java +++ b/kicc-common/kicc-common-security/src/main/java/com/cloud/kicc/common/security/override/KiccCustomTokenServices.java @@ -50,6 +50,7 @@ public class KiccCustomTokenServices implements AuthorizationServerTokenServices * Initialize these token services. If no random generator is set, one will be * created. */ + @Override public void afterPropertiesSet() { Assert.notNull(tokenStore, "tokenStore must be set"); } @@ -89,6 +90,7 @@ public class KiccCustomTokenServices implements AuthorizationServerTokenServices return accessToken; } + @Override @Transactional(noRollbackFor = { InvalidTokenException.class, InvalidGrantException.class }) public OAuth2AccessToken refreshAccessToken(String refreshTokenValue, TokenRequest tokenRequest) throws AuthenticationException { diff --git a/kicc-gateway/src/main/java/com/cloud/kicc/gateway/filter/ApiLoggingFilter.java b/kicc-gateway/src/main/java/com/cloud/kicc/gateway/filter/ApiLoggingFilter.java index 194d0c0e..86aefec7 100644 --- a/kicc-gateway/src/main/java/com/cloud/kicc/gateway/filter/ApiLoggingFilter.java +++ b/kicc-gateway/src/main/java/com/cloud/kicc/gateway/filter/ApiLoggingFilter.java @@ -26,7 +26,8 @@ public class ApiLoggingFilter implements GlobalFilter, Ordered { private static final String START_TIME = "startTime"; - private static final String X_REAL_IP = "X-Real-IP";// nginx需要配置 + /** nginx需要配置 */ + private static final String X_REAL_IP = "X-Real-IP"; @Override public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { diff --git a/kicc-ui/src/layouts/default/header/components/lock/LockModal.vue b/kicc-ui/src/layouts/default/header/components/lock/LockModal.vue index 657fc6c9..7047aa98 100644 --- a/kicc-ui/src/layouts/default/header/components/lock/LockModal.vue +++ b/kicc-ui/src/layouts/default/header/components/lock/LockModal.vue @@ -10,7 +10,7 @@

- {{ getRealName }} + {{ getNickName }}

@@ -43,7 +43,7 @@ const userStore = useUserStore(); const lockStore = useLockStore(); - const getRealName = computed(() => userStore.getUserInfo?.realName); + const getNickName = computed(() => userStore.getUserInfo?.nickName); const [register, { closeModal }] = useModalInner(); const [registerForm, { validateFields, resetFields }] = useForm({ @@ -78,7 +78,7 @@ return { t, prefixCls, - getRealName, + getNickName, register, registerForm, handleLock, diff --git a/kicc-ui/src/layouts/default/header/components/user-dropdown/index.vue b/kicc-ui/src/layouts/default/header/components/user-dropdown/index.vue index c0338ac1..185ed7f8 100644 --- a/kicc-ui/src/layouts/default/header/components/user-dropdown/index.vue +++ b/kicc-ui/src/layouts/default/header/components/user-dropdown/index.vue @@ -4,7 +4,7 @@ - {{ getUserInfo.realName }} + {{ getUserInfo.nickName }} @@ -58,8 +58,8 @@ const userStore = useUserStore(); const getUserInfo = computed(() => { - const { realName = '', avatar, desc } = userStore.getUserInfo || {}; - return { realName, avatar: avatar, desc }; + const { nickName = '', avatar, remarks } = userStore.getUserInfo || {}; + return { nickName, avatar: avatar, remarks }; }); const [register, { openModal }] = useModal(); diff --git a/kicc-ui/src/store/modules/lock.ts b/kicc-ui/src/store/modules/lock.ts index a255c7ff..5ae85abc 100644 --- a/kicc-ui/src/store/modules/lock.ts +++ b/kicc-ui/src/store/modules/lock.ts @@ -52,6 +52,7 @@ export const useLockStore = defineStore({ username, password: password!, goHome: false, + // todo: 锁屏解锁登录,需要验证码,后期完善 realKey: '', code: '', diff --git a/kicc-ui/src/views/dashboard/workbench/components/WorkbenchHeader.vue b/kicc-ui/src/views/dashboard/workbench/components/WorkbenchHeader.vue index d29149fa..a532db41 100644 --- a/kicc-ui/src/views/dashboard/workbench/components/WorkbenchHeader.vue +++ b/kicc-ui/src/views/dashboard/workbench/components/WorkbenchHeader.vue @@ -2,7 +2,7 @@
-

早安, {{ userinfo.realName }}, 开始您一天的工作吧!

+

早安, {{ userinfo.nickName }}, 开始您一天的工作吧!

今日晴,20℃ - 32℃!
diff --git a/kicc-ui/src/views/sys/lock/LockPage.vue b/kicc-ui/src/views/sys/lock/LockPage.vue index 444d4282..878d770f 100644 --- a/kicc-ui/src/views/sys/lock/LockPage.vue +++ b/kicc-ui/src/views/sys/lock/LockPage.vue @@ -1,92 +1,73 @@