forked from github/dataease
feat: 修改初始密码提示优化
This commit is contained in:
parent
eb0b3562f0
commit
d36e53d46c
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -138,6 +138,7 @@ export default {
|
||||
stop: '停止',
|
||||
first_login_tips: '您使用的是初始密碼,記得修改密碼哦',
|
||||
roger_that: '知道了',
|
||||
donot_noti: '不再提示',
|
||||
apply: '應用',
|
||||
search: '搜索',
|
||||
folder: '目錄',
|
||||
|
@ -138,6 +138,7 @@ export default {
|
||||
stop: '停止',
|
||||
first_login_tips: '您使用的是初始密码,记得修改密码哦',
|
||||
roger_that: '知道了',
|
||||
donot_noti: '不再提示',
|
||||
apply: '应用',
|
||||
search: '搜索',
|
||||
folder: '目录',
|
||||
|
@ -15,6 +15,7 @@
|
||||
<div v-if="showTips" class="pwd-tips">
|
||||
<span>{{ $t('commons.first_login_tips') }}</span>
|
||||
<div style="text-align: right; margin-bottom: 10px;">
|
||||
<el-button size="mini" :disabled="buttonDisable" style="padding-right: 65px;" type="text" @click="doNotNoti">{{ $t('commons.donot_noti') }}</el-button>
|
||||
<el-button type="primary" size="mini" @click="showTips = false">{{ $t('commons.roger_that') }}</el-button>
|
||||
</div>
|
||||
<div class="arrow" />
|
||||
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user