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