From 319b37fe98d04df1e3af0f0d956ab42cb057680c Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail.com>
Date: 星期二, 20 六月 2023 19:15:58 +0800
Subject: [PATCH] 合并 ts

---
 src/views/system/user/profile/index.vue |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index 21638e3..31dc6ea 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,26 +69,35 @@
 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<Record<string, any>>({
-  user: {},
-  roleGroup: '',
-  postGroup: ''
+    user: {},
+    roleGroup: '',
+    postGroup: '',
+    auths: []
 });
 
 const userForm = ref({});
 
 const getUser = async () => {
-  const res = await getUserProfile();
-  state.value.user = res.data.user;
-  userForm.value = { ...res.data.user }
-  state.value.roleGroup = res.data.roleGroup;
-  state.value.postGroup = res.data.postGroup;
+    const res = await getUserProfile();
+    state.value.user = res.data.user;
+    userForm.value = { ...res.data.user }
+    state.value.roleGroup = res.data.roleGroup;
+    state.value.postGroup = res.data.postGroup;
+};
+
+const getAuths = async () => {
+    const res = await getAuthList();
+    state.value.auths = res.data;
 };
 
 onMounted(() => {
-  getUser();
+    getUser();
+    getAuths();
 })
 </script>

--
Gitblit v1.9.3