$.post异常处理

$.post异常处理

 $.post(url, val, function (data) {
    
    
                var data = eval('(' + data + ')');
                if (data.code == 0) {
    
    
                    layer.msg(data.msg);
                      layer.close(loading);
                } else {
    
    
                 
                    loadTable(data.data);
                    layer.close(loading);
                }
            },'josn').error(function () {
    
    
                layer.close(loading);
            })

猜你喜欢

转载自blog.csdn.net/qq_42455262/article/details/118187320