diff --git a/src/Male.js b/src/Male.js index 4df3616..ecdccbf 100644 --- a/src/Male.js +++ b/src/Male.js @@ -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 + '时失败'); } });