主要讲述如何okUtils封装的工具类使用方法。

okUtils.ajax(url, type, params, load);
okUtils.ajax("/permission/tree", "get", null, true).done(function (response) {
    console.log(response);
}).fail(function (error) {
    console.log(error);
});
        
参数 类型 描述
url String 请求路径
type String 请求类型
params String 请求参数
load Boolean 是否显示loading