const defaultIntercept = function (response,status,thrown,context) {
    //dataType数据类型
    context.dataType = context.dataType.toLowerCase();
    //默认回调处理
    if (context.dataType === "json"){
        if (!JsonUtils.isJson(response)) {
            if (options.url.indexOf(".") === -1){
                Web.go(url);
                return true;//true 拦截
            }
            return false;
        }
        ToastrUtils.showResult(response);
        if (Web.isSuccess(response)){
            return false;//false 不拦截
        }else {
            context.fail(response,status,thrown);
            return true;
        }
    }
};

Web.setBaseUrl(baseUrl);

Web.setPrototype({
    setFail:function (callback) {
        this.options.fail = callback;
        return this;//return this 链式调用
    }
});

Web.setDefault({
    fail:function () {},
    error:function (XMLHttpRequest, textStatus, errorThrown) {
        debugger;
        ToastrUtils.show("系统错误","ajax请求出错，可能原因授权过期，请重新登录！",9);
        console.log(XMLHttpRequest);
    }
});

const Server = {
    user:{
        getList:new WebBuilder("/user/getList"),
        add:new WebBuilder("/user/add",{intercepts:defaultIntercept}),
        delete:new WebBuilder("/user/delete",{intercepts:defaultIntercept}),
        update:new WebBuilder("/user/update",{intercepts:defaultIntercept})
    }
};
@@ -625,16 +625,403 @@
   %7D%0A%7D;%0A%0A
+const defaultListIntercept = function (response,status,thrown,context) %7B%0A%0A    if (!JsonUtils.isJson(response)) %7B%0A        ToastrUtils.show(%22%E7%B1%BB%E5%9E%8B%E4%B8%8D%E5%8C%B9%E9%85%8D%22,%22%22,9);%0A        console.log(response);%0A        return true;%0A    %7D%0A%0A    if (Web.isSuccess(response))%7B%0A        return false;//false %E4%B8%8D%E6%8B%A6%E6%88%AA%0A    %7D%0A%0A    ToastrUtils.showResult(response);%0A    context.fail(response,status,thrown);%0A    return true;%0A%7D;%0A%0A
 Web.setB
@@ -1487,16 +1487,50 @@
 getList%22
+,%7Bintercepts:defaultListIntercept%7D
 ),%0A     

update server.js