安财赛事报名及注册

dev_202412
yujialong 7 months ago
parent a5a224d885
commit 175962b8dc
  1. 3
      src/api/index.js
  2. 2
      src/layouts/header/index.vue
  3. 4
      src/pages/account/login/accountApply.vue
  4. 188
      src/pages/account/login/accountApplyMatch.vue
  5. 22
      src/pages/account/login/index.vue
  6. 234
      src/pages/match/details/index.vue
  7. 157
      src/pages/match/list/index.vue
  8. 27
      src/pages/touristMatch/list/index.vue
  9. 27
      src/router/permission.js
  10. 2
      src/setting.js
  11. 32
      src/store/modules/match.js

@ -27,6 +27,9 @@ export default {
forgotPassword: `users/users/user/forgotPassword`,
logout: `users/users/user/logout`,
quickRegistration: `users/users/user/quickRegistration`,
customerSettingsList: `nakadai/nakadai/customer/customerSettingsList`,
getSchoolIdByToken: `competition/competition/registration/getSchoolIdByToken`,
updateRealSchoolId: `competition/competition/registration/updateRealSchoolId`,
// 阿里云文件/视频管理
getPlayAuth: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证

@ -238,7 +238,7 @@ export default {
`${location.origin}/admin/#${route}`)
}).catch(err => { })
} else {
window.open(this.$router.resolve(path).href)
window.open(this.$router.resolve(path).href + (this.$route.query.q ? `?q=${Date.now()}` : ''))
}
},
//

@ -122,7 +122,7 @@ export default {
}
},
mounted () {
this.$store.state.match.toMatch && this.getSchool()
localStorage.getItem('toMatch') && this.getSchool()
},
methods: {
//
@ -131,7 +131,7 @@ export default {
provinceId: '',
cityId: ''
}).then(({ list }) => {
this.setSchool(list)
this.schoolList = list
}).catch(res => { })
},
//

