|
|
|
@ -105,6 +105,8 @@ class Registration extends React.Component {
|
|
|
|
|
this.Getdata(keyword, page, per_page, this.props.user.admin);
|
|
|
|
|
//取报名配置
|
|
|
|
|
this.GetenrollmentAPI();
|
|
|
|
|
//取模式
|
|
|
|
|
this.Getdataheader();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -462,7 +464,7 @@ class Registration extends React.Component {
|
|
|
|
|
if (region_schools.length > 0) {
|
|
|
|
|
let i = 0;
|
|
|
|
|
for (var r = 0; r < region_schools.length; r++) {
|
|
|
|
|
if (region_schools[r] !== this.props.user.user_school) {
|
|
|
|
|
if (region_schools[r] === this.props.user.user_school) {
|
|
|
|
|
// 终止循环
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -471,7 +473,13 @@ class Registration extends React.Component {
|
|
|
|
|
}
|
|
|
|
|
if (i === region_schools.length) {
|
|
|
|
|
//如果i 等于region_schools.length,说明本次循环中没有相同的学校,本人不支持报名
|
|
|
|
|
this.props.showNotification(`本竞赛只面向部分学校/单位开放,你暂时没有参赛资格!`);
|
|
|
|
|
try {
|
|
|
|
|
this.props.showNotification(`本竞赛只面向部分学校/单位开放,你暂时没有参赛资格!`);
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.Getdataheader();
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -574,7 +582,7 @@ class Registration extends React.Component {
|
|
|
|
|
if (region_schools.length > 0) {
|
|
|
|
|
let i = 0;
|
|
|
|
|
for (var r = 0; r < region_schools.length; r++) {
|
|
|
|
|
if (region_schools[r] !== this.props.user.user_school) {
|
|
|
|
|
if (region_schools[r] === this.props.user.user_school) {
|
|
|
|
|
// 终止循环
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -583,7 +591,12 @@ class Registration extends React.Component {
|
|
|
|
|
}
|
|
|
|
|
if (i === region_schools.length) {
|
|
|
|
|
//如果i 等于region_schools.length,说明本次循环中没有相同的学校,本人不支持报名
|
|
|
|
|
this.props.showNotification(`本竞赛只面向部分学校/单位开放,你暂时没有参赛资格!`);
|
|
|
|
|
try {
|
|
|
|
|
this.props.showNotification(`本竞赛只面向部分学校/单位开放,你暂时没有参赛资格!`);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.Getdataheader();
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|