|
@@ -30,7 +30,7 @@ const network = $ref({
|
|
|
const time = $ref({
|
|
|
currentTimeZone: moment().format("Z"),
|
|
|
timeZoneStatus: new Date().getTimezoneOffset() / 60 === -8,
|
|
|
- clockRateDiff: null,
|
|
|
+ clockRateDiff: null as unknown as number | null,
|
|
|
clockRateStateResolved: false,
|
|
|
clockRateStatus: false,
|
|
|
});
|
|
@@ -54,8 +54,8 @@ const wechat = $ref({
|
|
|
qrScanned: false,
|
|
|
uploadResolved: false,
|
|
|
uploadStatus: false,
|
|
|
- studentAnswer: null,
|
|
|
- examRecordDataId: null,
|
|
|
+ studentAnswer: null as unknown as string | null,
|
|
|
+ examRecordDataId: null as unknown as string | null,
|
|
|
});
|
|
|
|
|
|
const step1Status = $computed(() => {
|
|
@@ -101,7 +101,6 @@ addTimeout(() => {
|
|
|
if (isUnmounted) return;
|
|
|
end = moment(e.headers.get("date"));
|
|
|
time.clockRateStateResolved = true;
|
|
|
- // @ts-expect-error 不方便给clockRateDiff定义 number | null
|
|
|
time.clockRateDiff = end.diff(start, "seconds") - CLOCK_RATE_TIMEOUT;
|
|
|
time.clockRateStatus = end.diff(start, "seconds") < CLOCK_RATE_TIMEOUT + 2;
|
|
|
});
|
|
@@ -130,7 +129,6 @@ onMounted(async () => {
|
|
|
const trueExamRecordDataId = decodeURIComponent(wechat.qrValue).match(
|
|
|
/&examRecordDataId=(\d+)/
|
|
|
)![1];
|
|
|
- // @ts-expect-error
|
|
|
wechat.examRecordDataId = trueExamRecordDataId;
|
|
|
});
|
|
|
// websocket 会在unmounted时自动关闭
|
|
@@ -161,7 +159,6 @@ watch(
|
|
|
}
|
|
|
)
|
|
|
.then(() => {
|
|
|
- // @ts-expect-error
|
|
|
wechat.studentAnswer = q.fileUrl;
|
|
|
wechat.uploadResolved = true;
|
|
|
wechat.uploadStatus = true;
|