mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-03 08:27:35 +08:00
feat: fotgot password
This commit is contained in:
@@ -29,7 +29,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hideMenu() {
|
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 })
|
body: JSON.stringify({ email: this.email })
|
||||||
})
|
})
|
||||||
this.isSending = false
|
this.isSending = false
|
||||||
const data = await res.json()
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
toast.success('验证码已发送')
|
toast.success('验证码已发送')
|
||||||
this.step = 1
|
this.step = 1
|
||||||
} else {
|
} else {
|
||||||
toast.error(data.error || '发送失败')
|
toast.error('请填写已注册邮箱')
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.isSending = false
|
this.isSending = false
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="login-page-button-secondary">没有账号? <a class="login-page-button-secondary-link" href="/signup">注册</a> |
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user