This commit is contained in:
parent
5e4855ccd9
commit
2baa76d893
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue