fix: 全表查询:1s

This commit is contained in:
eric
2022-12-18 17:43:17 +08:00
parent 14b09099e5
commit 99dcaf3cc9
2 changed files with 24 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@@ -94,23 +94,22 @@ const Home = () => {
};
});
// 云托管测试
const testCloud = async () => {
const res = await cloudcall({
path:'/feishu',
method:'GET'
})
console.log('业务返回结果',res)
path: "/feishu",
method: "GET",
});
console.log("业务返回结果", res);
};
// 云托管本地测试
const testPost = async () => {
// 云托管本地测试
const testPost = async () => {
const res = await cloudcall({
path:'/nihao',
method:'POST'
})
console.log('业务返回结果',res)
path: "/nihao",
method: "POST",
});
console.log("业务返回结果", res);
};
useEffect(() => {
// testCloud();
@@ -135,10 +134,11 @@ const Home = () => {
useEffect(() => {
getsystemConfig(); //获取系统配置
// getdetails(); //获取活动详情
// setTimeout(() => {
// getdetails(); //获取活动详情
// }, 800);
setTimeout(() => {
getdetails(); //获取活动详情
}, 1000);
}, []);
useEffect(() => {
@@ -157,7 +157,7 @@ const Home = () => {
tableName: "details",
// id: "80516fb66370bcf300b8f43c5f4dd52b",
okFun: async (res: any) => {
console.log("details--", res);
console.log("details11--", res);
await setdetails(res?.data ?? []);
},
};
@@ -171,9 +171,10 @@ const Home = () => {
okFun: async (res: any) => {
console.log("systemConfig--", res);
await setsystemConfig(res?.data ?? []);
setTimeout(() => {
getdetails();
}, 800);
// setTimeout(() => {
// getdetails();
// }, 800);
},
};
await getTable(objParams);
@@ -356,7 +357,7 @@ const Home = () => {
</View>
{/* 通知条 */}
{!systemConfig?.[0]?.notice?.isHidden && (
{systemConfig?.length > 0 && !systemConfig?.[0]?.notice?.isHidden && (
<NoticeBar
leftIcon="volume-o"
// text="疫情期间,请留意各个景区的开放状态以及时间"
@@ -609,7 +610,7 @@ const Home = () => {
});
}}
>
{/* 活动卡片 */}
<ActiveCard dataSource={item} />
</View>
);
@@ -620,6 +621,8 @@ const Home = () => {
<Skeleton title={true} row={4} />
)}
{/* 加入微信群 */}
{/* <WeGroup /> */}