From 97a672968ee025cc006bcc9e4d1486d350337175 Mon Sep 17 00:00:00 2001 From: zema1 Date: Fri, 7 Sep 2018 14:28:06 +0800 Subject: [PATCH] disable submit button after submitting --- src/pages/oj/views/problem/Problem.vue | 9 ++-- .../oj/views/submission/SubmissionDetails.vue | 54 +++++++++---------- src/utils/time.js | 2 +- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/pages/oj/views/problem/Problem.vue b/src/pages/oj/views/problem/Problem.vue index 56846e8a1..6dfd80a63 100644 --- a/src/pages/oj/views/problem/Problem.vue +++ b/src/pages/oj/views/problem/Problem.vue @@ -91,10 +91,11 @@ @@ -228,6 +229,7 @@ language: 'C++', theme: 'solarized', submissionId: '', + submitted: false, result: { result: 9 }, @@ -405,6 +407,7 @@ const submitFunc = (data, detailsVisible) => { this.statusVisible = true api.submitCode(data).then(res => { + this.submitted = true this.submissionId = res.data.data && res.data.data.submission_id // 定时检查状态 this.submitting = false diff --git a/src/pages/oj/views/submission/SubmissionDetails.vue b/src/pages/oj/views/submission/SubmissionDetails.vue index 65d4731ff..43b59d700 100644 --- a/src/pages/oj/views/submission/SubmissionDetails.vue +++ b/src/pages/oj/views/submission/SubmissionDetails.vue @@ -1,41 +1,41 @@