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())