| | |
| | | </el-form-item> |
| | | <div style="display: flex;justify-content: flex-end;flex-direction: row;"> |
| | | <el-button circle> |
| | | <svg-icon icon-class="qq" @click="doSocialLogin('QQ')" /> |
| | | <svg-icon icon-class="qq" @click="doSocialLogin('qq')" /> |
| | | </el-button> |
| | | <el-button circle> |
| | | <svg-icon icon-class="wechat" @click="doSocialLogin('Wechat')" /> |
| | | <svg-icon icon-class="wechat" @click="doSocialLogin('wechat')" /> |
| | | </el-button> |
| | | <el-button circle> |
| | | <svg-icon icon-class="gitee" @click="doSocialLogin('gitee')" /> |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //检测租户选择框的变化 |
| | | watch(() => loginForm.value.tenantId, (val: string) => { |
| | | Cookies.set("tenantId", loginForm.value.tenantId, { expires: 30 }) |
| | | }); |
| | | |
| | | /** |
| | | * 第三方登录 |
| | | * @param type |
| | |
| | | const doSocialLogin = (type: string) => { |
| | | authBinding(type).then((res: any) => { |
| | | if (res.code === 200) { |
| | | window.location.href = res.msg; |
| | | } else { |
| | | // 获取授权地址跳转 |
| | | window.location.href = res.data; |
| | | } else { |
| | | ElMessage.error(res.msg); |
| | | } |
| | | }); |