Skip to content

Commit bac49af

Browse files
quanquan2100vanoneang
authored andcommitted
feat(avatar): 更新头像取用 path 相对路径上传 (#211)
1 parent 558b5f7 commit bac49af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/layout/User.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export default {
282282
method: 'put',
283283
url: '/cms/user/avatar',
284284
data: {
285-
avatar: res[0].url,
285+
avatar: res[0].path,
286286
},
287287
}).then((res) => { // eslint-disable-line
288288
if (res.error_code === 0) {
@@ -292,7 +292,6 @@ export default {
292292
})
293293
this.cropVisible = false
294294
// 触发重新获取用户信息
295-
// this.$store.dispatch()
296295
return User.getInformation()
297296
}
298297
return Promise.reject(new Error('更新头像失败'))

0 commit comments

Comments
 (0)