|
|
@ -86,6 +86,7 @@ class Male extends React.Component { |
|
|
|
|
|
|
|
handleClick(program_name) { |
|
|
|
const program_type = '男子'; |
|
|
|
this.openModal('加载中', ''); |
|
|
|
fetch('/register', { |
|
|
|
method: 'Post', |
|
|
|
body: JSON.stringify({ |
|
|
@ -96,8 +97,10 @@ class Male extends React.Component { |
|
|
|
.then(response => response.json()) |
|
|
|
.then(json => { |
|
|
|
if (json.result === 'success') { |
|
|
|
this.handleCloseModal(); |
|
|
|
this.openModal('成功', '成功报名男子项目' + program_name); |
|
|
|
} else { |
|
|
|
this.handleCloseModal(); |
|
|
|
this.openModal('失败', '报名男子项目' + program_name + '时失败'); |
|
|
|
} |
|
|
|
}); |
|
|
|