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) { handleUpdateTheme(themeId) {
const hide = this.$message.loading('更新中...', 0) const hide = this.$message.loading('更新中...', 0)
themeApi.update(themeId).then(response => { themeApi
hide() .update(themeId)
.then(response => {
this.$message.success('更新成功!') this.$message.success('更新成功!')
this.loadThemes() this.loadThemes()
}) })
.finally(() => {
hide()
})
}, },
handleDeleteTheme(key) { handleDeleteTheme(key) {
themeApi.delete(key).then(response => { themeApi.delete(key).then(response => {

View File

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