From f3ff4cc95eb274fc24299caf9c941a7c787dad94 Mon Sep 17 00:00:00 2001 From: juzeon <812312770@qq.com> Date: Thu, 16 Sep 2021 18:52:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=99=BB=E5=BD=95=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/poll.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/poll.ts b/src/poll.ts index 0e8f662..2eb9651 100644 --- a/src/poll.ts +++ b/src/poll.ts @@ -19,6 +19,8 @@ async function updateBx() { if (resp.data.aaData.length) { JsonCourseList.bx.length = 0 JsonCourseList.bx.push(...resp.data.aaData) + } else { + throw new Error(resp.data) } } catch (_e) { console.log('获取必修JsonList失败 at ' + getTimeNow()) @@ -32,6 +34,8 @@ async function updateXx() { if (resp.data.aaData.length) { JsonCourseList.xx.length = 0 JsonCourseList.xx.push(...resp.data.aaData) + } else { + throw new Error(resp.data) } } catch (_e) { console.log('获取限选JsonList失败 at ' + getTimeNow()) @@ -45,6 +49,8 @@ async function updateRx() { if (resp.data.aaData.length) { JsonCourseList.rx.length = 0 JsonCourseList.rx.push(...resp.data.aaData) + } else { + throw new Error(resp.data) } } catch (_e) { console.log('获取任选JsonList失败 at ' + getTimeNow())