feat:去除路由守卫以及测试

This commit is contained in:
Xwen
2023-12-14 23:29:36 +08:00
parent 088a76b3cc
commit 8ad5f28e99
5 changed files with 103 additions and 90 deletions

View File

@@ -26,7 +26,7 @@
</el-form>
<RouterLink to="/register"> 没有账号前往注册</RouterLink>
<button class="login-btn" @click="login(loginFormRef)"> </button>
<button class="login-btn" @click="guestlogin">游客临时登录</button>
<button class="login-btn" @click="guestlogin">访客</button>
</div>
<div class="divider">
@@ -76,9 +76,6 @@ const loginForm = reactive({
code: "",
});
const guestlogin = async () => {
loginForm.userName = "guest";
loginForm.password = "123456";
await userStore.login(loginForm);
const redirect = route.query?.redirect ?? "/index";
router.push(redirect);
};