From d36e53d46c99b77d57504e2a3b3e83b8efe50fdf Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 30 Jun 2022 15:20:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=8F=90=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/user.js | 7 +++++++ frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 1 + frontend/src/lang/zh.js | 1 + frontend/src/layout/index.vue | 15 +++++++++++++-- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js index c57748d5d9..3a6864d28e 100644 --- a/frontend/src/api/user.js +++ b/frontend/src/api/user.js @@ -36,6 +36,13 @@ export function needModifyPwd() { }) } +export function removePwdTips() { + return request({ + url: '/api/auth/removeNoti', + method: 'post' + }) +} + export function defaultPwd() { return request({ url: '/api/auth/defaultPwd', diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index badb34af4a..44551917c3 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -138,6 +138,7 @@ export default { stop: 'Stop', first_login_tips: 'Please change the initial password', roger_that: 'Roger That', + donot_noti: 'Do not tips', apply: 'Apply', search: 'Search', folder: 'Folder', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 6227622d4d..c05e6a8a5e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -138,6 +138,7 @@ export default { stop: '停止', first_login_tips: '您使用的是初始密碼,記得修改密碼哦', roger_that: '知道了', + donot_noti: '不再提示', apply: '應用', search: '搜索', folder: '目錄', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index cd64192677..86895f03a5 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -138,6 +138,7 @@ export default { stop: '停止', first_login_tips: '您使用的是初始密码,记得修改密码哦', roger_that: '知道了', + donot_noti: '不再提示', apply: '应用', search: '搜索', folder: '目录', diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue index 763b188d4c..646650b1cd 100644 --- a/frontend/src/layout/index.vue +++ b/frontend/src/layout/index.vue @@ -15,6 +15,7 @@
{{ $t('commons.first_login_tips') }}
+ {{ $t('commons.donot_noti') }} {{ $t('commons.roger_that') }}
@@ -31,7 +32,7 @@ import DeContainer from '@/components/dataease/DeContainer' import DeAsideContainer from '@/components/dataease/DeAsideContainer' import bus from '@/utils/bus' -import { needModifyPwd } from '@/api/user' +import { needModifyPwd, removePwdTips } from '@/api/user' export default { name: 'Layout', @@ -49,7 +50,8 @@ export default { return { componentName: 'PanelMain', showTips: false, - finishLoad: false + finishLoad: false, + buttonDisable: false } }, computed: { @@ -104,6 +106,15 @@ export default { methods: { handleClickOutside() { this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) + }, + doNotNoti() { + this.buttonDisable = true + removePwdTips().then(res => { + this.showTips = false + this.buttonDisable = false + }).catch(e => { + this.buttonDisable = false + }) } } }