From a8e16f5972a2d8f3ef54144cda3faa6425098a9a Mon Sep 17 00:00:00 2001 From: mrkbear Date: Thu, 20 Jan 2022 20:57:41 +0800 Subject: [PATCH] (#28) Add output data mod --- miniprogram/api/Schedule.ts | 47 ++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/miniprogram/api/Schedule.ts b/miniprogram/api/Schedule.ts index 6c56199..4ba75ce 100644 --- a/miniprogram/api/Schedule.ts +++ b/miniprogram/api/Schedule.ts @@ -13,30 +13,62 @@ interface IScheduleInput { semester: string; } +interface IClassData { + + /** + * 课程名字 + */ + name: string; + + /** + * 上课地点 + */ + room?: string; + + /** + * 课程老师 + */ + teacher?: string; + + /** + * 周数 + */ + week: string; +} + interface IScheduleOutput { -} + /** + * 课程列表 + */ + classList: IClassData[]; + + /** + * 稀疏矩阵编号 + */ + index: number; +}[]; interface IScheduleEvent { /** * session 过期 */ - expire: GeneralCallbackResult; + expire: GeneralCallbackResult; /** * 登录失败 */ - unauthorized: GeneralCallbackResult; + unauthorized: GeneralCallbackResult; /** * 未知的问题 */ - error: GeneralCallbackResult; + error: GeneralCallbackResult; /** * 数据损坏或丢失 */ - badData: GeneralCallbackResult; + badData: GeneralCallbackResult; } @@ -72,4 +104,7 @@ class Schedlue extends API { this.addFailedCallBack(); } -} \ No newline at end of file +} + +export { Schedlue }; +export default Schedlue; \ No newline at end of file