|
@@ -105,13 +105,16 @@ const handleDownLoad = () => {
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+// 设置定时器
|
|
|
|
+const fetchInterval = process.env.NODE_ENV === 'development' ? 60000 : 3000; // 每60秒刷新一次(刷新太频繁影响调试)
|
|
|
|
+
|
|
const nextFetchData = ()=> {
|
|
const nextFetchData = ()=> {
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
getCheckinList(eventId.value).then((res) => {
|
|
getCheckinList(eventId.value).then((res) => {
|
|
listData.value = res.data;
|
|
listData.value = res.data;
|
|
nextFetchData();
|
|
nextFetchData();
|
|
});
|
|
});
|
|
- }, 1500)
|
|
|
|
|
|
+ }, fetchInterval)
|
|
};
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|