浏览代码

更新 userAvatar.vue

lex 3 年之前
父节点
当前提交
1cbdee47ad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/views/profile/userAvatar.vue

+ 1 - 1
src/views/profile/userAvatar.vue

@@ -168,7 +168,7 @@ export default {
 
       const formData = new FormData();
       formData.append("avatar", url);
-      uploadAvatar(formData).then(response => {
+      uploadAvatar({ avatar: url }).then(response => {
         if (response.code === 200) {
           this.options.img = url;
           this.msgSuccess("修改成功");