dev_sync_trustie
杨树林 5 years ago
parent ec97013ebd
commit bf7caa73ab

@ -596,39 +596,16 @@ class Registration extends React.Component {
//个人竞赛
// /competitions/:identifier/competition_teams.json
Personalregistration = () => {
let {teacher_staff, member_staff, data, enroll_ended} = this.state;
let {teacher_staff, member_staff, data, enroll_ended, enrolled} = this.state;
if (enroll_ended === true) {
//已截止
this.props.showNotification(`报名已截止`);
return;
}
if (teacher_staff) {
if (teacher_staff.mutiple_limited) {
if (teacher_staff.mutiple_limited === true) {
if (data) {
if (data.length > teacher_staff.maximum) {
this.props.showNotification(`你已经报名,不能重复报名!`);
return
}
}
}
}
}
if (member_staff) {
if (member_staff.mutiple_limited) {
if (member_staff.mutiple_limited === true) {
if (data) {
if (data.length > member_staff.maximum) {
this.props.showNotification(`你已经报名,不能重复报名!`);
return;
}
}
}
}
if (enrolled === true) {
this.props.showNotification(`你已经报名,不能重复报名!`);
return;
}
const url = `/competitions/${this.props.match.params.identifier}/competition_teams.json`;
axios.post(url).then((response) => {
@ -636,14 +613,14 @@ class Registration extends React.Component {
if (response.data) {
this.props.showNotification(`报名成功,预祝您夺得桂冠!`);
this.Refreshteam();
}
}
}).catch((error) => {
});
}
render() {
const {page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint} = this.state;
// var listItems = "";

@ -57,8 +57,8 @@ class PersonalCompetititem extends React.Component {
// const listItems = mydatas.map((item, index) =>
//
// );
console.log("PersonalCompetititem");
console.log(data);
// console.log("PersonalCompetititem");
// console.log(data);
return (
<div>
{

Loading…
Cancel
Save