From a8f575fe6f4440ca62bb2ad850bbc0baf77ded5d Mon Sep 17 00:00:00 2001
From: 三个三 <2029364173@qq.com>
Date: 星期日, 02 七月 2023 15:29:28 +0800
Subject: [PATCH] !20 统一登录授权 * 统一授权登录 * 对接后端更改做了适配, * 前端实现切换租户选择第三方授权登录,和优化第三方页面登录注册

---
 src/views/system/user/profile/index.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index 341c08d..b06da65 100644
--- a/src/views/system/user/profile/index.vue
+++ b/src/views/system/user/profile/index.vue
@@ -55,6 +55,9 @@
             <el-tab-pane label="淇敼瀵嗙爜" name="resetPwd">
               <resetPwd />
             </el-tab-pane>
+            <el-tab-pane label="绗笁鏂瑰簲鐢�" name="thirdParty">
+              <thirdParty :auths="state.auths" />
+            </el-tab-pane>
           </el-tabs>
         </el-card>
       </el-col>
@@ -66,13 +69,16 @@
 import userAvatar from "./userAvatar.vue";
 import userInfo from "./userInfo.vue";
 import resetPwd from "./resetPwd.vue";
+import thirdParty from "./thirdParty.vue";
+import { getAuthList } from "@/api/system/social/auth";
 import { getUserProfile } from "@/api/system/user";
 
 const activeTab = ref("userinfo");
-const state = ref<{ user: any; roleGroup: string;  postGroup: string}>({
+const state = ref<{ user: any; roleGroup: string;  postGroup: string; auths:any[]}>({
     user: {},
     roleGroup: '',
-    postGroup: ''
+    postGroup: '',
+    auths: [],
 });
 
 const userForm = ref({});
@@ -85,7 +91,13 @@
     state.value.postGroup = res.data.postGroup;
 };
 
+const getAuths = async () => {
+    const res = await getAuthList();
+    state.value.auths = res.data;
+};
+
 onMounted(() => {
     getUser();
+    getAuths();
 })
 </script>

--
Gitblit v1.9.3