1.5使用filter格式化返回数据无效
Closed this issue · 2 comments
jixiangac commented
uploader.set('filter',function(data){
var result = S.JSON.parse(data);
if(result.success) result.status = 1;
return result;
});
服务端返回的数据是{"success": true},
没有stastus字段,所以通过这个更改,无效?
minghe commented
使用1.5.4版本试试~
blueforest commented
我也是同样的问题:uploader.set('filter',function(data){
if(data.code==200 && data.count==1){
console.log(data)
return{
status:1,
url:data.data[0].link
}
}
});
我用的是1.5.4版本