Commit e4a85ed8 by xuzhenghua

dingjin

parent d1de0e42
......@@ -11,7 +11,8 @@ class ReserveCourse extends Component {
constructor(props) {
super(props);
this.state = {
courseData: []
courseData: [],
isShowMore: false
};
}
......@@ -24,7 +25,8 @@ class ReserveCourse extends Component {
const {code, data, msg} = res.data;
if (code === 200) {
this.setState({
courseData: data
courseData: data.filter((item, index) => index < 4),
courseDataAll: data
})
} else {
Toast.info(msg, 2);
......@@ -63,15 +65,27 @@ class ReserveCourse extends Component {
tostudy = (courseId) => {
this.props.history.push(`/getDetail?id=${courseId}`)
}
// 查看更多
showMoreData = () => {
this.setState({
isShowMore:!this.state.isShowMore,
courseData: this.state.isShowMore ? this.state.courseDataAll.filter((item, index) => index < 4) : this.state.courseDataAll,
})
}
render() {
const {courseData} = this.state;
const {courseData, isShowMore} = this.state;
return (
<div className='reserve-course-module'>
<CourseList courseData={courseData}
expandPaydj={this.expandPaydj}
expandPaywk={this.expandPaywk}
tostudy={this.tostudy}/>
<button className="more-button" onClick={this.showMoreData}>
{isShowMore ? '收起' : '展开更多'}
</button>
</div>
)
}
......
......@@ -101,5 +101,19 @@
}
}
}
.more-button {
display: block;
width: 100px;
height: 27px;
margin: 5px auto 15px;
border: 1px solid #fff;
border-radius: 14px;
font-size: 13px;
font-weight: 300;
color: #fff;
background-color: transparent;
cursor: pointer;
outline: none;
}
}
......@@ -23,7 +23,7 @@ class Deposit extends Component {
<div className="expand-bgimg">
<img
className="four-year"
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/4year.png"
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/dj-1111.png"
alt=''
/>
<span className="dingjin">定金{info.deposit_amount}元,可抵扣{info.deduction_amount}</span>
......
......@@ -226,7 +226,7 @@ class ExpandShare extends Component {
return (
<div className="expand-box">
<div className="banner">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_717/m/zl-banner.png" alt=""/>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/dj-banner.png" alt=""/>
<span onClick={() => this.showRule()}/>
</div>
<div className="all-contnet">
......
......@@ -171,7 +171,6 @@ export default [
path: '/aist-share',
component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/share-page/aist-share'))
},
<<<<<<< HEAD
{
path: '/blessingRank',
component: loadable(() => import(/* webpackChunkName: 'blessing-rank' */'@/components/blessingRank/index'))
......@@ -183,7 +182,7 @@ export default [
{
path: '/prize-winner-list',
component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/prize-winner-list'))
=======
},
//定金订单页面
{
path: '/deposit-order',
......@@ -208,6 +207,5 @@ export default [
{
path: '/expand/index',
component: ExpandShare
>>>>>>> 8347ddd690a7fd9ee47bd9b74cc662e453035ff2
},
]
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