From e1023bb3313282b00d6dcdefd5d7e30d7aaa1bfc Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期四, 30 十一月 2023 11:13:29 +0800
Subject: [PATCH] update 优化 代码中存在的警告

---
 src/views/system/user/profile/index.vue |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index 341c08d..47a6632 100644
--- a/src/views/system/user/profile/index.vue
+++ b/src/views/system/user/profile/index.vue
@@ -10,7 +10,7 @@
           </template>
           <div>
             <div class="text-center">
-              <userAvatar :user="state.user" />
+              <userAvatar/>
             </div>
             <ul class="list-group list-group-striped">
               <li class="list-group-item">
@@ -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>
@@ -63,16 +66,19 @@
 </template>
 
 <script setup name="Profile" lang="ts">
-import userAvatar from "./userAvatar.vue";
-import userInfo from "./userInfo.vue";
-import resetPwd from "./resetPwd.vue";
+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<Record<string, 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