Commit 28e0169b by xuzhenghua

app

parents d20de9a8 dd856fcf
......@@ -221,8 +221,8 @@ class CourseList extends Component {
}
toReceiveCoupon(id, key = '') {
const {isLogin, toLogin} = this.props;
alert(isLogin)
const {isLogin, toLogin,uid} = this.props;
alert(uid)
if(isLogin) {
http.post(`${API.home}/sys/activity/coupon/receive`, {
course_id: id
......
......@@ -135,6 +135,11 @@ class BlessingPreheat extends Component {
cookie.set("uname", item.uname, {expires, path: '/', domain: 'julyedu.com'});
cookie.set("avatar_file", item.avatar_file, {expires, path: '/', domain: 'julyedu.com'});
});
if (cookie.get("token") && cookie.get("uid")) {
window.location.reload()
}
this.props.setCurrentUser(this.transformUser(this.state.userInfoList))
}
transformUser = res => {
......@@ -418,6 +423,7 @@ class BlessingPreheat extends Component {
} = this.state;
const {history} = this.props;
const isLogin = !this.props.user.hasError
const uid = this.props.user.data.uid
return (
<div id={'blessing-preheat'}>
<Banner
......@@ -469,6 +475,7 @@ class BlessingPreheat extends Component {
<CourseList
isFormal={isFormal}
isLogin={isLogin}
uid={uid}
history={this.props.history}
toLogin={this.toLogin}
/>
......
......@@ -52,7 +52,12 @@ class LevelTest extends Component {
startTest = () => {
const {history, isLogin, toLogin} = this.props;
if(isLogin) {
history.push('/levelTest/test');
// history.push('/levelTest/test');
// if(getParam('version')) {
window.location.href = `${API.m}/levelTest/test`;
// }else{
// history.push('/levelTest/test');
// }
}else{
toLogin();
}
......@@ -73,11 +78,6 @@ class LevelTest extends Component {
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/test_icon.png" />
<div className="button__text">
<p>点击测试</p>
{
isLogin && (
<span>(剩余{number}次)</span>
)
}
</div>
</div>
<div className='test__number'>
......
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