修复前台传入后台的compileId没有日志结果返回的时候,界面上loading没有正确消失变为0的bug

This commit is contained in:
wangxin
2018-09-03 15:02:31 +08:00
parent 5b674c04ab
commit c163f045b6

View File

@@ -1310,6 +1310,7 @@ var GetLogTotal=function(_data){
success:function(data,textStatus){//处理返回结果 success:function(data,textStatus){//处理返回结果
if(textStatus=="success"){ if(textStatus=="success"){
totalTrs.each(function(){ totalTrs.each(function(){
var hasLog=false;
for(var i=0;i<data.length;i++){ for(var i=0;i<data.length;i++){
if($(this).attr("compileId")==data[i].compileId){ if($(this).attr("compileId")==data[i].compileId){
$(this).attr("id",i+"logTotal"); $(this).attr("id",i+"logTotal");
@@ -1318,8 +1319,12 @@ var GetLogTotal=function(_data){
}else{ }else{
$(this).html(data[i].sum); $(this).html(data[i].sum);
} }
hasLog=true;
} }
} }
if(!hasLog){
$(this).html("0");
}
}) })
} }
}, },