| | |
| | | }); |
| | | |
| | | useEffect(() => { |
| | | checkOtp(false).then(otp => { |
| | | if (otp) { |
| | | let timer: any = null; |
| | | const check = () => { |
| | | getHotFixInfo().then((res: any) => { |
| | | const status = Number(res?.hotfixStatus); |
| | | if (status === 1) { |
| | | setIsMaintain(true); |
| | | setHotfixEndText(res?.hotfixEndTime); |
| | | } else { |
| | | setIsMaintain(false); |
| | | setHotfixEndText(''); |
| | | } |
| | | }).catch(() => { }); |
| | | }; |
| | | check(); |
| | | timer = setInterval(check, 3000); |
| | | return () => { |
| | | if (timer) clearInterval(timer); |
| | | }; |
| | | } |
| | | }) |
| | | let timer: any = null; |
| | | const check = () => { |
| | | getHotFixInfo().then((res: any) => { |
| | | const status = Number(res?.hotfixStatus); |
| | | if (status === 1) { |
| | | setIsMaintain(true); |
| | | setHotfixEndText(res?.hotfixEndTime); |
| | | } else { |
| | | setIsMaintain(false); |
| | | setHotfixEndText(''); |
| | | } |
| | | }).catch(() => { }); |
| | | }; |
| | | check(); |
| | | timer = setInterval(check, 3000); |
| | | return () => { |
| | | if (timer) clearInterval(timer); |
| | | }; |
| | | }, []); |
| | | |
| | | // 监听隐私政策显示状态 |