This commit is contained in:
2026-06-11 15:35:54 +08:00
parent 5e4855ccd9
commit 2baa76d893
1 changed files with 16 additions and 4 deletions

View File

@ -48,13 +48,13 @@
clearable
size="large"
/>
<router-link to="/user/forgot-password" class="forgot-password">忘记密码</router-link>
</el-form-item>
</Transition>
<el-form-item class="form-submit">
<el-button type="primary" @click="handleLogin" :loading="activeTab === 'password' && buttonLoading">登录</el-button>
</el-form-item>
<router-link to="/user/register" class="to-register">没有账号去注册</router-link>
<span class="forgot-password" @click="handleForgotPassword">忘记密码</span>
<span class="to-register" @click="handleRegister">没有账号去注册</span>
</el-form>
</div>
</template>
@ -239,6 +239,18 @@ const handleBack = () => {
loginFormRef.value?.clearValidate(['email', 'phone'])
}
}
// -
const handleRegister = () => {
userStore.clearUserInfo()
router.push('/user/register')
}
// -
const handleForgotPassword = () => {
userStore.clearUserInfo()
router.push('/user/forgot-password')
}
</script>
<style scoped lang="scss">
@ -267,7 +279,7 @@ const handleBack = () => {
.forgot-password {
font-size: 14px;
color: #409eff;
text-decoration: none;
cursor: pointer;
}
.form-submit {
@ -280,7 +292,7 @@ const handleBack = () => {
.to-register {
display: flex;
justify-content: center;
text-decoration: none;
cursor: pointer;
color: #409eff;
margin-top: 24px;
}