|
@@ -173,18 +173,26 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
async raceEnter(course) {
|
|
|
+ this.spinShow = true;
|
|
|
+ this.processingMessage = "正在请求...";
|
|
|
const minutesAfterCourseStart = Math.floor(
|
|
|
moment(this.now).diff(moment(course.startTime), "seconds") / 60
|
|
|
);
|
|
|
|
|
|
this.enterButtonClicked = true;
|
|
|
const limitResult = await tryLimit({ action: "startExam", limit: 100 });
|
|
|
+ this.logger({
|
|
|
+ action: "在线考试列表页面",
|
|
|
+ logId: "开考限流API call",
|
|
|
+ });
|
|
|
this.enterButtonClicked = false;
|
|
|
+ this.spinShow = false;
|
|
|
|
|
|
if (limitResult) {
|
|
|
window._hmt.push(["_trackEvent", "在线考试列表页面", "摇号进入考试"]);
|
|
|
this.logger({
|
|
|
action: "在线考试列表页面",
|
|
|
+ logId: "开考未限流",
|
|
|
detail: "限流-" + minutesAfterCourseStart + "分进入",
|
|
|
});
|
|
|
|
|
@@ -198,6 +206,7 @@ export default {
|
|
|
]);
|
|
|
this.logger({
|
|
|
action: "在线考试列表页面",
|
|
|
+ logId: "开考被限流",
|
|
|
detail: "限流-" + minutesAfterCourseStart + "分被限流",
|
|
|
});
|
|
|
this.$Modal.warning({
|
|
@@ -205,7 +214,7 @@ export default {
|
|
|
content: "网络繁忙,请稍后再试。",
|
|
|
onOk: () => {
|
|
|
clearInterval(this.countdownInterval);
|
|
|
- this.countdown = 10;
|
|
|
+ this.countdown = 3;
|
|
|
this.countdownInterval = setInterval(() => {
|
|
|
this.countdown--;
|
|
|
}, 1 * 1000);
|