|
@@ -82,7 +82,7 @@ export default ({ spaceId, projectId }) => {
|
|
|
let countTimer = 0;
|
|
|
airLoadingTimer.current = setInterval(() => {
|
|
|
if (countTimer >= 30 || isNowAirStatus.current === val) {
|
|
|
- setIsOpen(val); // 开关
|
|
|
+ // setIsOpen(isNowAirStatus.current); // 开关
|
|
|
setIsLoading(false);
|
|
|
clearInterval(airLoadingTimer.current);
|
|
|
} else {
|
|
@@ -100,12 +100,10 @@ export default ({ spaceId, projectId }) => {
|
|
|
.then((res) => {
|
|
|
const val = res.icon == 7 ? false : true;
|
|
|
if (firstLoading.current) {
|
|
|
- isNowAirStatus.current = val;
|
|
|
- setIsOpen(val); // 开关
|
|
|
setIsLoading(false);
|
|
|
- } else {
|
|
|
- isNowAirStatus.current = val;
|
|
|
}
|
|
|
+ isNowAirStatus.current = val;
|
|
|
+ setIsOpen(val); // 开关
|
|
|
firstLoading.current = false;
|
|
|
// setFirstLoading(false)
|
|
|
timerGetAirInfo(1000);
|