Commit e4a85ed8 by xuzhenghua

dingjin

parent d1de0e42
...@@ -11,7 +11,8 @@ class ReserveCourse extends Component { ...@@ -11,7 +11,8 @@ class ReserveCourse extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
courseData: [] courseData: [],
isShowMore: false
}; };
} }
...@@ -24,7 +25,8 @@ class ReserveCourse extends Component { ...@@ -24,7 +25,8 @@ class ReserveCourse extends Component {
const {code, data, msg} = res.data; const {code, data, msg} = res.data;
if (code === 200) { if (code === 200) {
this.setState({ this.setState({
courseData: data courseData: data.filter((item, index) => index < 4),
courseDataAll: data
}) })
} else { } else {
Toast.info(msg, 2); Toast.info(msg, 2);
...@@ -63,15 +65,27 @@ class ReserveCourse extends Component { ...@@ -63,15 +65,27 @@ class ReserveCourse extends Component {
tostudy = (courseId) => { tostudy = (courseId) => {
this.props.history.push(`/getDetail?id=${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() { render() {
const {courseData} = this.state; const {courseData, isShowMore} = this.state;
return ( return (
<div className='reserve-course-module'> <div className='reserve-course-module'>
<CourseList courseData={courseData} <CourseList courseData={courseData}
expandPaydj={this.expandPaydj} expandPaydj={this.expandPaydj}
expandPaywk={this.expandPaywk} expandPaywk={this.expandPaywk}
tostudy={this.tostudy}/> tostudy={this.tostudy}/>
<button className="more-button" onClick={this.showMoreData}>
{isShowMore ? '收起' : '展开更多'}
</button>
</div> </div>
) )
} }
......
...@@ -101,5 +101,19 @@ ...@@ -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 { ...@@ -23,7 +23,7 @@ class Deposit extends Component {
<div className="expand-bgimg"> <div className="expand-bgimg">
<img <img
className="four-year" 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='' alt=''
/> />
<span className="dingjin">定金{info.deposit_amount}元,可抵扣{info.deduction_amount}</span> <span className="dingjin">定金{info.deposit_amount}元,可抵扣{info.deduction_amount}</span>
......
...@@ -226,7 +226,7 @@ class ExpandShare extends Component { ...@@ -226,7 +226,7 @@ class ExpandShare extends Component {
return ( return (
<div className="expand-box"> <div className="expand-box">
<div className="banner"> <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()}/> <span onClick={() => this.showRule()}/>
</div> </div>
<div className="all-contnet"> <div className="all-contnet">
......
...@@ -171,7 +171,6 @@ export default [ ...@@ -171,7 +171,6 @@ export default [
path: '/aist-share', path: '/aist-share',
component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/share-page/aist-share')) component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/share-page/aist-share'))
}, },
<<<<<<< HEAD
{ {
path: '/blessingRank', path: '/blessingRank',
component: loadable(() => import(/* webpackChunkName: 'blessing-rank' */'@/components/blessingRank/index')) component: loadable(() => import(/* webpackChunkName: 'blessing-rank' */'@/components/blessingRank/index'))
...@@ -183,7 +182,7 @@ export default [ ...@@ -183,7 +182,7 @@ export default [
{ {
path: '/prize-winner-list', path: '/prize-winner-list',
component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/prize-winner-list')) component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/prize-winner-list'))
======= },
//定金订单页面 //定金订单页面
{ {
path: '/deposit-order', path: '/deposit-order',
...@@ -208,6 +207,5 @@ export default [ ...@@ -208,6 +207,5 @@ export default [
{ {
path: '/expand/index', path: '/expand/index',
component: ExpandShare 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