|
|
@@ -322,7 +322,12 @@ export default Vue.extend({
|
|
|
},
|
|
|
leaveExam() {
|
|
|
this.exitDialog = false
|
|
|
- this.$router.push('/')
|
|
|
+ let redirect_uri = this.$route.query.redirect_uri ?? ''
|
|
|
+ if (redirect_uri) {
|
|
|
+ window.location.href = decodeURI(redirect_uri as string)
|
|
|
+ } else {
|
|
|
+ this.$router.push('/')
|
|
|
+ }
|
|
|
},
|
|
|
submitAnswer() {
|
|
|
this.submitDialog = false
|
|
|
@@ -340,12 +345,17 @@ export default Vue.extend({
|
|
|
objectiveJudge(this.examId, mapObj)
|
|
|
.then(() => {
|
|
|
setTimeout(() => {
|
|
|
- this.$router.push({
|
|
|
- name: 'result',
|
|
|
- params: {
|
|
|
- examId: this.examId.toString()
|
|
|
- }
|
|
|
- })
|
|
|
+ let redirect_uri = this.$route.query.redirect_uri ?? ''
|
|
|
+ if (redirect_uri) {
|
|
|
+ window.location.href = decodeURIComponent(redirect_uri as string)
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'result',
|
|
|
+ params: {
|
|
|
+ examId: this.examId.toString()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}, 1000)
|
|
|
})
|
|
|
.catch(() => {
|