竞赛代码调整

This commit is contained in:
joylink_cuiweidong 2020-05-26 10:18:54 +08:00
parent fde7e609c6
commit 681e67468f
4 changed files with 34 additions and 9 deletions

View File

@ -130,3 +130,11 @@ export function getTheoryQuestion(competitionId) {
method: 'get'
});
}
/** 根据id查询竞赛信息 */
export function getRaceById(id) {
return request({
url: `/api/race/${id}`,
method: 'get'
});
}

View File

@ -58,7 +58,10 @@
<div class="img_box"><img :src="SAFS" alt=""></div>
<div style="width: 100%;text-align:center;margin-top:120px;"><i class="el-icon-success" style="color: green; font-size: 100px;" /></div>
<div style="width: 100%;margin-top: 25px;">
<div class="apply_box_title">报名成功! 您的报名信息如下:<br>姓名{{ formModel.name }}
<div class="apply_box_title">报名成功!:<br> 您的赛事信息如下:
<br>竞赛名称{{ compition.name }}
<br>竞赛时间{{ compition.startDate }}
<br>姓名{{ formModel.name }}
<br>公司{{ formModel.company }}
<br>部门{{ formModel.department }}
<br>职位{{ formModel.job }}
@ -71,7 +74,10 @@
<div style="width: 100%;text-align:center;margin-top:120px;"><img :src="applyAlready" class="applyAlready"></div>
<div style="width: 100%;margin-top: 25px;">
<div class="apply_box_title">
您的报名信息如下:<br>姓名{{ formModel.name }}
您的赛事信息如下:
<br>竞赛名称{{ compition.name }}
<br>竞赛时间{{ compition.startDate }}
<br>姓名{{ formModel.name }}
<br>公司{{ formModel.organization }}
<br>部门{{ formModel.department }}
<br>职位{{ formModel.position }}
@ -91,7 +97,7 @@ import md5 from 'js-md5';
import Cookies from 'js-cookie';
import QrcodeVue from 'qrcode.vue';
import { getUserinfoMobileCode } from '@/api/management/user';
import { postSignUp, getRaceUserById } from '@/api/competition';
import { postSignUp, getRaceUserById, getRaceById } from '@/api/competition';
import applyAlready from '@/assets/applyAlready.png';
import SAFS from '@/assets/SAFS.png';
@ -148,6 +154,10 @@ export default {
department: '', //
phone: '', //
phoneCode: '' //
},
compition:{
name:'',
startDate:''
}
};
},
@ -207,6 +217,9 @@ export default {
getRaceUserById(this.$route.query.raceId).then(res => {
if (res.data) {
//
getRaceById(this.$route.query.raceId).then(res=>{
this.compition = res.data;
});
this.formModel = res.data;
this.applyFlag = false;
this.flag = false;
@ -351,6 +364,9 @@ export default {
if (this.$route.query.raceId) {
postSignUp(this.$route.query.raceId, param).then(res => {
// this.$messageBox('');
getRaceById(this.$route.query.raceId).then(res=>{
this.compition = res.data;
});
this.applyFlag = false;
this.flag = true;
}).catch(error => {

View File

@ -77,7 +77,7 @@ export default {
prop: 'practiceScore'
},
{
title: '总',
title: '总',
prop: 'totalScore'
},
// {

View File

@ -125,13 +125,14 @@ export default {
playEachAudio(index) {
this.$nextTick(function() {
document.querySelector('#audio' + index).play();
const that = this;
document.querySelector('#audio' + index).onended = function() {
this.currentAudioList.shift();
if (this.currentAudioList.length > 0) {
this.currentAudioIndex++;
this.playEachAudio(this.currentAudioList[this.currentAudioIndex]);
that.currentAudioList.shift();
if (that.currentAudioList.length > 0) {
that.currentAudioIndex++;
that.playEachAudio(that.currentAudioList[that.currentAudioIndex]);
} else {
this.isPlay = false;
that.isPlay = false;
}
};
});