first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1 @@
a2a7a15c-4455-49dd-8bbe-741a3a008979

View File

@@ -0,0 +1,19 @@
function http(option) {
return new Promise(function(resolve,reject) {
$.ajax({
type: option.type,
url: `${Config.BaseUrl}${option.url}`,
data: option.data,
success: function(res) {
if (res.status == 200) {
resolve(res.result)
} else {
alert(res.message)
}
},
error: function(err) {
reject(err);
},
})
});
}

View File

@@ -0,0 +1,25 @@
function debounce(fn,delay) {
var timeout = null; // 创建一个标记用来存放定时器的返回值
return function (e) {
// 每当用户输入的时候把前一个 setTimeout clear 掉
clearTimeout(timeout);
// 然后又创建一个新的 setTimeout, 这样就能保证interval 间隔内如果时间持续触发,就不会执行 fn 函数
timeout = setTimeout(() => {
console.log("111111")
console.log( fn())
// fn.apply(this, arguments);
}, delay);
};
}
/**
*
* @param name
* @returns {string|null}
* @constructor
*/
function GetQueryString(name) {
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}