优化滚动

This commit is contained in:
2022-05-20 20:32:39 +08:00
parent f30e174e3e
commit 8112d38499
21 changed files with 240 additions and 144 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
// export const BASE_URL = `http://192.168.1.30:40001/lymarket` // 发
export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
// export const BASE_URL = `http://192.168.1.4:40001/lymarket` // 王霞
// export const BASE_URL = `http://192.168.1.224:50002/lymarket` // 添
+14 -1
View File
@@ -5,7 +5,7 @@
* @returns
*/
export const debounce = (fn, delay) => {
let timer = null;
let timer:any = null;
return (...param) => {
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
@@ -90,4 +90,17 @@ export const throttle = (fn, delay) => {
*/
export const screenshot = (url, suffix="!w200")=>{
return url+suffix;
}
//获取数据加载状态 //0:数据从无到有加载数据,1,没有任何数据, 2:下拉加载,3:下拉没有数据
export const dataLoadingStatus = ({list = [], total = 0, status = false}:{list:any[], total:number, status:true|false}) => {
if(list.length == 0 && status) {
return 0
} else if (list.length == 0 && !status) {
return 1
} else if (list.length < total) {
return 2
} else {
return 3
}
}