Commit 402fa27c by zhanghaozhe

周年庆

parent 670ddccd
......@@ -626,7 +626,10 @@ class Anniversary2020 extends Component {
{
!!_group.length && _group.map((item, index) => {
let Button
if (activityData.stage === 1) {
if (item.is_assemble === 2) {
Button =
<button className={'study-btn'}><Link to={`/play?id=${item.v_course_id}`}>开始学习</Link></button>
} else if (activityData.stage === 1) {
Button = <button className={'unavailable'}>715日开始</button>
} else if (activityData.stage === 2) {
switch (item.is_assemble) {
......@@ -638,14 +641,14 @@ class Anniversary2020 extends Component {
break
default:
Button =
<button className={'study'}><Link to={`/play?id=${item.v_course_id}`}>开始学习</Link></button>
<button className={'study-btn'}><Link to={`/play?id=${item.v_course_id}`}>开始学习</Link></button>
}
} else {
Button = <button className={'unavailable'}>活动已结束</button>
}
return <li className={'course'} key={index} onClick={(e) => {
let nodeName = e.target.nodeName.toLowerCase()
if (nodeName !== 'a' || nodeName !== 'button') {
if (nodeName !== 'a') {
history.push(`/detail?id=${item.course_id}`)
}
}}>
......@@ -657,7 +660,7 @@ class Anniversary2020 extends Component {
<div className="title">{item.course_title}</div>
<div className="des">{item.simpledescription}</div>
{
item.is_buy
item.is_assemble === 2
? <div className="purchased">已购买</div>
: <div className="prices">
<span>¥{item.price1}</span>
......@@ -1048,6 +1051,10 @@ class Anniversary2020 extends Component {
{
!!stageCourses[key].length && stageCourses[key].map((item, index) => {
let Button = null
if (item.type === 1) {
Button = <button className={'study-btn'}><Link to={`/play?id=${item.v_course_id}`}>开始学习</Link>
</button>
} else {
if (activityData.stage === 1) {
Button = <button className={'unavailable'}>715日开始</button>
} else if (activityData.stage === 2) {
......@@ -1076,6 +1083,7 @@ class Anniversary2020 extends Component {
} else {
Button = <button className={'unavailable'}>活动已结束</button>
}
}
return <li className={'course'} key={index}>
<div className="cover">
{
......
......@@ -223,6 +223,11 @@
text-overflow: ellipsis;
}
.title{
font-size: 15px;
font-weight: bold;
}
.des {
margin-bottom: 8px;
}
......
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