import React from 'react'; import { Spin, Button, Tabs, message, Modal } from 'antd'; import $ from 'jquery/src/ajax'; import { Link } from 'react-router'; import '../content.less'; import './content.less'; import Collection from './collection'; import defaultAvatar from '../../../../image/avatarImg.png' const Content = React.createClass({ getInitialState () { return { loading: false, visible: false }; }, getData () { if(this.state.nickname){return;} 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, authentication:data.data.authentication, //0-专家 1--顾问 nickname: data.data.nickname, number: data.data.number, auditStatus: data.data.auditStatus, patentNum: data.data.patentNum, personPortraitUrl: data.data.headPortraitUrl, techProjectNum: data.data.techProjectNum, type: data.data.type, uid: data.data.uid, expert:data.data.expert, visible: (data.data.type=='0'&&(data.data.auditStatus=='0'||data.data.auditStatus==null))? true : false }) } }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, jump(){ window.location.hash='/personal'; }, componentWillMount () { this.getData(); }, render () { return (

欢迎, {this.state.nickname}

{this.state.personPortraitUrl || this.state.logoUrl ? : }
{(() => { if (this.state.type == '0') { if(this.state.auditStatus=='2'){ if(this.state.expert=='2'){ return

个人用户(已认证顾问)

}else if(this.state.expert=='1'){ return

个人用户(已认证专家)

} }else{ if(this.state.auditStatus=='1'){ return

个人用户(认证审核中)

}else if(this.state.auditStatus=='3'){ return

个人用户(认证失败)

}else{ return

个人用户(未认证)

} } } else if(this.state.type == '1'){ return

企业用户

} })()}
{ (()=>{ if(this.state.type=='0'){ return

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

} if(this.state.type=='1'){ return

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

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

您还未进行 ( 顾问 ) 认证,请完成认证,为您提供更多服务

{/* */}
) } }); export default Content;