@ -0,0 +1,188 @@
<template>
<!-- 赛事报名-账号申请从官网跳进来注册专用 -->
<div>
<el-dialog title="账号申请" :visible.sync="accountVisible" :close-on-click-modal="false" width="500px"
@close="accountClose" @closed="closeDia">
<el-form class="dia-form" ref="form" label-width="110px" :model="form" :rules="rules">
<el-form-item prop="schoolId" label="所属院校">
<el-input disabled value="2024年全国大学生金融投资创新大赛"></el-input>
</el-form-item>
<el-form-item prop="workNumber" label="学号">
<el-input disabled v-model="form.workNumber"></el-input>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input placeholder="请输入手机号" maxlength="11" v-model.trim="form.phone"
@input="checkAccountByPhoneReg"></el-input>
</el-form-item>
<el-form-item prop="userName" label="姓名">
<el-input placeholder="请输入姓名" v-model="form.userName" :disabled="exist"></el-input>
</el-form-item>
<el-form-item prop="code" label="验证码">
<div class="ver-code">
<el-input v-model="form.code" placeholder="请输入验证码" maxlength="6" :disabled="exist"></el-input>
<el-button style="top: 1px" type="text" @click="sendCode" :disabled="phoneDisabled || exist">{{
phoneBtnText }}
</el-button>
</div>
</el-form-item>
<el-form-item prop="password" label="登录密码">
<el-input placeholder="请输入登录密码" type="password" maxlength="6" v-model="form.password"
:disabled="exist"></el-input>
</el-form-item>
<el-form-item prop="rePassword" label="确认登录密码">
<el-input placeholder="请再次输入登录密码" type="password" maxlength="6" v-model="form.rePassword"
:disabled="exist"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-if="!exist" size="small" type="primary" @click="accountSubmit">申请</el-button>
<el-button size="small" @click="accountVisible = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Setting from '@/setting'
import Util from '@/libs/util'
export default {
props: ['visible'],
data () {
const phonePass = (rule, value, callback) => {
const val = this.form.phone
if (val === '') {
callback(new Error('请输入手机号'))
} else {
if (this.$parent.phoneReg.test(val)) {
callback()
} else {
callback(new Error('请输入正确手机号格式'))
}
}
}
return {
accountVisible: false,
exist: true,
form: {
schoolId: '',
account: '',
code: '',
password: '',
rePassword: '',
phone: '',
userName: '',
workNumber: '',
uniqueIdentification: Date.now()
},
rules: {
userName: [{ required: true, message: "请输入姓名", trigger: "blur" }],
phone: [{ required: true, validator: phonePass, trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
rePassword: [{ required: true, message: "请再次输入密码", trigger: "blur" }],
code: [{ required: true, message: "请输入验证码", trigger: "blur" }]
},
phoneDisabled: false,
phoneTimer: null,
phoneOpener: '',
phoneBtnText: '发送验证码',
submiting: false,
};
},
watch: {
visible () {
this.accountVisible = this.visible
}
},
mounted () {
},
methods: {
//
async checkAccountByPhoneReg (val) {
if (!this.$parent.phoneReg.test(val)) {
this.exist = true
return false
}
try {
const { message } = await this.$get(`${this.api.forgotPreVerification}?phoneOrEmail=${val}&platform=${Setting.platformId}`)
this.exist = message === 'success' //
this.form.workNumber = this.exist ? '' : val
} catch (e) { }
},
//
sendCode () {
const { phone } = this.form
//
if (!this.$parent.phoneReg.test(phone)) return false
this.$post(`${this.api.sendPhoneVerificationCode}?phoneOrEmail=${phone}&loginOrBind=1&platform=${Setting.platformId}`).then(({ message }) => {
Util.successMsg(message)
this.phoneCountdown()
}).catch(res => { })
},
//
phoneCountdown () {
let count = 60
if (!this.phoneTimer) {
this.phoneDisabled = true
this.phoneTimer = setInterval(() => {
if (count > 0) {
count--
this.phoneBtnText = `${count}秒后重试`
} else {
this.phoneDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.phoneBtnText = `发送验证码`
}
}, 1000)
}
},
//
accountSubmit () {
this.$refs.form.validate(valid => {
if (valid) {
const form = this.form
form.schoolId = 208
if (form.password !== form.rePassword) return Util.errorMsg('两次输入的密码不一致,请重新输入!')
// id-id-schoolId-workNumber
form.account = `${Setting.platformId}-1-${form.schoolId}-${form.workNumber}`
this.$post(this.api.studentAccountApplication, form).then(res => {
this.accountVisible = false
Util.successMsg('注册成功!')
}).catch(res => { })
}
})
},
//
accountClose () {
this.form = {
schoolId: '',
account: '',
code: '',
password: '',
rePassword: '',
phone: '',
userName: '',
workNumber: '',
uniqueIdentification: Date.now()
}
},
//
closeDia () {
this.$emit('update:visible', false)
}
}
};
</script>
<style lang="scss" scoped>
.ver-code {
position: relative;
.el-button {
position: absolute;
top: 10px;
right: 10px;
}
}
</style>

@ -61,7 +61,12 @@
</template>
<div class="bottom">
<el-link :underline="false" type="primary" @click="switchType">{{ verCodeLogin ? '密码' : '验证码' }}登录</el-link>
<!-- 只有手机号和验证码两个字段的注册 -->
<el-link v-if="person" :underline="false" type="primary" @click="toAccount">没有账号点击申请</el-link>
<!-- 安财赛事注册 -->
<el-link v-else-if="fromOffical" :underline="false" type="primary"
@click="accountApplyMatchVisible = true">暂无账号点击申请</el-link>
<!-- 未登录的赛事点击报名进入后的注册 -->
<el-link v-else-if="toMatch" :underline="false" type="primary"
@click="accountApplyVisible = true">暂无账号点击申请</el-link>
</div>
@ -194,6 +199,7 @@
<v-footer ref="footer"></v-footer>
<AccountApply :visible.sync="accountApplyVisible" />
<AccountApplyMatch :visible.sync="accountApplyMatchVisible" />
</div>
</template>
@ -202,9 +208,8 @@ import vFooter from '@/layouts/footer'
import { mapState, mapMutations, mapActions } from 'vuex'
import Util from '@/libs/util'
import Setting from "@/setting";
import axios from "axios"
import { Loading } from 'element-ui'
import AccountApply from './accountApply'
import AccountApplyMatch from './accountApplyMatch'
export default {
data: function () {
return {
@ -218,6 +223,8 @@ export default {
}
],
person: false,
toMatch: localStorage.getItem('toMatch'),
fromOffical: !!this.$route.query.q, //
phoneReg: /^1[3456789]\d{9}$/,
mailReg: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/,
verificationIMG: '',
@ -261,6 +268,7 @@ export default {
infos: [],
accountApplyVisible: false,
accountApplyMatchVisible: false,
accountVisible: false,
regDisable: true,
regClientExist: false,
@ -292,15 +300,12 @@ export default {
};
},
computed: {
...mapState('match', [
'toMatch'
]),
...mapState('project', [
'courseId'
])
},
components: {
vFooter, AccountApply
vFooter, AccountApply, AccountApplyMatch
},
mounted () {
localStorage.removeItem('opened')
@ -320,9 +325,6 @@ export default {
...mapActions("user", [
"setInfo"
]),
...mapMutations('match', [
'SET_SOURCE'
]),
getVerImg () { //
this.form.random = Math.floor(Math.random() * 999999999);
this.verificationIMG = this.api.verification + "?random=" + `${this.form.random}`;
@ -384,7 +386,7 @@ export default {
this.reloadIndex()
Util.successMsg('登录成功')
const { toMatch } = this
this.SET_SOURCE('')
localStorage.removeItem('toMatch')
this.$router.replace(this.courseId ?
`/preCourse/details?id=${this.courseId}` :
toMatch ?

@ -185,7 +185,16 @@
</tr>
<tr>
<th>学校</th>
<td>{{ info.person.schoolName }}</td>
<td>
<div v-if="fromOffical" class="flex">
<el-select class="m-r-10" v-model="curRealSchoolId" filterable>
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<el-button type="primary" size="mini" @click="saveSchoolId">保存</el-button>
</div>
<span v-else>{{ info.person.realSchool }}</span>
</td>
</tr>
</template>
<template v-if="form.completeCompetitionSetup.competitionType">
@ -347,7 +356,7 @@
</el-alert>
<el-table :data="info.teamDetail" stripe header-align="center">
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="160">
@ -362,6 +371,8 @@
</div>
</div>
<!-- 个人报名有赛事邀请码的情况没有赛事邀请码的情况不用弹框直接报名成功 -->
<el-dialog title="报名" :visible.sync="peopleSignupVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
@ -374,7 +385,74 @@
<el-button size="small" @click="peopleSignupVisible = false">取消</el-button>
</span>
</el-dialog>
<el-dialog title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px" @close="enterClose">
<!-- 安财赛事报名专用个人及团队都用这个 -->
<el-dialog v-if="fromOffical" title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="850px"
custom-class="enter-dia" @close="enterClose">
<div class="flex">
<el-form class="dia-form" label-width="90px">
<el-form-item label="姓名">
<el-input disabled v-model="userName"></el-input>
</el-form-item>
<el-form-item label="来自学校">
<el-select v-model="enterForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<!-- 团队报名 -->
<template v-if="form.completeCompetitionSetup.competitionType">
<p class="m-t-20 m-b-5">请选择要加入的团队</p>
<el-form-item label="团队">
<el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="团队邀请码">
<el-input placeholder="请输入团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input>
</el-form-item>
</template>
<el-form-item label="大赛邀请码" v-if="form.completeCompetitionSetup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input>
</el-form-item>
<p v-if="form.completeCompetitionSetup.competitionType" class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
</p>
</el-form>
<div class="agree">
<div class="agreement">
<h6>参赛选手承诺书</h6>
<div class="text">
<p class="line">本人自愿参加2024年安徽省大学生金融投资创新大赛为进一步提高廉洁自律意识客观公正的履行职责我以大赛参赛学生的身份和荣誉郑重作出如下承诺</p>
<p class="line">1尊重大赛组委会及秘书处尊重专家和仲裁尊重参赛单位和其他选手客观公正地参加比赛</p>
<p class="line">
2遵守道德遵守大赛纪律不私下接触其他参赛单位和团队成员专家裁判员仲裁员
</p>
<p class="line">
3保证提交的所有信息数据和材料均真实准确合法及有效不侵犯任何第三方的知识产权和其他权益参赛选手均无条件配合大赛组委会对参赛选手提供的数据信息材料及有关情况等进行核实
</p>
<p class="line">4遵守公正公平原则不干扰裁判员仲裁员等工作及其他参赛单位和团队成员等比赛影响比赛成绩认可大赛组委会提供的基础数据</p>
<p class="line">5不发表不传播没有根据并对大赛产生不利影响的言论</p>
<p class="line">6不隐瞒按规定应该回避的事项</p>
<p class="line">7对于涉嫌泄密事宜愿接受协助配合相关部门的监督检查并履行举证义务</p>
<p class="line">8如若发生上述问题自愿承担相关责任</p>
<p class="line">特此承诺</p>
<p class="line">勾选后才可登录和注册</p>
</div>
</div>
<el-checkbox class="m-t-15 m-l-20" v-model="agreeCheck">同意我已阅读</el-checkbox>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="officalEnterSubmit">报名</el-button>
<el-button size="small" @click="enterVisible = false">取消</el-button>
</span>
</el-dialog>
<!-- 常规团队报名 -->
<el-dialog v-else title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px"
@close="enterClose">
<el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item>
@ -397,6 +475,8 @@
<el-button size="small" @click="enterVisible = false">取消</el-button>
</span>
</el-dialog>
<el-dialog title="创建团队" :visible.sync="teamVisible" :close-on-click-modal="false" width="300px" @close="teamClose">
<el-form class="dia-form">
<el-form-item>
@ -536,6 +616,7 @@ export default {
},
token: Util.local.get(Setting.tokenKey),
id: +this.$route.query.id,
fromOffical: !!this.$route.query.q, //
end: '',
status: '',
statusList: ["等待报名", "取消报名", "立即报名", "报名截止", "进入竞赛", "已结束"],
@ -585,12 +666,16 @@ export default {
enterVisible: false,
enterForm: {
realSchoolId: '',
competitionId: this.$route.query.id,
teamId: '',
invitationCode: '',
registrationInvitationCode: '',
whetherSignUp: 1
},
schools: [],
agreeCheck: false,
curRealSchoolId: '',
teamVisible: false,
teams: [],
@ -662,7 +747,7 @@ export default {
},
computed: {
...mapState("user", [
"userId", 'account', 'logView'
"userId", 'account', 'logView', 'userName'
]),
},
components: {
@ -682,9 +767,6 @@ export default {
this.getTeam()
},
methods: {
...mapMutations('match', [
'SET_SOURCE'
]),
getData () { //
clearInterval(this.timer)
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(async ({ competition }) => {
@ -723,7 +805,13 @@ export default {
this.getAutomaticAllocation()
this.initOss()
}
this.token && this.intervalRank()
if (this.token) {
if (this.fromOffical) {
this.getCurSchool()
this.getSchool()
}
this.intervalRank()
}
} else {
this.typeList = this.typeList.slice(0, 3)
}
@ -867,6 +955,7 @@ export default {
const caption = info.teamDetail.find(e => !e.caption)
info.caption = caption ? caption : {}
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
this.curRealSchoolId = info.person.realSchoolId
this.originInfo = _.cloneDeep(info)
// accountId
info.stages && info.stages.map(e => {
@ -1266,28 +1355,73 @@ export default {
},
//
peopleSignupSubmit () {
this.$post(this.api.addCompetitionRegistration, {
async peopleSignupSubmit () {
await this.$post(this.api.addCompetitionRegistration, {
competitionId: this.id,
registrationInvitationCode: this.peopleSignupForm.registrationInvitationCode
}).then(res => {
this.peopleSignupVisible = false
this.getData()
this.$message.success('报名成功')
}).catch(res => { })
})
this.peopleSignupVisible = false
this.getData()
this.$message.success('报名成功')
},
//
async getCurSchool () {
const res = await this.$post(this.api.getSchoolIdByToken)
this.enterForm.realSchoolId = res.schoolId
},
//
async getSchool () {
const res = await this.$post(this.api.customerSettingsList, {
pageNum: 1,
pageSize: 10000,
})
this.schools = res.page.records
},
//
async saveSchoolId () {
if (!this.curRealSchoolId) return Util.errorMsg('请选择学校')
await this.$post(this.api.updateRealSchoolId, {
competitionId: this.id,
realSchoolId: this.curRealSchoolId,
teamId: this.form.completeCompetitionSetup.competitionType ? this.info.teamId : '',
})
Util.successMsg('保存成功')
},
//
enterSubmit () {
async enterSubmit () {
if (this.fromOffical && !this.agreeCheck) return Util.errorMsg('请勾选同意,才可继续报名!')
const form = this.enterForm
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
if (this.form.completeCompetitionSetup.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
this.$post(this.api.joinCompetitionTeam, form).then(res => {
this.status = 1
this.enterVisible = false
this.getData()
Util.successMsg('报名成功!')
}).catch(res => { })
delete form.realSchoolId
await this.$post(this.api.joinCompetitionTeam, form)
this.status = 1
this.enterVisible = false
this.getData()
Util.successMsg('报名成功!')
},
//
async officalEnterSubmit () {
if (this.submiting) return false
if (!this.agreeCheck) return Util.errorMsg('请勾选同意,才可继续报名!')
const form = this.enterForm
const isTeam = this.form.completeCompetitionSetup.competitionType //
if (isTeam) {
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
}
if (!form.realSchoolId) return Util.errorMsg('请选择来自学校')
if (this.form.completeCompetitionSetup.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
this.submiting = true
await this.$post(this.api[isTeam ? 'joinCompetitionTeam' : 'addCompetitionRegistration'], form)
this.status = 1
this.enterVisible = false
this.getData()
Util.successMsg('报名成功!')
this.submiting = false
},
//
enterClose () {
@ -1315,19 +1449,19 @@ export default {
}).catch(res => { })
},
//
teamSubmit () {
async teamSubmit () {
const form = this.teamForm
if (!form.teamName) return Util.errorMsg('请输入团队名称')
if (this.teamNameRepeat) return Util.errorMsg('团队名称重复,请重新输入')
if (form.invitationCode.length !== 6) return Util.errorMsg('请输入6位数团队邀请码')
if (this.form.completeCompetitionSetup.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
this.$post(this.api.addCompetitionTeam, form).then(async ({ status, data, message }) => {
this.teamVisible = false
this.enterVisible = false
await this.getData()
Util.successMsg('报名成功!')
this.afterCreateTeam()
}).catch(res => { })
form.realSchoolId = this.enterForm.realSchoolId
await this.$post(this.api.addCompetitionTeam, form)
this.teamVisible = false
this.enterVisible = false
await this.getData()
Util.successMsg('报名成功!')
this.afterCreateTeam()
},
//
afterCreateTeam () {
@ -1479,11 +1613,6 @@ export default {
}).catch(res => { })
},
//
stageSubmit () {
if (this.submiting) return false
this.submiting = true
},
//
stageClose () {
this.choosing = false
@ -1568,8 +1697,9 @@ export default {
}
}
} else if (status == 2) { //
//
if (competitionType) {
//
if (competitionType || this.fromOffical) {
this.agreeCheck = false
this.enterVisible = true
} else { //
if (form.completeCompetitionSetup.isNeedCode) {
@ -1602,7 +1732,7 @@ export default {
type: 'success',
closeOnClickModal: false
}).then(() => {
this.SET_SOURCE(this.id)
localStorage.setItem('toMatch', this.id)
this.$router.push('/login')
}).catch(() => { })
}
@ -2171,4 +2301,32 @@ export default {
}
}
}
/deep/.enter-dia {
.agree {
width: 500px;
margin-left: 20px;
}
.agreement {
max-height: 300px;
padding: 10px 20px;
box-shadow: 0 0 7px rgba(235, 235, 235, .8);
overflow: auto;
h6 {
font-size: 20px;
font-weight: 600;
text-align: center;
}
.text {
line-height: 1.6;
}
.line {
margin-top: 7px;
}
}
}
</style>

@ -146,6 +146,8 @@
</div>
</div>
<!-- 个人报名有赛事邀请码的情况没有赛事邀请码的情况不用弹框直接报名成功 -->
<el-dialog title="报名" :visible.sync="peopleSignupVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
@ -158,7 +160,74 @@
<el-button size="small" @click="peopleSignupVisible = false">取消</el-button>
</span>
</el-dialog>
<el-dialog title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px">
<!-- 安财赛事报名专用个人及团队都用这个 -->
<el-dialog v-if="fromOffical" title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="850px"
custom-class="enter-dia">
<div class="flex">
<el-form class="dia-form" label-width="90px">
<el-form-item label="姓名">
<el-input disabled v-model="userName"></el-input>
</el-form-item>
<el-form-item label="来自学校">
<el-select v-model="enterForm.realSchoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<!-- 团队报名 -->
<template v-if="curItem.competitionType">
<p class="m-t-20 m-b-5">请选择要加入的团队</p>
<el-form-item label="团队">
<el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="团队邀请码">
<el-input placeholder="请输入团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input>
</el-form-item>
</template>
<el-form-item label="大赛邀请码" v-if="curItem.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input>
</el-form-item>
<p v-if="curItem.competitionType" class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
</p>
</el-form>
<div class="agree">
<div class="agreement">
<h6>参赛选手承诺书</h6>
<div class="text">
<p class="line">本人自愿参加2024年安徽省大学生金融投资创新大赛为进一步提高廉洁自律意识客观公正的履行职责我以大赛参赛学生的身份和荣誉郑重作出如下承诺</p>
<p class="line">1尊重大赛组委会及秘书处尊重专家和仲裁尊重参赛单位和其他选手客观公正地参加比赛</p>
<p class="line">
2遵守道德遵守大赛纪律不私下接触其他参赛单位和团队成员专家裁判员仲裁员
</p>
<p class="line">
3保证提交的所有信息数据和材料均真实准确合法及有效不侵犯任何第三方的知识产权和其他权益参赛选手均无条件配合大赛组委会对参赛选手提供的数据信息材料及有关情况等进行核实
</p>
<p class="line">4遵守公正公平原则不干扰裁判员仲裁员等工作及其他参赛单位和团队成员等比赛影响比赛成绩认可大赛组委会提供的基础数据</p>
<p class="line">5不发表不传播没有根据并对大赛产生不利影响的言论</p>
<p class="line">6不隐瞒按规定应该回避的事项</p>
<p class="line">7对于涉嫌泄密事宜愿接受协助配合相关部门的监督检查并履行举证义务</p>
<p class="line">8如若发生上述问题自愿承担相关责任</p>
<p class="line">特此承诺</p>
<p class="line">勾选后才可登录和注册</p>
</div>
</div>
<el-checkbox class="m-t-15 m-l-20" v-model="agreeCheck">同意我已阅读</el-checkbox>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="officalEnterSubmit">报名</el-button>
<el-button size="small" @click="enterVisible = false">取消</el-button>
</span>
</el-dialog>
<!-- 常规团队报名 -->
<el-dialog v-else title="报名" :visible.sync="enterVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item>
@ -260,6 +329,7 @@ export default {
headers: {
token: Util.local.get(Setting.tokenKey)
},
fromOffical: !!this.$route.query.q, //
timer: null,
token: Util.local.get(Setting.tokenKey),
statusList: ["待报名", "取消报名", "马上报名", "报名截止", "进入初赛", "已结束"],
@ -343,12 +413,16 @@ export default {
enterVisible: false,
enterForm: {
realSchoolId: '',
competitionId: '',
teamId: '',
invitationCode: '',
registrationInvitationCode: '',
whetherSignUp: 1
},
curRealSchoolId: '',
schools: [],
agreeCheck: false,
teamVisible: false,
teams: [],
@ -384,7 +458,7 @@ export default {
},
computed: {
...mapState("user", [
"userId", 'account',
"userId", 'account', , 'userName'
])
},
watch: {
@ -407,6 +481,11 @@ export default {
this.clearTimer()
})
console.log(333, this.fromOffical)
if (this.fromOffical) {
this.getCurSchool()
this.getSchool()
}
this.initOss()
},
methods: {
@ -606,18 +685,54 @@ export default {
this.$message.success('报名成功')
}).catch(res => { })
},
//
async getCurSchool () {
const res = await this.$post(this.api.getSchoolIdByToken)
this.curRealSchoolId = res.schoolId
console.log("🚀 ~ getCurSchool ~ this.enterForm.realSchoolId:", this.enterForm.realSchoolId)
},
//
async getSchool () {
const res = await this.$post(this.api.customerSettingsList, {
pageNum: 1,
pageSize: 10000,
})
this.schools = res.page.records
},
//
enterSubmit () {
const form = this.enterForm
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
delete form.realSchoolId
this.$post(this.api.joinCompetitionTeam, form).then(res => {
this.enterVisible = false
this.getData()
Util.successMsg('报名成功!')
}).catch(res => { })
},
//
async officalEnterSubmit () {
if (this.submiting) return false
if (!this.agreeCheck) return Util.errorMsg('请勾选同意,才可继续报名!')
const form = this.enterForm
const isTeam = this.curItem.competitionType //
if (isTeam) {
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
}
if (!form.realSchoolId) return Util.errorMsg('请选择来自学校')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
this.submiting = true
await this.$post(this.api[isTeam ? 'joinCompetitionTeam' : 'addCompetitionRegistration'], form)
this.enterVisible = false
this.getData()
Util.successMsg('报名成功!')
this.submiting = false
},
//
@ -889,8 +1004,8 @@ export default {
}
}
} else if (status == 2) { //
//
if (competitionType) {
//
if (competitionType || this.fromOffical) {
this.getTeam()
this.enterForm = {
competitionId: id,
@ -899,6 +1014,10 @@ export default {
registrationInvitationCode: ''
}
this.enterVisible = true
if (this.fromOffical) {
this.agreeCheck = false
this.enterForm.realSchoolId = this.curRealSchoolId
}
} else { //
if (item.isNeedCode) {
this.curRow = item
@ -929,7 +1048,7 @@ export default {
type: 'success',
closeOnClickModal: false
}).then(() => {
this.SET_SOURCE(item.id)
localStorage.setItem('toMatch', item.id)
this.$router.push('/login')
}).catch(() => { })
}
@ -1363,4 +1482,32 @@ export default {
}
}
}
/deep/.enter-dia {
.agree {
width: 500px;
margin-left: 20px;
}
.agreement {
max-height: 300px;
padding: 10px 20px;
box-shadow: 0 0 7px rgba(235, 235, 235, .8);
overflow: auto;
h6 {
font-size: 20px;
font-weight: 600;
text-align: center;
}
.text {
line-height: 1.6;
}
.line {
margin-top: 7px;
}
}
}
</style>

@ -196,7 +196,7 @@ export default {
return {
timer: null,
token: Util.local.get(Setting.tokenKey),
way: 2,
fromOffical: !!this.$route.query.q, //
statusList: ["待报名", "取消报名", "马上报名", "报名截止", "进入初赛", "已结束"],
endList: ["报名开始", "报名截止", "报名截止", "竞赛开始", "竞赛结束", ""],
typeList: [
@ -286,11 +286,6 @@ export default {
timer: null,
};
},
computed: {
...mapState('match', [
'toMatch'
])
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
@ -305,9 +300,6 @@ export default {
this.$once('hook:beforeDestroy', this.clearTimer)
},
methods: {
...mapMutations('match', [
'SET_SOURCE'
]),
getList () {
this.clearTimer()
const { form } = this
@ -324,8 +316,18 @@ export default {
keyWord: this.keyword
}
this.$post(this.api[Util.local.get(Setting.tokenKey) ? 'competitionAfterLogin' : 'notLoggedInBeforeStudentEvents'], data).then(async ({ data }) => {
this.listData = data.records
this.totals = data.total
const list = data.records
let result = []
// 4
if (this.fromOffical) {
list.forEach(e => {
(+e.id > 457 && +e.id < 462) && result.push(e)
})
} else {
result = list
}
this.listData = result
this.totals = this.fromOffical ? result.length : data.total
this.now = await Util.getNow()
this.statusInterval()
@ -630,7 +632,8 @@ export default {
type: 'success',
closeOnClickModal: false
}).then(() => {
this.SET_SOURCE(item.id)
// this.$route.query.q ? localStorage.removeItem('toMatch') : localStorage.setItem('toMatch', item.id)
localStorage.setItem('toMatch', item.id)
this.$router.push('/login')
}).catch(() => { })
}

@ -4,13 +4,24 @@ import util from "@/libs/util";
const whiteList = Setting.whiteList // 白名单
router.beforeEach((to, from, next) => {
document.title = to.path === '/screenShow' || to.path === '/screenShowPro' ? '安徽省绿色食品全产业链数据可视化看板' : Setting.titleSuffix + '-' + to.meta.title
const role = util.local.get(Setting.tokenKey);
if (!role && !whiteList.includes(to.path)) {
next('/login')
} else if(role && to.path === '/login') {
next('/station')
} else {
next()
const officalTag = from.query.q && !to.query.q ? ((to.fullPath.includes('?') ? '&' : '?') + `q=${Date.now()}`) : '' // 安财赛事专用标识
document.title = to.path === '/screenShow' || to.path === '/screenShowPro' ? '安徽省绿色食品全产业链数据可视化看板' : Setting.titleSuffix + '-' + to.meta.title
const role = util.local.get(Setting.tokenKey);
if (!role && !whiteList.includes(to.path)) {
next('/login' + officalTag)
} else if (role && to.path === '/login') {
next('/station' + officalTag)
} else {
if (to.query.q || !from.query.q) {
next()
} else if (from.query.q) {
next({
path: to.path,
query: {
...to.query,
q: Date.now()
}
})
}
}
});

@ -30,7 +30,7 @@ if (isDev) {
host = "http://121.37.12.51/"; // 测试服
// host = 'https://www.occupationlab.com/' // 正式服
const ip = localStorage.getItem('localIp')
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'http://121.37.12.51/']
const ips = ['http://192.168.31.217:9000/', 'http://192.168.31.51:9000/', 'https://izhixinyun.com/']
host = ips[+ip]
// host = 'http://192.168.31.51:9000/'
} else if (isSq) {

@ -2,24 +2,20 @@
* 赛事相关
* */
export default {
namespaced: true,
state: {
toMatch: '',
noticed: 0, // 登录后会调一个接口提示是否有取消的赛事,提示完后置为1
referrer: 'list',
namespaced: true,
state: {
noticed: 0, // 登录后会调一个接口提示是否有取消的赛事,提示完后置为1
referrer: 'list',
},
mutations: {
SET_NOTICE: (state) => {
state.noticed = 1
},
mutations: {
SET_SOURCE: (state, id) => {
state.toMatch = id
},
SET_NOTICE: (state) => {
state.noticed = 1
},
setReferrer: (state, val) => {
state.referrer = val
},
setReferrer: (state, val) => {
state.referrer = val
},
actions: {
}
},
actions: {
}
};
Loading…
Cancel
Save