From dcfaeb33b37abe2428b15d961f4b5842b8883eba Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 9 Nov 2023 17:06:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=80=E6=9C=89=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E7=99=BB=E5=BD=95=EF=BC=8C=E5=9D=87=E5=BC=BA=E5=88=B6?= =?UTF-8?q?=E8=A6=81=E6=B1=82=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/auth/server/AuthServer.java | 5 +++++ core/frontend/src/App.vue | 6 ++++-- core/frontend/src/store/modules/user.js | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/backend/src/main/java/io/dataease/auth/server/AuthServer.java b/core/backend/src/main/java/io/dataease/auth/server/AuthServer.java index 9f1b2b082a..3684ff8869 100644 --- a/core/backend/src/main/java/io/dataease/auth/server/AuthServer.java +++ b/core/backend/src/main/java/io/dataease/auth/server/AuthServer.java @@ -196,6 +196,11 @@ public class AuthServer implements AuthApi { } if (user.getIsAdmin() && user.getPassword().equals("40b8893ea9ebc2d631c4bb42bb1e8996")) { result.put("passwordModified", false); + result.put("defaultPwd", "dataease"); + } + if (!user.getIsAdmin() && user.getPassword().equals("83d923c9f1d8fcaa46cae0ed2aaa81b5")) { + result.put("passwordModified", false); + result.put("defaultPwd", DEFAULT_PWD); } } diff --git a/core/frontend/src/App.vue b/core/frontend/src/App.vue index 380888af6b..40f3077521 100644 --- a/core/frontend/src/App.vue +++ b/core/frontend/src/App.vue @@ -13,7 +13,7 @@ :title="$t('user.change_password')" :show-close="false" > - + @@ -28,7 +28,8 @@ export default { components: { PluginCom, PasswordUpdateForm }, data() { return { - showPasswordModifiedDialog: false + showPasswordModifiedDialog: false, + defaultPwd: 'dataease' } }, computed: { @@ -46,6 +47,7 @@ export default { }, mounted() { const passwordModified = JSON.parse(localStorage.getItem('passwordModified')) + this.defaultPwd = localStorage.getItem('defaultPwd') if (typeof passwordModified === 'boolean') { this.$store.commit('user/SET_PASSWORD_MODIFIED', passwordModified) } diff --git a/core/frontend/src/store/modules/user.js b/core/frontend/src/store/modules/user.js index 4156ec3ea9..a49152b1c6 100644 --- a/core/frontend/src/store/modules/user.js +++ b/core/frontend/src/store/modules/user.js @@ -86,6 +86,9 @@ const actions = { if (Object.prototype.hasOwnProperty.call(data, 'passwordModified')) { passwordModified = data.passwordModified } + if (Object.prototype.hasOwnProperty.call(data, 'defaultPwd')) { + localStorage.setItem('defaultPwd', data.defaultPwd) + } commit('SET_PASSWORD_MODIFIED', passwordModified) localStorage.setItem('passwordModified', passwordModified) resolve()