mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-01 01:21:04 +08:00
feat: fotgot password
This commit is contained in:
@@ -29,7 +29,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
hideMenu() {
|
||||
return ['/login', '/signup', '/404', '/signup-reason', '/github-callback', '/twitter-callback', '/discord-callback'].includes(this.$route.path)
|
||||
return ['/login', '/signup', '/404', '/signup-reason', '/github-callback', '/twitter-callback', '/discord-callback', '/forgot-password'].includes(this.$route.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,12 +62,11 @@ export default {
|
||||
body: JSON.stringify({ email: this.email })
|
||||
})
|
||||
this.isSending = false
|
||||
const data = await res.json()
|
||||
if (res.ok) {
|
||||
toast.success('验证码已发送')
|
||||
this.step = 1
|
||||
} else {
|
||||
toast.error(data.error || '发送失败')
|
||||
toast.error('请填写已注册邮箱')
|
||||
}
|
||||
} catch (e) {
|
||||
this.isSending = false
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login-page-button-secondary">没有账号? <a class="login-page-button-secondary-link" href="/signup">注册</a> |
|
||||
<a class="login-page-button-secondary-link" href="/forgot-password">找回密码</a>
|
||||
<a class="login-page-button-secondary-link" :href="`/forgot-password?email=${username}`">找回密码</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user