feat: add loading message when sending password recovery code.

pull/59/head
ruibaby 2020-01-02 18:11:37 +08:00
parent 02cd68d680
commit e0ab5d4ffa
2 changed files with 20 additions and 8 deletions

View File

@ -300,11 +300,15 @@ export default {
},
handleUpdateTheme(themeId) {
const hide = this.$message.loading('更新中...', 0)
themeApi.update(themeId).then(response => {
hide()
this.$message.success('更新成功!')
this.loadThemes()
})
themeApi
.update(themeId)
.then(response => {
this.$message.success('更新成功!')
this.loadThemes()
})
.finally(() => {
hide()
})
},
handleDeleteTheme(key) {
themeApi.delete(key).then(response => {

View File

@ -67,6 +67,7 @@
v-model="resetParam.password"
type="password"
placeholder="新密码"
autocomplete="new-password"
>
<a-icon
slot="prefix"
@ -83,6 +84,7 @@
v-model="resetParam.confirmPassword"
type="password"
placeholder="确认密码"
autocomplete="new-password"
>
<a-icon
slot="prefix"
@ -148,9 +150,15 @@ export default {
})
return
}
adminApi.sendResetCode(this.resetParam).then(response => {
this.$message.info('邮件发送成功,五分钟内有效')
})
const hide = this.$message.loading('发送中...', 0)
adminApi
.sendResetCode(this.resetParam)
.then(response => {
this.$message.info('邮件发送成功,五分钟内有效')
})
.finally(() => {
hide()
})
},
handleResetPassword() {
if (!this.resetParam.username) {