@@ -245,10 +245,16 @@ export default {
let _this = this;
console.log(e)
this.$util.weixinAvatarUpload(e.detail.avatarUrl,
+
function (res) {
_this.userInfo.avatar = res.data.link
- console.log("上传文件成功+++++++++++++++++++",res)
- })
+ console.log("头像文件成功+++++++++++++++++++",res)
+ },
+ function (err) {
+ console.log(err)
+ console.log("头像文件失败+++++++++++++++++++",res)
+ }
+ )
},
/**
@@ -536,6 +536,7 @@ export default {
* 头像上传
*/
weixinAvatarUpload:function(url,successCallback, errorCallback){
+ let that = this
uni.uploadFile({
url: HTTP_REQUEST_URL + UPLOAD_URL,
filePath: url,