add error catch function

This commit is contained in:
Li Jianxuan 2015-01-31 14:40:21 +00:00
parent 6c02de446d
commit 4bad6a36cd
1 changed files with 6 additions and 4 deletions

View File

@ -162,6 +162,7 @@ $this->headTitle()->setSeparator(' - ');
'url':'/admin/data/dataimport/ac/checktables',
'data':$('#schema-form').serialize(),
'success':function(data){
if (data!=true)
{
if(!$.isEmptyObject(data))
@ -188,8 +189,11 @@ $this->headTitle()->setSeparator(' - ');
},
'complete' : function(){
$('#error-loading').hide();
},
'error' : function(){
$(".error-alerts").show();
$("#errors").html("数据表字段检测失败,请检查导入得文件是否于数据表中得字段对应");
}
});
},
getFields : function (){
@ -204,8 +208,6 @@ $this->headTitle()->setSeparator(' - ');
return true;
}
console.log(data);
$(".error-alerts").show();
var html = new Array();
@ -225,7 +227,7 @@ $this->headTitle()->setSeparator(' - ');
},
'timeout': 30000,
'beforeSend' : function(){
$('#error-loading').html("正在校验数据是否可以导入......");
$('#error-loading').html("正在获取数据表信息......");
$('#error-loading').show();
},
'complete' : function(){