lk-h5-tools
v0.1.5
Published
``` IItMessage.error(`我是错误消息${index}`); IItMessage.warning(`我是警告消息${index}`); IItMessage.success(`我是成功消息${index}`); IItMessage.info(`我是消息${index}`); ``` ## IIRequest 示例 ``` const baseURL = "https://xxx.com/api/"; const http = new IIRequest(baseUR
Downloads
1
Readme
IIRequest 示例
IItMessage.error(`我是错误消息${index}`);
IItMessage.warning(`我是警告消息${index}`);
IItMessage.success(`我是成功消息${index}`);
IItMessage.info(`我是消息${index}`);
IIRequest 示例
const baseURL = "https://xxx.com/api/";
const http = new IIRequest(baseURL, 'token', 200)
function testHttp() {
http.get("/client/c/commodity/banner/list", {}).then((res: any) => {
console.log("请求获取的数据", res)
IItMessage.success(`请求获取的数据`);
}).catch(err => {
IItMessage.error(err || '请求失败');
})
}
IITokenStorage 示例
IITokenStorage.set("12312321312321");
document.querySelector("#tokenId")!.innerHTML = IITokenStorage.get();
IICache 示例
IICache.set("prODSASHJDHA", {name: '匿名', age: '张三'}, false);
IICache.get("prODSASHJDHA", { isParse: true, isDelete: false }, "默认值");
IICache.remove("prODSASHJDHA", false);