|
|
|
@ -14,7 +14,7 @@ app.directive('loadHead',['$http','config','auth','$location','alertService',fun
|
|
|
|
|
var reader = new FileReader();
|
|
|
|
|
reader.readAsDataURL(file);
|
|
|
|
|
reader.onload = function (e) {
|
|
|
|
|
alert(this.result);//base64
|
|
|
|
|
// alert(this.result);//base64
|
|
|
|
|
|
|
|
|
|
$http.post(config.apiUrl + "users/upload_head",
|
|
|
|
|
{token: auth.token(),imgdata:this.result}
|
|
|
|
@ -25,7 +25,7 @@ app.directive('loadHead',['$http','config','auth','$location','alertService',fun
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
scope.$parent.alertService_1.showMessage('提示',"上传失败");
|
|
|
|
|
scope.$parent.alertService_1.showMessage('提示',response.data.message);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|