diff --git a/src/api/index.ts b/src/api/index.ts index 3f880c5..c4b94f8 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -371,4 +371,15 @@ export async function getliveinfo(id: number){ const liveinfo = (await get(`live/${id}`)).data; const studentlist = (await get("studentLive",{id})).data; return {...liveinfo,studentlist} -} \ No newline at end of file +} + + +/** + * 直播日历 + */ + + + +export async function getdatelist(start: string, end: string) { + return (await get("teacherCalendar")).data +} diff --git a/src/utils/date.ts b/src/utils/date.ts index 06c18c9..2478765 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -11,6 +11,8 @@ interface GetDate{ yue: number; day: number; zhou: number; + start: string; + end: string; } export function getdate(yue?: number): GetDate{ @@ -27,7 +29,8 @@ export function getdate(yue?: number): GetDate{ now = now.date(0); const month = now.date(); // 当前月有几天 const year = now.year() - + const start = year + "-" + yue + '-01'; + const end = year + "-" + yue + '-' + month; console.log(day,week,month) let i = 0; let w = 0; @@ -55,7 +58,7 @@ export function getdate(yue?: number): GetDate{ } console.log(date) - return {date, year, yue, day, zhou}; + return {date, year, yue, day, zhou, start, end}; } diff --git a/src/views/regime/date.vue b/src/views/regime/date.vue index 2a54c8c..846c744 100644 --- a/src/views/regime/date.vue +++ b/src/views/regime/date.vue @@ -188,6 +188,7 @@