forked from Gitlink/forgeplus-react
bug修复
This commit is contained in:
parent
3d2e91dafd
commit
e04d17fd50
File diff suppressed because it is too large
Load Diff
|
|
@ -205,7 +205,7 @@
|
|||
"concat": "^1.0.3",
|
||||
"happypack": "^5.0.1",
|
||||
"mockjs": "^1.1.0",
|
||||
"node-sass": "^4.12.0",
|
||||
"node-sass": "npm:sass@^1.54.6",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
"purgecss": "^2.1.2",
|
||||
"react-json-view": "^1.21.3",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Link } from 'react-router-dom';
|
|||
import { Input , Form , Select , Checkbox , Button , Spin , AutoComplete, Modal } from 'antd';
|
||||
import { Base64 } from 'js-base64';
|
||||
import { AlignCenter } from '../Component/layout';
|
||||
import EducoderAccount from '../../forge/Component/EducoderAccount';
|
||||
|
||||
import '../css/index.scss';
|
||||
import './new.scss'
|
||||
|
|
@ -92,6 +93,32 @@ class Index extends Component {
|
|||
this.setOptionsList(owner, 'owners');
|
||||
}
|
||||
}).catch(error=>{})
|
||||
|
||||
let url1 = `/users/get_user_info.json`;
|
||||
axios.get(url1).then((response) => {
|
||||
if (response && response.data) {
|
||||
this.initCommonState(response.data)
|
||||
this.setState({
|
||||
tpmLoading: false,
|
||||
completeProfile:response.data.profile_completed
|
||||
})
|
||||
if(response.data && response.data.login){
|
||||
if(response.data.need_edit_info){
|
||||
this.setState({
|
||||
giteaVisible:true,
|
||||
email:response.data.email
|
||||
})
|
||||
}
|
||||
// 如果处于登录状态,且刚刚打开,那么跳到个人主页
|
||||
if(this.props.match.path === "/" && this.props.history.length===2){
|
||||
debugger
|
||||
this.props.history.push(`/${response.data.login}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
getCategory = () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue