竞赛代码调整

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

View File

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

View File

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