第三方系统注册后增加退出逻辑

dev
smallchill 6 years ago
parent 50385820e3
commit 8f2c16bbb7
  1. 8
      src/components/third-register/main.vue
  2. 13
      src/page/login/thirdlogin.vue

@ -35,6 +35,7 @@
import {registerGuest} from "@/api/user";
import {getTopUrl} from "@/util/util";
import {info} from "@/api/system/tenant";
import {resetRouter} from "@/router/router";
export default {
name: "thirdRegister",
@ -90,7 +91,12 @@
const data = res.data;
if (data.success) {
this.accountBox = false;
this.$alert("注册申请已提交,请耐心等待管理员通过!", '注册提示')
this.$alert("注册申请已提交,请耐心等待管理员通过!", '注册提示').then(() => {
this.$store.dispatch("LogOut").then(() => {
resetRouter();
this.$router.push({path: "/login"});
});
})
} else {
this.$message.error(data.msg || '提交失败');
}

@ -1,24 +1,24 @@
<template>
<div class="social-container">
<div class="box" @click="handleClick('github')">
<div @click="handleClick('github')">
<span class="container" :style="{backgroundColor:'#61676D'}">
<i icon-class="github" class="iconfont icongithub"></i>
</span>
<p class="title">{{$t('login.github')}}</p>
</div>
<div class="box" @click="handleClick('gitee')">
<div @click="handleClick('gitee')">
<span class="container" :style="{backgroundColor:'#c35152'}">
<i icon-class="gitee" class="iconfont icongitee2"></i>
</span>
<p class="title">{{$t('login.gitee')}}</p>
</div>
<div class="box" @click="handleClick('wechat_open')">
<div @click="handleClick('wechat_open')">
<span class="container" :style="{backgroundColor:'#8dc349'}">
<i icon-class="wechat" class="iconfont icon-weixin"/>
</span>
<p class="title">{{$t('login.wechat')}}</p>
</div>
<div class="box" @click="handleClick('qq')">
<div @click="handleClick('qq')">
<span class="container" :style="{backgroundColor:'#6ba2d6'}">
<i icon-class="qq" class="iconfont icon-qq"/>
</span>
@ -46,15 +46,14 @@
display: flex;
align-items: center;
justify-content: space-around;
.box {
cursor: pointer;
}
.iconfont {
color: #fff;
font-size: 30px;
}
.container {
$height: 50px;
cursor: pointer;
display: inline-block;
width: $height;
height: $height;

Loading…
Cancel
Save