From 391a9156a907337531c5e6179f35ab4a26b39d29 Mon Sep 17 00:00:00 2001
From: WangHan <wwh_work@126,com>
Date: 星期四, 19 十二月 2024 09:42:39 +0800
Subject: [PATCH] 获取用户信息修改

---
 admin-web/src/views/systemSetting/user/profile/userInfo.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/admin-web/src/views/systemSetting/user/profile/userInfo.vue b/admin-web/src/views/systemSetting/user/profile/userInfo.vue
index 15362aa..69845fb 100644
--- a/admin-web/src/views/systemSetting/user/profile/userInfo.vue
+++ b/admin-web/src/views/systemSetting/user/profile/userInfo.vue
@@ -34,8 +34,8 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import {updatePerson,getCurInfo} from "@/api/user";
+import {mapGetters} from "vuex";
+import {getCurInfo, updatePerson} from "@/api/user";
 import {getDownUrl, upLoadFile} from "@/utils/base";
 
 export default {
@@ -45,8 +45,8 @@
     ])
   },
   created(){
-    this.user = JSON.parse(JSON.stringify(this.userInfo))
-    console.log(this.user)
+    // 鑾峰彇鐧诲綍鐢ㄦ埛淇℃伅
+    this.getUserInfo()
   },
   data() {
     return {
@@ -76,6 +76,11 @@
     };
   },
   methods: {
+    getUserInfo() {
+      getCurInfo().then(res => {
+        this.user = res
+      })
+    },
     getHead(){
       return this.baseUrl + this.user.avatar
     },

--
Gitblit v1.9.1