forked from Gitlink/forgeplus-react
退出、登录反复情况下头像下拉框的内容无法渲染
This commit is contained in:
parent
2e2fbda9c3
commit
3e56087c33
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,7 @@
|
|||
"antd": "^3.26.15",
|
||||
"array-flatten": "^2.1.2",
|
||||
"autoprefixer": "7.1.6",
|
||||
"axios": "^0.24.0",
|
||||
"axios": "^0.24.0",
|
||||
"bizcharts": "^3.5.8",
|
||||
"bundle-loader": "^0.5.6",
|
||||
"chalk": "1.1.3",
|
||||
|
|
|
@ -39,11 +39,8 @@ class NewHeader extends Component {
|
|||
submitapplications: false,
|
||||
isRender: false,
|
||||
showTrial: false,
|
||||
setevaluatinghides: false,
|
||||
occupation: 0,
|
||||
mydisplay: false,
|
||||
// headtypesonClickbool: false,
|
||||
// headtypess: "/",
|
||||
settings: null,
|
||||
visiblemyss: false,
|
||||
openSearch:false,
|
||||
|
@ -52,12 +49,11 @@ class NewHeader extends Component {
|
|||
}
|
||||
componentDidMount() {
|
||||
// 用personal判断是否需要再次请求settings接口,解决登录注册之后无设置按钮的情况
|
||||
if(localStorage.chromesetting && localStorage.chromesetting.personal){
|
||||
let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
|
||||
if(settings){
|
||||
this.setState({
|
||||
settings: JSON.parse(localStorage.chromesetting)
|
||||
settings
|
||||
})
|
||||
}else{
|
||||
this.geturlsdata();
|
||||
}
|
||||
window._header_componentHandler = this;
|
||||
|
||||
|
@ -66,6 +62,7 @@ class NewHeader extends Component {
|
|||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
||||
openNotification = (messge) => {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
|
@ -127,11 +124,6 @@ class NewHeader extends Component {
|
|||
this.setState({ isRenders: false })
|
||||
}
|
||||
|
||||
setevaluatinghides = () => {
|
||||
this.setState({
|
||||
setevaluatinghides: true
|
||||
})
|
||||
}
|
||||
//修改登录方法
|
||||
Modifyloginvalue = () => {
|
||||
this.setState({
|
||||
|
@ -144,12 +136,6 @@ class NewHeader extends Component {
|
|||
AccountProfiletype: false
|
||||
})
|
||||
};
|
||||
// headtypesonClick = (url, bool) => {
|
||||
// this.setState({
|
||||
// headtypess: url,
|
||||
// headtypesonClickbool: bool,
|
||||
// })
|
||||
// }
|
||||
//获取数据为空的时候
|
||||
gettablogourlnull = () => {
|
||||
this.setState({
|
||||
|
@ -275,13 +261,13 @@ class NewHeader extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { resetUserInfo ,showNotification,publicNav} = this.props;
|
||||
const { resetUserInfo ,showNotification,publicNav,mygetHelmetapi} = this.props;
|
||||
let settings = mygetHelmetapi;
|
||||
let current_user = this.props.user;
|
||||
let {
|
||||
AccountProfiletype,
|
||||
user,
|
||||
isRender,
|
||||
settings,
|
||||
visible,
|
||||
} = this.state;
|
||||
let search_url = settings && settings.common && settings.common.search;
|
||||
|
|
Loading…
Reference in New Issue