Commit dabde03a by maxiaohan

如登录时有token 直接跳转home页

parent 987eb654
......@@ -26,6 +26,7 @@
<div class=" middle margin_top25_bottom10">
<el-button
class="magin_left_right30"
:class="{ active: loginType.accountStatus }"
:autofocus="true"
type="text"
@click="changeLoginType(1)"
......@@ -35,6 +36,7 @@
<el-button
class="magin_left_right30"
type="text"
:class="{ active: loginType.keyStatus }"
@click="changeLoginType(2)"
>KEY登录
</el-button>
......@@ -60,7 +62,7 @@
</template>
<script>
import zoom from '@/utils/autosize';
import zoom from "@/utils/autosize";
import accountsLogin from "./modules/AccountsLogin.vue";
import keyLogin from "./modules/KeyLogin.vue";
......@@ -123,6 +125,9 @@ export default {
// zoom('homepage_hero_module')
// })
this.loginType.accountStatus = true;
if (localStorage.getItem("token") !== null) {
this.$router.push("/Home/Home");
}
// todo 初始登录 帐号密码登录选中状态
// this.init();
// 视频自动适应高度
......@@ -197,6 +202,9 @@ video {
font-family: MicrosoftYaHei;
}
.active {
color: #ffffff;
}
.el-button--text:focus {
width: 108px;
height: 24px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment