Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(exam): not searchable info showing #170

Merged
merged 2 commits into from
Dec 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/pages/exam/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
{{ item.examTime }}
</view>
<view
v-if="item.examTime !== '未放开不可查'"
class="exam-place"
:style="
timeInterval(item.examTime) === 0
Expand All @@ -79,7 +80,7 @@
{{ getDetailedTime(item.examTime) }}
</w-descriptions-item>
<w-descriptions-item label="考试地点" :label-span="6">
{{ `${item.examPlace} - 座位号:${item.seatNum}` }}
<text>{{ item.examPlace }}</text><text v-if="item.seatNum !== '未放开不可查'"> {{ ` - 座位号:${item.seatNum}` }}</text>

Check warning on line 83 in src/pages/exam/index.vue

View workflow job for this annotation

GitHub Actions / cache-and-install

Expected 1 line break after opening tag (`<text>`), but no line breaks found

Check warning on line 83 in src/pages/exam/index.vue

View workflow job for this annotation

GitHub Actions / cache-and-install

Expected 1 line break before closing tag (`</text>`), but no line breaks found
</w-descriptions-item>
<w-descriptions-item label="考试全称" :label-span="6">
{{ item.className }}
Expand Down Expand Up @@ -166,7 +167,12 @@
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) {
Expand Down
Loading