優化獲取日誌失敗時的顯示。當ajax complex事件執行的時候,返回狀態如果爲success或者timeout之外的值,顯示failed

This commit is contained in:
wangxin
2018-08-26 18:13:21 +08:00
parent 576885f1e8
commit 8006664e60
3 changed files with 9 additions and 2 deletions

View File

@@ -64,6 +64,7 @@
hexCheck:"Please enter the HEX format character",
invisibleChar:"Please enter the visible character",
hasInvisibleChar:"The tag {0} has invisible character",
haveInvisibleChar:"The tags {0} have invisible character"
haveInvisibleChar:"The tags {0} have invisible character",
failed:"Failed"
});
}(jQuery));

View File

@@ -64,6 +64,7 @@
hexCheck:"请输入十六进制字符",
invisibleChar:"请输入可见字符",
hasInvisibleChar:"标签{0}包含不可见字符",
haveInvisibleChar:"标签{0}包含不可见字符"
haveInvisibleChar:"标签{0}包含不可见字符",
failed:"获取失败"
});
}(jQuery));

View File

@@ -1174,6 +1174,7 @@ var GetLogTotal=function(_data){
}
var totalTrs=$(_data.objs);
var timeout=$.validator.messages.timeout;
var failed=$.validator.messages.failed;
var request=$.ajax({
type:'post',
timeout:10000,//超时时间设置,查询接口时间过长超时
@@ -1197,6 +1198,10 @@ var GetLogTotal=function(_data){
totalTrs.each(function(){
$(this).html(timeout);
})
}else if(status !="success"){
totalTrs.each(function(){
$(this).html(failed);
})
}
}
});