diff --git a/src/pages/exam/index.vue b/src/pages/exam/index.vue index 914eff92..b2509879 100644 --- a/src/pages/exam/index.vue +++ b/src/pages/exam/index.vue @@ -63,6 +63,7 @@ {{ item.examTime }} - {{ `${item.examPlace} - 座位号:${item.seatNum}` }} + {{ item.examPlace }} {{ ` - 座位号:${item.seatNum}` }} {{ item.className }} @@ -166,7 +167,12 @@ async function refresh() { function getDetailedTime(timeString: string) { const tmp: ConfigType = timeString.split("(")[0]; const dayChars = ["日", "一", "二", "三", "四", "五", "六"]; - return `${tmp} - 周${dayChars[dayjs(tmp).day()]}`; + if (dayChars[dayjs(tmp).day()]) { + return `${tmp} - 周${dayChars[dayjs(tmp).day()]}`; + } else { + return `${tmp}`; + } + } function timeInterval(timeString: string) {