import React, {Component} from 'react'; import {FormattedMessage} from 'react-intl'; import {Card, Layout} from 'antd'; import TencentDeploy from './TencentDeploy'; import AliyunDeploy from './AliyunDeploy'; import AmazonDeploy from './AmazonDeploy'; import {getCookie} from "../../../cookie"; const {Content} = Layout; const tabListNoTitle = [{ key: 'tencent', tab: , }, { key: 'aliyun', tab: , }, { key: 'amazon', tab: , }]; class MyDeploy extends Component { constructor(props) { super(props); this.state = { cloud: 'tencent', userID: '', url: '' }; } componentWillMount() { let userID = getCookie('user_id') || this.state.userID; if (userID !== undefined && userID !== '') { this.setState({ userID }); } if(this.props.location && this.props.location.state) { this.setState({ url: this.props.location.state.url }) } } render() { let {url, userID} = this.state; const contentListNoTitle = { tencent: , aliyun: , amazon: , }; return ( { // 登录用户与非登录用户区别对待 this.state.userID === ''? : { this.setState({ cloud }) }} > {contentListNoTitle[this.state.cloud]} } ) } } export default MyDeploy;