forked from github/dataease
feat: 修改初始密码提示优化
This commit is contained in:
parent
d66a4c37f0
commit
c85c633209
@ -36,6 +36,13 @@ export function needModifyPwd() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function removePwdTips() {
|
||||||
|
return request({
|
||||||
|
url: '/api/auth/removeNoti',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function defaultPwd() {
|
export function defaultPwd() {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/auth/defaultPwd',
|
url: '/api/auth/defaultPwd',
|
||||||
|
@ -138,6 +138,7 @@ export default {
|
|||||||
stop: 'Stop',
|
stop: 'Stop',
|
||||||
first_login_tips: 'Please change the initial password',
|
first_login_tips: 'Please change the initial password',
|
||||||
roger_that: 'Roger That',
|
roger_that: 'Roger That',
|
||||||
|
donot_noti: 'Do not tips',
|
||||||
apply: 'Apply',
|
apply: 'Apply',
|
||||||
search: 'Search',
|
search: 'Search',
|
||||||
folder: 'Folder',
|
folder: 'Folder',
|
||||||
|
@ -138,6 +138,7 @@ export default {
|
|||||||
stop: '停止',
|
stop: '停止',
|
||||||
first_login_tips: '您使用的是初始密碼,記得修改密碼哦',
|
first_login_tips: '您使用的是初始密碼,記得修改密碼哦',
|
||||||
roger_that: '知道了',
|
roger_that: '知道了',
|
||||||
|
donot_noti: '不再提示',
|
||||||
apply: '應用',
|
apply: '應用',
|
||||||
search: '搜索',
|
search: '搜索',
|
||||||
folder: '目錄',
|
folder: '目錄',
|
||||||
|
@ -138,6 +138,7 @@ export default {
|
|||||||
stop: '停止',
|
stop: '停止',
|
||||||
first_login_tips: '您使用的是初始密码,记得修改密码哦',
|
first_login_tips: '您使用的是初始密码,记得修改密码哦',
|
||||||
roger_that: '知道了',
|
roger_that: '知道了',
|
||||||
|
donot_noti: '不再提示',
|
||||||
apply: '应用',
|
apply: '应用',
|
||||||
search: '搜索',
|
search: '搜索',
|
||||||
folder: '目录',
|
folder: '目录',
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<div v-if="showTips" class="pwd-tips">
|
<div v-if="showTips" class="pwd-tips">
|
||||||
<span>{{ $t('commons.first_login_tips') }}</span>
|
<span>{{ $t('commons.first_login_tips') }}</span>
|
||||||
<div style="text-align: right; margin-bottom: 10px;">
|
<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>
|
<el-button type="primary" size="mini" @click="showTips = false">{{ $t('commons.roger_that') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="arrow" />
|
<div class="arrow" />
|
||||||
@ -31,7 +32,7 @@ import DeContainer from '@/components/dataease/DeContainer'
|
|||||||
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
|
||||||
import { needModifyPwd } from '@/api/user'
|
import { needModifyPwd, removePwdTips } from '@/api/user'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Layout',
|
name: 'Layout',
|
||||||
@ -49,7 +50,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
componentName: 'PanelMain',
|
componentName: 'PanelMain',
|
||||||
showTips: false,
|
showTips: false,
|
||||||
finishLoad: false
|
finishLoad: false,
|
||||||
|
buttonDisable: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -104,6 +106,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleClickOutside() {
|
handleClickOutside() {
|
||||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
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