Commit 402fa27c by zhanghaozhe

周年庆

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