Skip to content

Commit

Permalink
Merge branch 'zemal_dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
zema1 committed Dec 2, 2017
2 parents 9385754 + 25afbcc commit 857e085
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/pages/oj/views/problem/Problem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
problemID: '',
submitting: false,
code: '',
language: undefined,
language: 'C++',
submissionId: '',
result: {
result: 9
Expand Down Expand Up @@ -264,14 +264,16 @@
this.$nextTick(() => {
window.MathJax.Hub.Queue(['Typeset', window.MathJax.Hub, 'problem-content'])
})
api.submissionExists(res.data.data.id).then(res => {
let problem = res.data.data
api.submissionExists(problem.id).then(res => {
this.submissionExists = res.data.data
})
this.problem = res.data.data
this.changePie(res.data.data)
problem.languages = problem.languages.sort()
this.problem = problem
this.changePie(problem)
// 在beforeRouteEnter中修改了, 说明本地有code, 无需加载template
if (this.language || this.code !== '') {
if (this.language !== 'C++' || this.code !== '') {
return
}
this.language = this.problem.languages[0]
Expand Down

0 comments on commit 857e085

Please sign in to comment.