feat: 修改初始密码提示优化

This commit is contained in:
fit2cloud-chenyw
2022-06-30 15:20:50 +08:00
parent eb0b3562f0
commit d36e53d46c
5 changed files with 23 additions and 2 deletions

View File

@@ -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
})
}
}
}