发表于: 2017-01-16 01:53:13
1 1293
今天完成的事情:
1.完成了资料审核的图片上传功能;
2.修改了后台审核资料了页面的显示布局;
明天计划的事情:
1.完善前台页面之间跳转的逻辑;
2.确定前台页面一些细节问题;
遇到的问题:
1.页面内有多个图片进行上传,上传后需要分别显示预览效果,需要动态的将返回的地址付给img;
收获:
1.使用了uploader上传后的状态也有很多;
- FileItem.prototype._onSuccess = function(response, status, headers) {this.isReady = false;//上传后就是falsethis.isUploading = false;this.isUploaded = true;this.isSuccess = true;this.isCancel = false;this.isError = false;this.progress = 100;this.index = null;this.onSuccess(response, status, headers); //没用,空函数};
2.实例uploader对象(应该是用这个词》。。)
var uploader = $scope.uploader = new FileUploader({ url: 'http://localhost:8080/服务器', });
3.上传队列数量的限制
uploader.filters.push({
name: 'customFilter',
fn: function(item, options) {
return this.queue.length < 10;
}
});
4.$http的简写写法中config的,虽然文档是这样写的,但是实际写的时候却没有效果,导致每次都是用的非简写写法。。。。。。
config | object | Object describing the request to be made and how it should be processed. The object has following properties:
|
评论