Commit 0594c0e0 authored by salitedfish's avatar salitedfish

bug修复

parent 37d0565a
......@@ -62,18 +62,22 @@ export default Vue.extend({
},
async fileUpload(event:any){
try{
this.$toast.loading('头像更新中...')
this.$toast.loading({
message: '头像更新中...',
duration: 20000,
})
this.file = event.target.files[0]
// this.$store.commit('app/SET_FILEDATA',event.target.files)
const upload = await this.$service.userService.avatarUpload(event.target.files[0])
if(upload){
this.avatarImgUrl = (upload as any).avatar
this.$util.userMsg.updateUserMsg(upload)
this.$toast.success('头像更新成功')
this.$toast.clear()
this.$toast.success('头像更新成功~')
}
// this.$router.push({name:'PhotoEdit'})
}catch(err){
this.$toast('头像更新失败')
this.$toast('头像更新失败~')
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment