Commit 98da329f by FE

3

parents 1b556ef3 6dd7b3c9
...@@ -8,7 +8,7 @@ import ListHeader from './../listHeader'; ...@@ -8,7 +8,7 @@ import ListHeader from './../listHeader';
import './index.scss'; import './index.scss';
@connect(({user})=> ({ @connect(({user})=> ({
uid: user.data.uid || '' uid: user && user.data && user.data.uid ? user.data.uid :''
})) }))
class CollectBlessing extends Component { class CollectBlessing extends Component {
...@@ -231,7 +231,7 @@ class CollectBlessing extends Component { ...@@ -231,7 +231,7 @@ class CollectBlessing extends Component {
<i className="collect-blessing__num">{index+1}</i> <i className="collect-blessing__num">{index+1}</i>
<p className="collect-blessing__title">{item}</p> <p className="collect-blessing__title">{item}</p>
{ {
index === 0 && index === 0 &&
<> <>
{ {
(isLogin && isSign) (isLogin && isSign)
......
...@@ -6,6 +6,7 @@ import ListFrame from './../listFrame/index'; ...@@ -6,6 +6,7 @@ import ListFrame from './../listFrame/index';
import CourseItem from './../courseItem/index'; import CourseItem from './../courseItem/index';
import ListHeader from './../listHeader'; import ListHeader from './../listHeader';
import './index.scss'; import './index.scss';
import cookie from "js-cookie";
class CourseList extends Component { class CourseList extends Component {
constructor(props) { constructor(props) {
...@@ -62,6 +63,27 @@ class CourseList extends Component { ...@@ -62,6 +63,27 @@ class CourseList extends Component {
this.fetchAICourse('four'); this.fetchAICourse('four');
} }
shouldComponentUpdate(nextProps, nextState, nextContext) {
if(this.props.isApp !== nextProps.isApp) {
// 精品课程-集训营、就业班/AI特训营
this.fetchCourseData();
// AI之路-基础
this.fetchAICourse('one');
// AI之路-进阶
this.fetchAICourse('two');
// AI之路-高阶
this.fetchAICourse('three');
// AI之路-拓展
this.fetchAICourse('four');
return false;
}
return true;
}
fetchAICourse = (key) => { fetchAICourse = (key) => {
const { basic, advanced, higher, expand } = this.state; const { basic, advanced, higher, expand } = this.state;
http.get(`${API.home}/sys/ai_grow_up_courses/${key}`).then(res => { http.get(`${API.home}/sys/ai_grow_up_courses/${key}`).then(res => {
...@@ -222,6 +244,9 @@ class CourseList extends Component { ...@@ -222,6 +244,9 @@ class CourseList extends Component {
toReceiveCoupon(id, key = '') { toReceiveCoupon(id, key = '') {
const {isLogin, toLogin} = this.props; const {isLogin, toLogin} = this.props;
alert(cookie.get("uid"))
if(isLogin) { if(isLogin) {
http.post(`${API.home}/sys/activity/coupon/receive`, { http.post(`${API.home}/sys/activity/coupon/receive`, {
course_id: id course_id: id
...@@ -289,421 +314,431 @@ class CourseList extends Component { ...@@ -289,421 +314,431 @@ class CourseList extends Component {
const { isFormal } = this.props; const { isFormal } = this.props;
const { basic, advanced, higher, expand, group, training } = this.state; const { basic, advanced, higher, expand, group, training } = this.state;
return ( return (
<div className="boutique-course"> <div className="boutique-course">
<ListHeader text="集训营、就业班" size="middle" styles={{margin: '20px 0 15px'}} /> <ListHeader text="集训营、就业班" size="middle" styles={{margin: '20px 0 15px'}} />
{/* 集训营、就业班 */} {/* 集训营、就业班 */}
{ {
(group.course && group.course.length > 0) && (group.course && group.course.length > 0) &&
<> <>
<div data-layout="row"> <div data-layout="row">
{
group.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
<div className="coupon-course__footer">
<a onClick={() => this.toQQque()} className="course-button">立抢超低团购价</a>
</div>
</CourseItem>
))
}
</div>
{ {
group.course.map(item => ( (group.courseList && group.courseList.length > 2) &&
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}> <button className="more-button" onClick={() => this.handleToMore('group')}>
<div className="coupon-course__footer"> {group.isMore? '展开更多' : '收起'}
<a onClick={() => this.toQQque()} className="course-button">立抢超低团购价</a> </button>
</div>
</CourseItem>
))
} }
</div> </>
{ }
(group.courseList && group.courseList.length > 2) &&
<button className="more-button" onClick={() => this.handleToMore('group')}>
{group.isMore? '展开更多' : '收起'}
</button>
}
</>
}
<ListHeader text="AI特训营" size="middle" styles={{margin: '0 0 15px'}} /> <ListHeader text="AI特训营" size="middle" styles={{margin: '0 0 15px'}} />
{/* AI特训营 */} {/* AI特训营 */}
{ {
(training.course && training.course.length > 0) && (training.course && training.course.length > 0) &&
<> <>
<div data-layout="row"> <div data-layout="row">
{ {
training.course.map(item => ( training.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
<div className="coupon-course__footer"> <div className="coupon-course__footer">
{ {
item.course_status === 1 && item.course_status === 1 &&
<a <a
className={classnames("coupon-course__button", "coupon-course__button--receive")} className={classnames("coupon-course__button", "coupon-course__button--receive")}
onClick={() => this.toReceiveCoupon(item.course_id, 'training')} onClick={() => this.toReceiveCoupon(item.course_id, 'training')}
> >
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">立即领券</span> <span className="coupon-course__button-label">立即领券</span>
</a> </a>
} }
{ {
(isFormal === 0 && item.course_status === 2) && (isFormal === 0 && item.course_status === 2) &&
<a className="coupon-course__button"> <a className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">11.11开始使用</span> <span className="coupon-course__button-label">11.11开始使用</span>
</a> </a>
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a <a
onClick={() => this.toCourse(item.course_id)} onClick={() => this.toCourse(item.course_id)}
className="coupon-course__button"> className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">开始使用</span> <span className="coupon-course__button-label">开始使用</span>
</a> </a>
} }
{ {
item.course_status === 3 && item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} <a onClick={() => this.toCourse(item.course_id)}
className="course-button" className="course-button"
data-type="study" data-type="study"
>开始学习</a> >开始学习</a>
} }
</div> </div>
</CourseItem> </CourseItem>
)) ))
}
</div>
{
(training.courseList && training.courseList.length > 2) &&
<button className="more-button" onClick={() => this.handleToMore('training')}>
{training.isMore? '展开更多' : '收起'}
</button>
} }
</div> </>
{ }
(training.courseList && training.courseList.length > 2) &&
<button className="more-button" onClick={() => this.handleToMore('training')}>
{training.isMore? '展开更多' : '收起'}
</button>
}
</>
}
{/* AI成长之路--基础 */} {/* AI成长之路--基础 */}
<ListHeader text="AI成长之路" size="middle" styles={{margin: '0 0 15px'}} /> <ListHeader text="AI成长之路" size="middle" styles={{margin: '0 0 15px'}} />
{ {
(basic.course && basic.course.length > 0) && (basic.course && basic.course.length > 0) &&
<> <>
<h4 className="ai-course__subtitle">基础</h4> <h4 className="ai-course__subtitle">基础</h4>
<div data-layout="row"> <div data-layout="row">
{ {
basic.course.map(item => ( basic.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{
item.type === 0 &&
<div className="coupon-course__footer">
{ {
item.course_status === 1 && item.type === 0 &&
<a <div className="coupon-course__footer">
className={classnames("coupon-course__button", "coupon-course__button--receive")} {
onClick={() => this.toReceiveCoupon(item.course_id, 'basic')} item.course_status === 1 &&
> <a
className={classnames("coupon-course__button", "coupon-course__button--receive")}
onClick={() => this.toReceiveCoupon(item.course_id, 'basic')}
>
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<<<<<<< HEAD
<span className="coupon-course__button-label">立即领券</span> <span className="coupon-course__button-label">立即领券</span>
</a> </a>
} }
{ {
(isFormal === 0 && item.course_status === 2) && (isFormal === 0 && item.course_status === 2) &&
<a className="coupon-course__button"> <a className="coupon-course__button">
=======
<span className="coupon-course__button-label">立即领券</span>
</a>
}
{
(isFormal === 0 && item.course_status === 2) &&
<a className="coupon-course__button">
>>>>>>> 6dd7b3c93601d587e25fa3320135ff2407451de6
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">11.11开始使用</span> <span className="coupon-course__button-label">11.11开始使用</span>
</a> </a>
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">开始使用</span> <span className="coupon-course__button-label">开始使用</span>
</a> </a>
}
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)}
className="course-button"
data-type="study"
>开始学习</a>
}
</div>
} }
{ {
item.course_status === 3 && item.type === 1 &&
<a onClick={() => this.toCourse(item.course_id)} <div className="cent-course__footer">
className="course-button" {
data-type="study" item.course_status === 1 &&
>开始学习</a> <a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a>
}
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a>
}
</div>
} }
</div> </CourseItem>
} ))
{ }
item.type === 1 && </div>
<div className="cent-course__footer"> {
{ (basic.courseList && basic.courseList.length > 4) &&
item.course_status === 1 && <button className="more-button" onClick={() => this.handleToMore('basic')}>
<a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a> {basic.isMore? '展开更多' : '收起'}
} </button>
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a>
}
</div>
}
</CourseItem>
))
} }
</div> </>
{ }
(basic.courseList && basic.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('basic')}>
{basic.isMore? '展开更多' : '收起'}
</button>
}
</>
}
{/* AI成长之路--进阶 */} {/* AI成长之路--进阶 */}
{ {
(advanced.course && advanced.course.length > 0) && (advanced.course && advanced.course.length > 0) &&
<> <>
<h4 className="ai-course__subtitle">进阶</h4> <h4 className="ai-course__subtitle">进阶</h4>
<div data-layout="row"> <div data-layout="row">
{ {
advanced.course.map(item => ( advanced.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{
item.type === 0 &&
<div className="coupon-course__footer">
{ {
item.course_status === 1 && item.type === 0 &&
<a <div className="coupon-course__footer">
className={classnames("coupon-course__button", "coupon-course__button--receive")} {
onClick={() => this.toReceiveCoupon(item.course_id, 'advanced')} item.course_status === 1 &&
> <a
className={classnames("coupon-course__button", "coupon-course__button--receive")}
onClick={() => this.toReceiveCoupon(item.course_id, 'advanced')}
>
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">立即领券</span> <span className="coupon-course__button-label">立即领券</span>
</a> </a>
} }
{ {
(isFormal === 0 && item.course_status === 2) && (isFormal === 0 && item.course_status === 2) &&
<a className="coupon-course__button"> <a className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">11.11开始使用</span> <span className="coupon-course__button-label">11.11开始使用</span>
</a> </a>
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">开始使用</span> <span className="coupon-course__button-label">开始使用</span>
</a> </a>
} }
{ {
item.course_status === 3 && item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} <a onClick={() => this.toCourse(item.course_id)}
className="course-button" className="course-button"
data-type="study" data-type="study"
>开始学习</a> >开始学习</a>
}
</div>
} }
</div>
}
{
item.type === 1 &&
<div className="cent-course__footer">
{ {
item.course_status === 1 && item.type === 1 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a> <div className="cent-course__footer">
{
item.course_status === 1 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a>
}
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a>
}
</div>
} }
{ </CourseItem>
item.course_status === 3 && ))
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a> }
} </div>
</div> {
} (advanced.courseList && advanced.courseList.length > 4) &&
</CourseItem> <button className="more-button" onClick={() => this.handleToMore('advanced')}>
)) {advanced.isMore? '展开更多' : '收起'}
</button>
} }
</div> </>
{ }
(advanced.courseList && advanced.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('advanced')}>
{advanced.isMore? '展开更多' : '收起'}
</button>
}
</>
}
{/* AI成长之路--高阶 */} {/* AI成长之路--高阶 */}
{ {
(higher.course && higher.course.length > 0) && (higher.course && higher.course.length > 0) &&
<> <>
<h4 className="ai-course__subtitle">高阶</h4> <h4 className="ai-course__subtitle">高阶</h4>
<div data-layout="row"> <div data-layout="row">
{ {
higher.course.map(item => ( higher.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{
item.type === 0 &&
<div className="coupon-course__footer">
{ {
item.course_status === 1 && item.type === 0 &&
<a <div className="coupon-course__footer">
className={classnames("coupon-course__button", "coupon-course__button--receive")} {
onClick={() => this.toReceiveCoupon(item.course_id, 'higher')} item.course_status === 1 &&
> <a
className={classnames("coupon-course__button", "coupon-course__button--receive")}
onClick={() => this.toReceiveCoupon(item.course_id, 'higher')}
>
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">立即领券</span> <span className="coupon-course__button-label">立即领券</span>
</a> </a>
} }
{ {
(isFormal === 0 && item.course_status === 2) && (isFormal === 0 && item.course_status === 2) &&
<a className="coupon-course__button"> <a className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">11.11开始使用</span> <span className="coupon-course__button-label">11.11开始使用</span>
</a> </a>
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">开始使用</span> <span className="coupon-course__button-label">开始使用</span>
</a> </a>
}
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)}
className="course-button"
data-type="study"
>开始学习</a>
}
</div>
} }
{ {
item.course_status === 3 && item.type === 1 &&
<a onClick={() => this.toCourse(item.course_id)} <div className="cent-course__footer">
className="course-button" {
data-type="study" item.course_status === 1 &&
>开始学习</a> <a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a>
}
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a>
}
</div>
} }
</div> </CourseItem>
} ))
{ }
item.type === 1 && </div>
<div className="cent-course__footer"> {
{ (higher.courseList && higher.courseList.length > 4) &&
item.course_status === 1 && <button className="more-button" onClick={() => this.handleToMore('higher')}>
<a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a> {higher.isMore? '展开更多' : '收起'}
} </button>
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a>
}
</div>
}
</CourseItem>
))
} }
</div> </>
{ }
(higher.courseList && higher.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('higher')}>
{higher.isMore? '展开更多' : '收起'}
</button>
}
</>
}
{/* AI成长之路--扩展 */} {/* AI成长之路--扩展 */}
{ {
(expand.course && expand.course.length > 0) && (expand.course && expand.course.length > 0) &&
<> <>
<h4 className="ai-course__subtitle">扩展</h4> <h4 className="ai-course__subtitle">扩展</h4>
<div data-layout="row"> <div data-layout="row">
{ {
expand.course.map(item => ( expand.course.map(item => (
<CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}> <CourseItem image={item.image_name} key={item.course_id} id={item.course_id} toCourse={this.toCourse}>
{
item.type === 0 &&
<div className="coupon-course__footer">
{ {
item.course_status === 1 && item.type === 0 &&
<a <div className="coupon-course__footer">
className={classnames("coupon-course__button", "coupon-course__button--receive")} {
onClick={() => this.toReceiveCoupon(item.course_id, 'expand')} item.course_status === 1 &&
> <a
className={classnames("coupon-course__button", "coupon-course__button--receive")}
onClick={() => this.toReceiveCoupon(item.course_id, 'expand')}
>
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">立即领券</span> <span className="coupon-course__button-label">立即领券</span>
</a> </a>
} }
{ {
(isFormal === 0 && item.course_status === 2) && (isFormal === 0 && item.course_status === 2) &&
<a className="coupon-course__button"> <a className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">11.11开始使用</span> <span className="coupon-course__button-label">11.11开始使用</span>
</a> </a>
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
</span> </span>
<span className="coupon-course__button-label">开始使用</span> <span className="coupon-course__button-label">开始使用</span>
</a> </a>
} }
{ {
item.course_status === 3 && item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} <a onClick={() => this.toCourse(item.course_id)}
className="course-button" className="course-button"
data-type="study" data-type="study"
>开始学习</a> >开始学习</a>
}
</div>
} }
</div>
}
{
item.type === 1 &&
<div className="cent-course__footer">
{ {
item.course_status === 1 && item.type === 1 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a> <div className="cent-course__footer">
{
item.course_status === 1 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button">1分钱开团</a>
}
{
item.course_status === 3 &&
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a>
}
</div>
} }
{ </CourseItem>
item.course_status === 3 && ))
<a onClick={() => this.toCourse(item.course_id)} className="course-button" data-type="study">开始学习</a> }
} </div>
</div> {
} (expand.courseList && expand.courseList.length > 4) &&
</CourseItem> <button className="more-button" onClick={() => this.handleToMore('expand')}>
)) {expand.isMore? '展开更多' : '收起'}
</button>
} }
</div> </>
{ }
(expand.courseList && expand.courseList.length > 4) && </div>
<button className="more-button" onClick={() => this.handleToMore('expand')}>
{expand.isMore? '展开更多' : '收起'}
</button>
}
</>
}
</div>
) )
} }
} }
......
import React, {Component} from 'react' import React, { Component } from 'react'
import QRCode from 'qrcode' import QRCode from 'qrcode'
import {http, SendMessageToApp, wxShare, is_weixin, getParam} from '@/utils'; import { http, SendMessageToApp, wxShare, is_weixin, getParam } from '@/utils'
import {Link} from 'react-router-dom' import { Link } from 'react-router-dom'
import {throttle, findIndex, debounce} from 'lodash' import { throttle, findIndex, debounce } from 'lodash'
import RulePopup from './rulePopup/index' import RulePopup from './rulePopup/index'
import CoursePopup from './coursePopup/index' import CoursePopup from './coursePopup/index'
import RecordPopup from './recordPopup/index' import RecordPopup from './recordPopup/index'
...@@ -15,178 +15,173 @@ import ListHeader from './listHeader/index' ...@@ -15,178 +15,173 @@ import ListHeader from './listHeader/index'
import LevelTest from './levelTest/index' import LevelTest from './levelTest/index'
import RankList from './rankList/index' import RankList from './rankList/index'
import './index.scss' import './index.scss'
import {Popup} from '@/common' import { Popup } from '@/common'
import {CopyToClipboard} from 'react-copy-to-clipboard' import { CopyToClipboard } from 'react-copy-to-clipboard'
import {Toast} from "antd-mobile" import { Toast } from "antd-mobile"
import Live from './live' import Live from './live'
import Banner from './banner' import Banner from './banner'
import cookie from "js-cookie"; import cookie from "js-cookie"
import {setCurrentUser, startFetchUser} from "@/store/userAction" import { setCurrentUser, startFetchUser } from "@/store/userAction"
import {addDays} from "date-fns"; import { addDays } from "date-fns"
import {compose} from "redux"; import { compose } from "redux"
import {connect} from "react-redux"; import { connect } from "react-redux"
class BlessingPreheat extends Component { class BlessingPreheat extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.navTop = 183 this.navTop = 183
this.prevY = 0 this.prevY = 0
this.state = { this.state = {
userInfoList: [], userInfoList: [],
isRule: false, // userInfoList: [{
isCourse: false, // token:'fcfef221e60ab7a2-92a80d5d30196999',
inviteUrl: '', // uid:'545292',
inviteVisible: false, // uname:'xzhtest2',
joinLotteryVisible: false, // avatar_file:''
timelineShareVisible: false, // }],
showRecordList: false, isRule: false,
isFormal: false, // 1正式 0 预热 isCourse: false,
isServer: false, inviteUrl: '',
serverUrl: '', inviteVisible: false,
shareMark: false, joinLotteryVisible: false,
userInfo: {}, timelineShareVisible: false,
isSign: false, showRecordList: false,
navs: [ isFormal: false, // 1正式 0 预热
{ isServer: false,
text: '积福气', serverUrl: '',
id: 'lucky-value' shareMark: false,
}, userInfo: {},
{ isSign: false,
text: '幸运大抽奖', navs: [
id: 'lucky-draw' {
}, text: '积福气',
{ id: 'lucky-value'
text: '预付定金', },
id: 'deposit' {
}, text: '幸运大抽奖',
{ id: 'lucky-draw'
text: '精品特惠', },
id: 'best-courses' {
}, text: '预付定金',
{ id: 'deposit'
text: 'AI测试', },
id: 'ai-test' {
}, text: '精品特惠',
{ id: 'best-courses'
text: '大咖直播', },
id: 'live' {
}, text: 'AI测试',
], id: 'ai-test'
index: 0, },
userHasError: props.user.hasError {
} text: '大咖直播',
id: 'live'
},
],
index: 0,
userHasError: props.user.hasError,
isApp: false
} }
}
componentDidMount() {
this.fetchUserBlessing(); componentDidMount() {
this.setInitialNavActiveStatus() this.fetchUserBlessing()
window.addEventListener('scroll', throttle(this.calcNavActive, 100)); this.setInitialNavActiveStatus()
if (is_weixin()) { window.addEventListener('scroll', throttle(this.calcNavActive, 100))
wxShare({ if (is_weixin()) {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', wxShare({
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
link: window.location.href, desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png', link: window.location.href,
}) imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
} })
// 获取App登录信息
window['loginInfo'] = result => {
this.loginInfo(result)
}
window['getNewData'] = result => {
this.fetchUserBlessing();
}
} }
// 获取App登录信息
// 获取app登录数据 window['loginInfo'] = result => {
loginInfo = (result) => { this.loginInfo(result)
this.setState({
userInfoList: result
})
if (this.state.userInfoList.length !== 0) {
this.props.startFetchUser()
this.appLogin()
}
}
// 保存cookie
appLogin = () => {
let expires = addDays(new Date(), 90)
this.state.userInfoList.map((item, index) => {
Toast.info(item.version, 3)
cookie.set("token", item.token, {expires, path: '/', domain: 'julyedu.com'});
cookie.set("plat", item.plat, {expires, path: '/', domain: 'julyedu.com'});
cookie.set("uid", item.uid, {expires, path: '/', domain: 'julyedu.com'});
cookie.set("uname", item.uname, {expires, path: '/', domain: 'julyedu.com'});
cookie.set("avatar_file", item.avatar_file, {expires, path: '/', domain: 'julyedu.com'});
});
this.props.setCurrentUser(this.transformUser(this.state.userInfoList))
} }
transformUser = res => {
let payload
res.map((item, index) => {
payload = {
hasError: false,
data: {
username: item.uname,
avatar: item.avatar_file,
token: item.token,
uid: item.uid
},
isFetching: false
}
})
return payload window['getNewData'] = result => {
this.fetchUserBlessing()
} }
window['QQWXWBshare'] = result => {
this.handleToAddBlessing(result)
getActiveIndex = (arr, n) => {
for (let i = 0, len = arr.length; i < len; i++) {
if (arr[i] > n) {
if (!i) {
return i
} else {
if (Math.abs(n - arr[i]) < Math.abs(n - arr[i - 1])) {
return i
} else {
return i - 1
}
}
}
}
return arr.length - 1
} }
setInitialNavActiveStatus = () => { }
const observer = new MutationObserver(debounce((list, observer) => {
const navs = this.state.navs.map(item => document.querySelector(`#${item.id}`))
if (navs.every(item => item)) { // 获取app登录数据
const navsTop = navs.map(item => item.offsetTop) loginInfo = (result) => {
const index = this.getActiveIndex(navsTop, window.pageYOffset) this.setState({
this.setState({index, navsTop}, () => { userInfoList: result
this.calcNavActive() }, () => {
observer.disconnect() if (this.state.userInfoList.length) {
}) this.props.startFetchUser()
} this.appLogin()
}, 30)) }
observer.observe(document.querySelector('#blessing-preheat'), {childList: true, subtree: true}) })
}
// 保存cookie
appLogin = () => {
let expires = addDays(new Date(), 90)
this.state.userInfoList.map((item, index) => {
Toast.info(item.uid)
cookie.set("token", item.token, {expires, path: '/', domain: '.julyedu.com'})
cookie.set("plat", item.plat, {expires, path: '/', domain: '.julyedu.com'})
cookie.set("uid", item.uid, {expires, path: '/', domain: '.julyedu.com'})
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")) {
this.fetchUserBlessing()
this.setState({
isApp: true
})
} }
initNav = (isFormal) => { this.props.setCurrentUser(this.transformUser(this.state.userInfoList))
const {navs} = this.state }
if (isFormal) { transformUser = res => {
this.setState({ let payload
navs: navs.filter(item => item.id !== 'deposit')
}) res.map((item, index) => {
payload = {
hasError: false,
data: {
username: item.uname,
avatar: item.avatar_file,
token: item.token,
uid: item.uid
},
isFetching: false
}
})
return payload
}
getActiveIndex = (arr, n) => {
for (let i = 0, len = arr.length; i < len; i++) {
if (arr[i] > n) {
if (!i) {
return i
} else {
if (Math.abs(n - arr[i]) < Math.abs(n - arr[i - 1])) {
return i
} else {
return i - 1
}
} }
}
} }
<<<<<<< HEAD
fetchMoudleId = (str) => { fetchMoudleId = (str) => {
const {navs} = this.state const {navs} = this.state
...@@ -215,271 +210,334 @@ class BlessingPreheat extends Component { ...@@ -215,271 +210,334 @@ class BlessingPreheat extends Component {
} }
this.initNav(data.is_activity) this.initNav(data.is_activity)
} }
=======
return arr.length - 1
}
setInitialNavActiveStatus = () => {
const observer = new MutationObserver(debounce((list, observer) => {
const navs = this.state.navs.map(item => document.querySelector(`#${item.id}`))
if (navs.every(item => item)) {
const navsTop = navs.map(item => item.offsetTop)
const index = this.getActiveIndex(navsTop, window.pageYOffset)
this.setState({index, navsTop}, () => {
this.calcNavActive()
observer.disconnect()
>>>>>>> 6dd7b3c93601d587e25fa3320135ff2407451de6
}) })
}
}, 30))
observer.observe(document.querySelector('#blessing-preheat'), {childList: true, subtree: true})
}
initNav = (isFormal) => {
const {navs} = this.state
if (isFormal) {
this.setState({
navs: navs.filter(item => item.id !== 'deposit')
})
} }
}
handleToSign = () => {
http.post(`${API.home}/sys/add/blessing`, { fetchMoudleId = (str) => {
type: 1 // 1:签到;3:分享;4:浏览课程; const {navs} = this.state
}).then(res => { return findIndex(navs, item => item.id === str)
const {code} = res.data }
if (code === 200) {
this.setState({ fetchUserBlessing = () => {
isSign: true, const {userInfo} = this.state
}) http.get(`${API.home}/sys/user/blessing`).then(res => {
Toast.info('+5点福气值~', 2, null, false) const {code, data} = res.data
} alert(code)
if (code === 200) {
this.setState({
isSign: !!data.today_signed,
isFormal: data.is_activity,
userInfo: Object.assign({}, userInfo, {
blessingVal: data.user_blessing_value,
buyBlessing: (data.types_total_blessing_value && data.types_total_blessing_value.buy_course) ? data.types_total_blessing_value.buy_course : 0,
inviteBlessing: (data.types_total_blessing_value && data.types_total_blessing_value.invite) ? data.types_total_blessing_value.invite : 0,
})
}) })
} alert(cookie.get('uid'))
if (data.is_login === 1) {
handleToHide = (key) => { this.handleToSign()
let obj = {} }
obj[key] = false this.initNav(data.is_activity)
}
})
}
handleToAddBlessing = (key) => {
http.post(`${API.home}/sys/add/blessing`, {
share_platform: key, // 1 朋友圈 2 微博 3 qq
type: 3 // 1:签到;3:分享;4:浏览课程;
}).then(res => {
const {code} = res.data
if (code === 200) {
Toast.info('+2点福气值~', 2, null, false)
}
})
}
handleToSign = () => {
http.post(`${API.home}/sys/add/blessing`, {
type: 1 // 1:签到;3:分享;4:浏览课程;
}).then(res => {
const {code} = res.data
if (code === 200) {
this.setState({ this.setState({
...obj isSign: true,
}) })
Toast.info('+5点福气值~', 2, null, false)
}
})
}
handleToHide = (key) => {
let obj = {}
obj[key] = false
this.setState({
...obj
})
}
handleToShow = (key, isLogin = false) => {
// 需要用户登录 并且用户未登录
const isLoginnew = !this.props.user.hasError
if (isLogin && !isLoginnew) {
this.toLogin()
} else {
let obj = {}
obj[key] = true
this.setState({
...obj
})
} }
}
handleToShow = (key, isLogin = false) => {
// 需要用户登录 并且用户未登录 // 邀请好友注册
const isLoginnew = !this.props.user.hasError handleToShowInvite = () => {
const isLogin = !this.props.user.hasError
if (isLogin && isLoginnew) { if (isLogin) {
this.toLogin() if (!getParam('version')) {
} else { QRCode.toDataURL(`${API.m}/invite`, {
let obj = {} width: 120,
obj[key] = true height: 120,
this.setState({ margin: 1
...obj })
.then(url => {
const content = (
<>
<img src={url} alt="barcode" className="qr-code"/>
<CopyToClipboard text={`${API.m}/invite"`} onCopy={this.onCopy}>
<button>一键复制网址</button>
</CopyToClipboard>
</>
)
Popup({
title: '扫码邀请好友注册+10点福气值',
content,
className: 'invite-popup'
}) })
})
.catch(err => {
console.error(err)
})
} else {
let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: 'https://m.julyedu.com/blessingPreheat',
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
} }
SendMessageToApp("toShare", data)
}
} else {
this.toLogin()
} }
}
// 邀请好友注册
handleToShowInvite = () => { handleToShowNotice = () => {
const isLogin = !this.props.user.hasError http.get(`${API['base-api']}/sys/activity/create_blessing_qrcode`).then(res => {
if (isLogin) { const {errno, data} = res.data
if (!getParam('version')) { if (errno === 200) {
QRCode.toDataURL(`${API.m}/invite`, { QRCode.toDataURL(data.url, {
width: 120, width: 120,
height: 120, height: 120,
margin: 1 margin: 1
}) }).then(url => {
.then(url => { Popup({
this.setState({ title: '',
inviteUrl: url, content: <img src={url} alt="barcode" className="qr-code"/>,
inviteVisible: true className: 'invite-popup'
}) })
})
.catch(err => {
console.error(err)
})
} else {
let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: 'https://m.julyedu.com/blessingPreheat',
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
}
SendMessageToApp("toShare", data)
}
} else {
this.toLogin();
}
}
handleToShowNotice = () => {
http.get(`${API['base-api']}/sys/activity/create_blessing_qrcode`).then(res => {
const {errno, data} = res.data
if (errno === 200) {
QRCode.toDataURL(data.url, {
width: 120,
height: 120,
margin: 1
}).then(url => {
this.setState({
isServer: true,
serverUrl: url,
})
})
.catch(err => {
console.error(err)
})
} else if (errno === 4030 || errno === 4040) {
this.toLogin()
}
}) })
.catch(err => {
console.error(err)
})
} else if (errno === 4030 || errno === 4040) {
this.toLogin()
}
})
}
toLogin = () => {
const {history} = this.props
if (!getParam('version')) {
history.push('/passport')
} else {
SendMessageToApp("toLogin")
} }
}
toLogin = () => {
const {history} = this.props onCopy = () => {
if (!getParam('version')) { Toast.info('复制成功', 2, null, false)
history.push('/passport') }
} else {
SendMessageToApp("toLogin") toSection = (i, e) => {
} const {navs} = this.state
} e.preventDefault()
let top = document.querySelector(`#${navs[i].id}`).offsetTop
onCopy = () => { this.setState({
Toast.info('复制成功', 2, null, false) index: i
} })
window.scrollTo({
toSection = (i, e) => { top: top - 60,
const {navs} = this.state left: 0
e.preventDefault() })
let top = document.querySelector(`#${navs[i].id}`).offsetTop }
this.setState({
index: i calcNavActive = () => {
}) const {navs, index} = this.state
window.scrollTo({ const y = window.scrollY
top: top - 60, let swipeDirection = y > this.prevY ? 'up' : 'down'
left: 0 let _index
}) if (swipeDirection === 'up') {
_index = (index + 1) >= navs.length ? index : index + 1
} else {
_index = (index - 1) <= 0 ? 0 : index - 1
} }
let el = document.querySelector(`#${navs[_index].id}`)
calcNavActive = () => { let nav = document.querySelector('#main-nav')
const {navs, index} = this.state if (el) {
const y = window.scrollY
let swipeDirection = y > this.prevY ? 'up' : 'down' let top = el.offsetTop
let _index
if (swipeDirection === 'up') { if (y <= this.navTop) {
_index = (index + 1) >= navs.length ? index : index + 1 nav.classList.remove('fixed')
} else {
} else { !nav.classList.contains('fixed') && nav.classList.add('fixed')
_index = (index - 1) <= 0 ? 0 : index - 1 }
if (swipeDirection === 'up') {
if (y + 30 + 30 >= top) {
this.setState({
index: _index
})
} }
let el = document.querySelector(`#${navs[_index].id}`) } else {
let nav = document.querySelector('#main-nav') if (y + 30 + 20 <= top) {
if (el) { this.setState({
index: _index
let top = el.offsetTop })
if (y <= this.navTop) {
nav.classList.remove('fixed')
} else {
!nav.classList.contains('fixed') && nav.classList.add('fixed')
}
if (swipeDirection === 'up') {
if (y + 30 + 30 >= top) {
this.setState({
index: _index
})
}
} else {
if (y + 30 + 20 <= top) {
this.setState({
index: _index
})
}
}
this.prevY = y
} }
}
this.prevY = y
} }
}
render() {
const {
navs,
userInfo,
isRule,
isCourse,
isFormal,
isSign,
showRecordList,
shareMark,
index,
isApp
} = this.state
const {history} = this.props
const isLogin = !this.props.user.hasError
return (
<div id={'blessing-preheat'}>
<Banner
isFormal={isFormal}
navs={navs}
toSection={this.toSection}
index={index}
/>
{/* 积福气 */}
<ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '60px 0 15px'}}/>
<Link className="luck-draw__button" to="/blessingRank">福气排行榜></Link>
<CollectBlessing
isSign={isSign}
userInfo={userInfo}
isLogin={isLogin}
history={this.props.history}
toSection={(e) => this.toSection(this.fetchMoudleId('best-courses'), e)}
handleToShowList={() => this.handleToShow('isCourse')}
handleToShowInvite={this.handleToShowInvite}
handleToShowNotice={this.handleToShowNotice}
handleToShow={this.handleToShow}
toLogin={this.toLogin}
handleToShowShare={() => this.handleToShow('shareMark')}
handleToHideShare={() => this.handleToHide('shareMark')}
/>
{/* 幸运大抽奖--预热 */}
<ListHeader id={'lucky-draw'} text="幸运大抽奖" styles={{margin: '30px 0 10px'}}/>
<p className="luck-draw__tip">- 将于111110点开启 -</p>
<button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button>
<LuckDraw/>
{/*定金--只在预热期间显示*/}
{
isFormal === 0 &&
<>
<ListHeader id={'deposit'} text="预付1元定金,最高可省100元" styles={{margin: '30px 0 15px'}}/>
<ReserveCourse isApp={isApp}/>
</>
}
render() { {/* 精品课程特惠专区 */}
const { <ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
navs, <CourseList
userInfo, isApp={isApp}
isRule, isFormal={isFormal}
isCourse, isLogin={isLogin}
inviteUrl, history={this.props.history}
inviteVisible, toLogin={this.toLogin}
isFormal, />
isServer,
serverUrl, {
isSign, isRule &&
showRecordList, <RulePopup handleToHide={() => this.handleToHide('isRule')}/>
shareMark, }
index {
} = this.state; isCourse &&
const {history} = this.props; <CoursePopup toLogin={this.toLogin} history={history} isLogin={isLogin}
const isLogin = !this.props.user.hasError handleToHide={() => this.handleToHide('isCourse')}/>
return ( }
<div id={'blessing-preheat'}> {
<Banner showRecordList &&
isFormal={isFormal} <RecordPopup handleToHide={() => this.handleToHide('showRecordList')}/>
navs={navs} }
toSection={this.toSection} {
index={index} shareMark &&
/> <SharePopup/>
}
{/* 积福气 */} {/*
<ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '60px 0 15px'}}/>
<Link className="luck-draw__button" to="/blessingRank">福气排行榜></Link>
<CollectBlessing
isSign={isSign}
userInfo={userInfo}
isLogin={isLogin}
history={this.props.history}
toSection={(e) => this.toSection(this.fetchMoudleId('best-courses'), e)}
handleToShowList={() => this.handleToShow('isCourse')}
handleToShowInvite={this.handleToShowInvite}
handleToShowNotice={this.handleToShowNotice}
handleToShow={this.handleToShow}
toLogin={this.toLogin}
handleToShowShare={() => this.handleToShow('shareMark')}
handleToHideShare={() => this.handleToHide('shareMark')}
/>
{/* 幸运大抽奖--预热 */}
<ListHeader id={'lucky-draw'} text="幸运大抽奖" styles={{margin: '30px 0 10px'}}/>
<p className="luck-draw__tip">- 将于111110点开启 -</p>
<button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button>
<LuckDraw/>
{/*定金--只在预热期间显示*/}
{
isFormal === 0 &&
<>
<ListHeader id={'deposit'} text="预付1元定金,最高可省100元" styles={{margin: '30px 0 15px'}}/>
<ReserveCourse/>
</>
}
{/* 精品课程特惠专区 */}
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
<CourseList
isFormal={isFormal}
isLogin={isLogin}
history={this.props.history}
toLogin={this.toLogin}
/>
{
isRule &&
<RulePopup handleToHide={() => this.handleToHide('isRule')}/>
}
{
isCourse &&
<CoursePopup toLogin={this.toLogin} history={history} isLogin={isLogin}
handleToHide={() => this.handleToHide('isCourse')}/>
}
{
showRecordList &&
<RecordPopup handleToHide={() => this.handleToHide('showRecordList')}/>
}
{
shareMark &&
<SharePopup/>
}
<Popup
visible={inviteVisible}
title={'扫码邀请好友注册+10点福气值'}
className={'invite-popup'}
>
<img src={inviteUrl} alt="barcode" className="qr-code"/>
<CopyToClipboard text={`${API.m}/invite"`} onCopy={this.onCopy}>
<button>一键复制网址</button>
</CopyToClipboard>
</Popup>
<Popup
visible={isServer}
title="扫码关注“七月在线”服务号"
className={'invite-popup'}
>
<img src={serverUrl} alt="barcode" className="qr-code"/>
</Popup>
<Popup visible={this.state.joinLotteryVisible} <Popup visible={this.state.joinLotteryVisible}
title={'你已成功参与本时段抽奖'} title={'你已成功参与本时段抽奖'}
...@@ -504,28 +562,28 @@ class BlessingPreheat extends Component { ...@@ -504,28 +562,28 @@ class BlessingPreheat extends Component {
> >
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png" alt="" <img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png" alt=""
className="qr-code"/> className="qr-code"/>
</Popup> </Popup>*/}
<ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}}/> <ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}}/>
<div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}> <div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}>
测试记录> 测试记录>
</div> </div>
<LevelTest history={history} isLogin={isLogin} toLogin={this.toLogin}></LevelTest> <LevelTest history={history} isLogin={isLogin} toLogin={this.toLogin}></LevelTest>
<RankList></RankList> <RankList></RankList>
<Live isFormal={isFormal}></Live> <Live isFormal={isFormal}></Live>
</div> </div>
) )
} }
} }
export default compose( export default compose(
connect( connect(
state => ({user: state.user}), state => ({user: state.user}),
{setCurrentUser, startFetchUser} {setCurrentUser, startFetchUser}
) )
)(BlessingPreheat) )(BlessingPreheat)
\ No newline at end of file
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