diff --git a/src/AppConfig.js b/src/AppConfig.js index a369d843..a212448f 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -27,7 +27,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' } function clearAllCookie() { cookie.remove('_educoder_session', { path: '/' }); diff --git a/src/forge/users/CIdispose.jsx b/src/forge/users/CIdispose.jsx index d53287e5..a0692de7 100644 --- a/src/forge/users/CIdispose.jsx +++ b/src/forge/users/CIdispose.jsx @@ -80,6 +80,8 @@ function CIdispose(props){ setStep(result.data.step); props.showNotification("服务器绑定成功!"); } + }).catch((error)=>{ + setBtnLoading(false); }) } }) diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index b88cd5a8..77cdc2b5 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -59,6 +59,13 @@ class Infos extends Component { componentDidMount = () => { this.fetchUser(); }; + componentDidUpdate=(prevProps)=>{ + const { username } = this.props.match.params; + const prevUser = prevProps.match.params.username; + if(prevUser && username && prevUser !== username){ + this.fetchUser(); + } + } fetchUser = () => { this.setState({ @@ -132,6 +139,8 @@ class Infos extends Component { render() { const { current_user, mygetHelmetapi } = this.props; + const { username } = this.props.match.params; + const { user, isSpin, project_type, route_type } = this.state; return (
@@ -253,7 +262,7 @@ class Infos extends Component {
{ - current_user && current_user.login && + current_user && current_user.login && current_user.login === username &&