| | |
| | | <span class="app-name">Github</span> |
| | | </a> |
| | | |
| | | <a class="third-app" href="#" title="功能开发中..."> |
| | | <a class="third-app" href="#" @click="authUrl('wechar');" title="使用 微信 账号授权登录"> |
| | | <div class="git-other-login-icon"> |
| | | <svg-icon icon-class="wechat" /> |
| | | </div> |
| | | <span class="app-name">WeiXin</span> |
| | | </a> |
| | | |
| | | <a class="third-app" href="#" title="功能开发中..."> |
| | | <a class="third-app" href="#" @click="authUrl('qq');" title="使用 QQ 账号授权登录"> |
| | | <div class="git-other-login-icon"> |
| | | <svg-icon icon-class="qq" /> |
| | | </div> |
| | |
| | | <script lang="ts" setup> |
| | | import { authUnlock, authBinding } from "@/api/system/social/auth"; |
| | | import { PropType } from "vue"; |
| | | |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | | |
| | | const props = defineProps({ |
| | | auths: { |
| | |
| | | return authUnlock(row.id); |
| | | }).then((res: any) => { |
| | | if (res.code === 200) { |
| | | ElMessage.success("解绑成功"); |
| | | proxy?.$modal.msgSuccess("解绑成功"); |
| | | proxy?.$tab.refreshPage(); |
| | | } else { |
| | | ElMessage.error(res.msg); |
| | | proxy?.$modal.msgError(res.msg); |
| | | } |
| | | }).catch(() => { }); |
| | | }; |
| | |
| | | const authUrl = (source: string) => { |
| | | authBinding(source).then((res: any) => { |
| | | if (res.code === 200) { |
| | | window.location.href = res.msg; |
| | | window.location.href = res.data; |
| | | } else { |
| | | ElMessage.error(res.msg); |
| | | proxy?.$modal.msgError(res.msg); |
| | | } |
| | | }); |
| | | }; |