dev_auth
杨树林 5 years ago
parent 830bc21661
commit 07401a52cf

@ -289,7 +289,9 @@ class Registration extends React.Component {
} }
} else { } else {
if (this.props.user.admin === true) {
try { try {
if (result.data.competition_teams.length === 0) { if (result.data.competition_teams.length === 0) {
this.setState({ this.setState({
type: 6, type: 6,
@ -328,6 +330,50 @@ class Registration extends React.Component {
}) })
} }
} else {
try {
if (result.data.my_teams.length === 0) {
this.setState({
type: 6,
typeysl: 1,
data: result.data.my_teams,
count: result.data.count,
competition_teams: result.data.competition_teams,
personal: result.data.personal,
competition_name: result.data.competition_name,
members_count: result.data.members_count,
})
} else {
this.setState({
type: 6,
typeysl: 0,
data: result.data.my_teams,
count: result.data.count,
competition_teams: result.data.competition_teams,
personal: result.data.personal,
competition_name: result.data.competition_name,
members_count: result.data.members_count,
})
}
} catch (e) {
this.setState({
type: 6,
typeysl: 1,
data: result.data.my_teams,
count: result.data.count,
competition_teams: result.data.competition_teams,
personal: result.data.personal,
competition_name: result.data.competition_name,
members_count: result.data.members_count,
})
}
}
} }
} }
} }

Loading…
Cancel
Save