scorpio 2 年之前
父節點
當前提交
0d0fdc096c
共有 1 個文件被更改,包括 4 次插入7 次删除
  1. 4 7
      src/views/dash/compoents/profile.vue

+ 4 - 7
src/views/dash/compoents/profile.vue

@@ -234,14 +234,11 @@ export default {
             method: 'POST',
             headers: this.headers,
             body: form
-          }).then(response => {
-            const { status, data = {} } = response
-            console.log(status, data)
-            console.log(response)
-            if (status >= 200 && status <= 401) {
-              this.updateAvatar(data.data.filePath)
-            }
           })
+            .then(response => response.json())
+            .then(body => {
+              console.log(JSON.stringify(body))
+            })
         }, 'image/png')
       }
     },