scorpio 2 years ago
parent
commit
0d0fdc096c
1 changed files with 4 additions and 7 deletions
  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')
       }
     },