Commit 71971d03 by 陈超

T

parent 73a09a88
......@@ -221,7 +221,8 @@
}
}, 'json');
},
onRead: function(r) {
onRead: function(r) {
let that = this
let formData = new FormData()
formData.append('file', r.file)
let url = U('widget/Upload/save') + '&attach_type=avatar&upload_type=image&thumb=1&width=44&height=44&cut=false'
......@@ -231,8 +232,10 @@
data: formData,
contentType: false,
processData: false,
success: function(data) {
console.log(data)
success: function(res) {
if(res.status == 1) {
that.currentAvatar = res.data.src
}
},
error: function(data) {
console.log(data)
......
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