切换新版layui;增加表格多模板机制;增加local操作方法;增加页面记忆操作方法;删除多余代码;

This commit is contained in:
augushong
2024-11-12 17:45:29 +08:00
parent 684153c5fc
commit d91e73d1d3
7 changed files with 1262 additions and 333 deletions

View File

@@ -39,8 +39,27 @@ loading.hide = function (count) {
};
const tools = {};
// 操作本地缓存实现set和get
tools.setLocal = function (key, value) {
value = JSON.stringify([value]);
return localStorage.setItem(key, value);
};
tools.getLocal = function (key, defaultValue) {
var value = localStorage.getItem(key);
if (value) {
value = JSON.parse(value)[0];
return value;
}
return defaultValue;
};
tools.checkMobile = function () {
var userAgentInfo = navigator.userAgent;
var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];