Commit a719baaa by wangshuo

登录问题

parent 58dbde32
......@@ -142,10 +142,11 @@ class BlessingPreheat extends Component {
}
handleToShow = (key, isLogin = false) => {
const { history } = this.props;
if(isLogin) {
const { userInfo } = this.state;
// 需要用户登录 并且用户未登录
if(isLogin && !userInfo.isLogin) {
this.toLogin();
}else {
}else{
let obj = {};
obj[key] = true;
this.setState({
......@@ -399,7 +400,7 @@ class BlessingPreheat extends Component {
<div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}>
测试记录>
</div>
<LevelTest isLogin={userInfo.isLogin} toLogin={this.toLogin}></LevelTest>
<LevelTest history={history} isLogin={userInfo.isLogin} toLogin={this.toLogin}></LevelTest>
<RankList></RankList>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment