We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function ajax(cfg) { cfg = cfg || {}; cfg.data = cfg.data || {}; cfg.datatype = cfg.datatype || 'json'; cfg.type = cfg.type || 'post'; cfg.id = cfg.id || 'cevin'; var dl = null; $.ajax({ url:cfg.url, type:cfg.type, data:cfg.data, dataType:cfg.datatype, beforeSend: function(){ dl = art.dialog({id:cfg.id,content:'正在提交...',lock:true}); }, success:function(data){ dl.close(); dl = art.dialog({id:cfg.id,lock:true,content:data.msg}); console.log(dl); if (data.code == 403) { dl.button({name:'确定',focus:true,callback:function(){ window.location.href = data.msg; }}).content('授权过期,请重新登录'); } else if(data.code != 1) { dl.title('错误'); } if (typeof(cfg.ok) == 'function') { cfg.ok(data,dialog); } }, error:function(){ dl.close(); art.dialog({id:cfg.id}).title('错误').content('发生错误,操作失败').lock(); }, cache:false }); }
如上代码。 ajax({id:'id',ok:function(){ajax({id:'other'})}}); 回调中再次执行的话,之前的窗口关闭了为什么?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如上代码。
ajax({id:'id',ok:function(){ajax({id:'other'})}}); 回调中再次执行的话,之前的窗口关闭了为什么?
The text was updated successfully, but these errors were encountered: