Explorar o código

删除无用的传参

RuoYi %!s(int64=2) %!d(string=hai) anos
pai
achega
b00775f988

+ 1 - 1
ruoyi-ui/src/views/system/user/profile/index.vue

@@ -8,7 +8,7 @@
8 8
           </div>
9 9
           <div>
10 10
             <div class="text-center">
11
-              <userAvatar :user="user" />
11
+              <userAvatar />
12 12
             </div>
13 13
             <ul class="list-group list-group-striped">
14 14
               <li class="list-group-item">

+ 1 - 6
ruoyi-ui/src/views/system/user/profile/userAvatar.vue

@@ -61,11 +61,6 @@ import { debounce } from '@/utils'
61 61
 
62 62
 export default {
63 63
   components: { VueCropper },
64
-  props: {
65
-    user: {
66
-      type: Object
67
-    }
68
-  },
69 64
   data() {
70 65
     return {
71 66
       // 是否显示弹出层
@@ -140,7 +135,7 @@ export default {
140 135
         formData.append("avatarfile", data);
141 136
         uploadAvatar(formData).then(response => {
142 137
           this.open = false;
143
-          this.options.img = response.imgUrl;
138
+          this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
144 139
           store.commit('SET_AVATAR', this.options.img);
145 140
           this.$modal.msgSuccess("修改成功");
146 141
           this.visible = false;