import dayjs from 'dayjs' // export const TIME_FORAMT = 'YYYY-MM-DD HH:mm:ss' export const computeExamStatusText = params => { const { startTime, endTime } = params const now = dayjs() const formattedStartTime = dayjs(startTime) const formattedEndTime = dayjs(endTime) if (formattedEndTime < now) { return '已结束' } if (formattedStartTime > now) { return '未开始' } return '进行中' }