| | |
| | | } |
| | | |
| | | let fakeRunning = false |
| | | setInterval(function () { |
| | | let fakeStatusInterval = null |
| | | function checkFakeStatus() { |
| | | $.ajax({ |
| | | url: baseUrl + "/openapi/getFakeSystemRunStatus", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | $("#fakeShowText").text("仿真模拟未运行") |
| | | } |
| | | fakeRunning = running |
| | | if (!fakeStatusInterval) { |
| | | fakeStatusInterval = setInterval(checkFakeStatus, 1000); |
| | | } |
| | | }else { |
| | | $("#fakeShow").hide() |
| | | if (fakeStatusInterval) { |
| | | clearInterval(fakeStatusInterval); |
| | | fakeStatusInterval = null; |
| | | } |
| | | } |
| | | }else { |
| | | top.location.href = baseUrl + "/login"; |
| | | } |
| | | } |
| | | }); |
| | | }, 1000); |
| | | } |
| | | checkFakeStatus(); |
| | | |
| | | $("#fakeShow").on("click", function () { |
| | | if (fakeRunning) { |