|
|
@ -13,7 +13,7 @@ import { CNotificationHOC } from '../../courses/common/CNotificationHOC'
|
|
|
|
import "./usersInfo.css"
|
|
|
|
import "./usersInfo.css"
|
|
|
|
import "../../courses/css/members.css"
|
|
|
|
import "../../courses/css/members.css"
|
|
|
|
import "../../courses/css/Courses.css"
|
|
|
|
import "../../courses/css/Courses.css"
|
|
|
|
import update from 'immutability-helper'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import Trialapplication from '../../login/Trialapplication'
|
|
|
|
import Trialapplication from '../../login/Trialapplication'
|
|
|
|
|
|
|
|
|
|
|
@ -51,11 +51,11 @@ class Infos extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentDidMount =()=>{
|
|
|
|
componentDidMount =()=>{
|
|
|
|
const upsystem=`/users/system_update.json`;
|
|
|
|
let upsystem=`/users/system_update.json`;
|
|
|
|
axios.get(upsystem).then((response)=>{
|
|
|
|
axios.get(upsystem).then((response)=>{
|
|
|
|
let updata=response.data;
|
|
|
|
let updata=response.data;
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
updata
|
|
|
|
updata:updata
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch((error)=>{
|
|
|
|
}).catch((error)=>{
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
@ -68,7 +68,6 @@ class Infos extends Component{
|
|
|
|
//判断是否看的是当前用户的个人主页
|
|
|
|
//判断是否看的是当前用户的个人主页
|
|
|
|
componentDidUpdate =(prevProps)=> {
|
|
|
|
componentDidUpdate =(prevProps)=> {
|
|
|
|
if(this.props.current_user && prevProps.current_user != this.props.current_user){
|
|
|
|
if(this.props.current_user && prevProps.current_user != this.props.current_user){
|
|
|
|
console.log(this.props);
|
|
|
|
|
|
|
|
if(this.props.current_user.login != this.props.match.params.username){
|
|
|
|
if(this.props.current_user.login != this.props.match.params.username){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
is_current:false,
|
|
|
|
is_current:false,
|
|
|
@ -226,10 +225,9 @@ class Infos extends Component{
|
|
|
|
moduleName=pathname.split("/")[3];
|
|
|
|
moduleName=pathname.split("/")[3];
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div className="newMain">
|
|
|
|
<div className="newMain">
|
|
|
|
<UpgradeModals
|
|
|
|
{this.state.updata===undefined?"":<UpgradeModals
|
|
|
|
{...this.state}
|
|
|
|
{...this.state}
|
|
|
|
{...this.props}
|
|
|
|
/>}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isRenders && <Trialapplication {...this.props} {...this.state} Cancel={() => this.cancelModulationModels()}/>
|
|
|
|
isRenders && <Trialapplication {...this.props} {...this.state} Cancel={() => this.cancelModulationModels()}/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|