import React from 'react'; import { Spin, Button, Tabs, message, Modal } from 'antd'; import ajax from 'jquery/src/ajax/xhr.js' import $ from 'jquery/src/ajax'; import '../content.less'; import './content.less'; import LeftTab from './leftTab.jsx'; import Collection from './collection'; import weixin from '../../../../image/weixin-w.png'; import qq from '../../../../image/qq-w.png'; import weibo from '../../../../image/weibo-w.png'; import defaultAvatar from '../../../../image/avatarImg.png' import level1 from '../../../../image/level_1.png'; import level2 from '../../../../image/level_2.png'; import level3 from '../../../../image/level_3.png'; import level4 from '../../../../image/level_4.png'; import level5 from '../../../../image/level_5.png'; const Content = React.createClass({ getInitialState () { return { loading: false, visible: false }; }, getData () { this.setState({ loading: false }); $.ajax({ method: "get", dataType: "json", url: globalConfig.context + "/api/user/homePage" }).done(function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } else { this.setState({ achievementNum: data.data.achievementNum, copyrightNum: data.data.copyrightNum, demandNum: data.data.demandNum, gradeName: data.data.gradeName, email: data.data.email, intellectualPropertyNum: data.data.intellectualPropertyNum, logoUrl: data.data.logoUrl, level: data.data.lvl, nickname: data.data.nickname, number: data.data.number, patentNum: data.data.patentNum, personPortraitUrl: data.data.personPortraitUrl, techProjectNum: data.data.techProjectNum, type: data.data.type, uid: data.data.uid, visible: !data.data.lvl || data.data.lvl == 0 ? true : false }) } }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, componentWillMount () { this.getData(); }, tabChange (key) { }, render () { const TabPane = Tabs.TabPane; return (

欢迎, {this.state.nickname || ('No.' + this.state.number)} {(() => { if ( this.state.level ) { return } else { return '' } })()} {(() => { if (this.state.level > 1 && this.state.level < 2) { return 升级高级会员 ,获取更多会员权益 ; } })()}

{this.state.personPortraitUrl || this.state.logoUrl ? : }
{(() => { if (this.state.level > 0) { return

{this.state.gradeName}

; } else { return

用户未认证进行实名认证

; }; })()}

填写完整资料,有助于提高您的资信

我的轨迹

{this.state.type ? : }
{ this.setState({ visible: false, }); }} width='400px' footer={[]} >

您还未进行实名认证,请完成实名认证,为您提供更多服务

) } }); export default Content;