|
|
@@ -29,6 +29,7 @@ class DeployCloudChoose extends Component {
|
|
|
}
|
|
|
|
|
|
componentWillMount() {
|
|
|
+ this._isMounted = true;
|
|
|
let userID = getCookie('user_id') || this.state.userID;
|
|
|
if (userID !== undefined && userID !== '') {
|
|
|
this.setState({
|
|
|
@@ -79,6 +80,10 @@ class DeployCloudChoose extends Component {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ componentWillUnmount() {
|
|
|
+ this._isMounted = false;
|
|
|
+ }
|
|
|
+
|
|
|
deploy() {
|
|
|
let _this = this;
|
|
|
let {userID, dbKind, bucketName} = this.state;
|
|
|
@@ -213,9 +218,12 @@ class DeployCloudChoose extends Component {
|
|
|
console.log(value);
|
|
|
|
|
|
// 展示数据
|
|
|
- _this.setState({
|
|
|
- disabled: false
|
|
|
- });
|
|
|
+ if(this._isMounted) {
|
|
|
+ _this.setState({
|
|
|
+ disabled: false
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
_this.props.changeTabBar('my-deploy');
|
|
|
_this.props.history.push({
|
|
|
pathname: `/common/deploy`,
|