Commit 010c83e5 by wangshuo

单集购买

parents e462988e 19e77109
...@@ -140,10 +140,10 @@ class Index extends Component { ...@@ -140,10 +140,10 @@ class Index extends Component {
this.state.tabdata.map((item, index) => { this.state.tabdata.map((item, index) => {
return ( return (
<li key={index}> <li key={index}>
<Link to={item.href}> <a href={item.href}>
<img src={item.src} alt=""/> <img src={item.src} alt=""/>
<span>{item.name}</span> <span>{item.name}</span>
</Link> </a>
</li> </li>
) )
}) })
...@@ -201,11 +201,11 @@ function TopSwiper({bannerList}) { ...@@ -201,11 +201,11 @@ function TopSwiper({bannerList}) {
{bannerList && bannerList.length > 0 && bannerList.map((item, index) => { {bannerList && bannerList.length > 0 && bannerList.map((item, index) => {
return ( return (
Number.isNaN(parseInt(item.jump_url)) ? Number.isNaN(parseInt(item.jump_url)) ?
<Link to={item.jump_url} key={index}> <a href={item.jump_url} key={index}>
{/* <Link to={item.jump_url} key={index}> */} {/* <Link to={item.jump_url} key={index}> */}
<img className="item" src={item.name} alt=""/> <img className="item" src={item.name} alt=""/>
{/* </Link> */} {/* </Link> */}
</Link> : </a> :
<Link to={{pathname: '/detail', search: `?id=${item.jump_url}`}} key={index}> <Link to={{pathname: '/detail', search: `?id=${item.jump_url}`}} key={index}>
<img className="item" src={item.name} alt=""/> <img className="item" src={item.name} alt=""/>
</Link> </Link>
......
...@@ -556,7 +556,7 @@ function CourseBottom(props) { ...@@ -556,7 +556,7 @@ function CourseBottom(props) {
let Buttons let Buttons
if (props.item.bargain_status === 2) { if (props.item.bargain_status === 2) {
// Buttons = <Link to={`/detail?id=${props.item.course_id}`} className={'bargain'}>我要砍价</Link> // Buttons = <Link to={`/detail?id=${props.item.course_id}`} className={'bargain'}>我要砍价</Link>
Buttons = <a href="javascript:;" onClick={() => props.toDetail(props.item.course_id)} className={'bargain bargian-study'}>我要砍价</a> Buttons = <a onClick={() => props.toDetail(props.item.course_id)} className={'bargain bargian-study'}>我要砍价</a>
} else if (props.item.bargain_status === 3) { } else if (props.item.bargain_status === 3) {
Buttons = <Link to={`/play/video?id=${props.item.v_course_id}`} className={classnames('bargain', 'button--study')}>去学习</Link> Buttons = <Link to={`/play/video?id=${props.item.v_course_id}`} className={classnames('bargain', 'button--study')}>去学习</Link>
} else { } else {
...@@ -571,7 +571,7 @@ function CourseBottom(props) { ...@@ -571,7 +571,7 @@ function CourseBottom(props) {
} }
{ {
props.item.bargain_status === 0 && props.item.bargain_status === 0 &&
<a href="javascript:;" onClick={() => props.toDetail(props.item.course_id)} className={'bargain-btn'}>我要砍价</a> <a onClick={() => props.toDetail(props.item.course_id)} className={'bargain-btn'}>我要砍价</a>
} }
...@@ -627,7 +627,7 @@ function BargainSecond(props) { ...@@ -627,7 +627,7 @@ function BargainSecond(props) {
<div className='bargain-second'> <div className='bargain-second'>
<img className='top-img' src={require('./image/kanjia_cg_icon.png')} alt=""/> <img className='top-img' src={require('./image/kanjia_cg_icon.png')} alt=""/>
<p className='status-title'>厉害了,又帮好友砍掉<span className='ff4'>{props.money}</span>!</p> <p className='status-title'>厉害了,又帮好友砍掉<span className='ff4'>{props.money}</span>!</p>
<a className='bargain-href' href='#bargainCourse' onClick={props.close}>我也要砍价</a> <Link className='bargain-href' to='#bargainCourse' onClick={props.close}>我也要砍价</Link>
</div> </div>
) )
} }
...@@ -638,7 +638,7 @@ function NotBargain(props) { ...@@ -638,7 +638,7 @@ function NotBargain(props) {
<img className='middle-img' src={require('./image/kanjia_no_iccon.png')} alt=""/> <img className='middle-img' src={require('./image/kanjia_no_iccon.png')} alt=""/>
<p className='status-title'>你的好友用【砍价神器】把我砍蒙圈了<br/>不能再砍了哦~</p> <p className='status-title'>你的好友用【砍价神器】把我砍蒙圈了<br/>不能再砍了哦~</p>
<p className='status-dec'>邀请{props.limitPeople}位以上好友帮忙砍价可获得【砍价神器】</p> <p className='status-dec'>邀请{props.limitPeople}位以上好友帮忙砍价可获得【砍价神器】</p>
<a className='bargain-href' href='#bargainCourse' onClick={props.close}>我也要砍价</a> <Link className='bargain-href' to='#bargainCourse' onClick={props.close}>我也要砍价</Link>
</div> </div>
) )
} }
......
...@@ -7,7 +7,6 @@ import {Toast} from 'antd-mobile' ...@@ -7,7 +7,6 @@ import {Toast} from 'antd-mobile'
import {HeaderBar} from "@/common" import {HeaderBar} from "@/common"
import Loading from '@/common/Loading' import Loading from '@/common/Loading'
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {getCourses} from './../detail/actions';
@connect() @connect()
class Classify extends Component { class Classify extends Component {
...@@ -54,10 +53,8 @@ class Classify extends Component { ...@@ -54,10 +53,8 @@ class Classify extends Component {
toCourseDetail = (id) => { toCourseDetail = (id) => {
const { dispatch, history } = this.props; const { dispatch, history } = this.props;
// dispatch(getCourses(id, () => {
history.push(`/detail?id=${id}`); history.push(`/detail?id=${id}`);
return false; return false;
// }));
} }
render() { render() {
...@@ -72,10 +69,8 @@ class Classify extends Component { ...@@ -72,10 +69,8 @@ class Classify extends Component {
<div className="vip"> <div className="vip">
{this.state.special.list && this.state.special.list.length > 0 && this.state.special.list.map((item, index) => { {this.state.special.list && this.state.special.list.length > 0 && this.state.special.list.map((item, index) => {
return ( return (
<a href="javascript:;" onClick={() => this.toCourseDetail(item.course_id)} key={index}> <a onClick={() => this.toCourseDetail(item.course_id)} key={index}>
{/* <Link key={index} to={`/detail?id=${item.course_id}`}> */}
<img src={item.course_img} alt=""/> <img src={item.course_img} alt=""/>
{/* </Link> */}
</a> </a>
) )
}) })
...@@ -94,14 +89,12 @@ function ClassCourseA({data, toDetail}) { ...@@ -94,14 +89,12 @@ function ClassCourseA({data, toDetail}) {
{ {
data && data.length > 0 && data.map((item, index) => { data && data.length > 0 && data.map((item, index) => {
return ( return (
<a href="javascript:;" onClick={() => toDetail(item.course_id)} key={index} className='item-banner'> <a onClick={() => toDetail(item.course_id)} key={index} className='item-banner'>
{/* <Link to={`/detail?id=${item.course_id}`} key={index} className='item-banner'> */}
<img src={item.course_img} alt=""/> <img src={item.course_img} alt=""/>
{ {
(item.is_aist && (item.is_aist &&
<span className='return_cash'></span>) <span className='return_cash'></span>)
} }
{/* </Link> */}
</a> </a>
) )
}) })
......
...@@ -76,7 +76,7 @@ class My extends PureComponent { ...@@ -76,7 +76,7 @@ class My extends PureComponent {
</Link> </Link>
{ {
!isVIP && !isVIP &&
<a href="javascript:;" className="my-isvip" onClick={() => this.toCourseDetail(139)}></a> <a className="my-isvip" onClick={() => this.toCourseDetail(139)}></a>
} }
</List> </List>
} }
......
...@@ -41,16 +41,16 @@ function ProgressShareModal(props) { ...@@ -41,16 +41,16 @@ function ProgressShareModal(props) {
<div className="title">分享到</div> <div className="title">分享到</div>
<ul> <ul>
<li className='share-icon'> <li className='share-icon'>
<a style={{display: 'block'}} href={props.data.url}> <Link style={{display: 'block'}} to={props.data.url}>
<div className="icon"><i className='iconfont iconweixinzhifu'/></div> <div className="icon"><i className='iconfont iconweixinzhifu'/></div>
<div className='text'>微信好友</div> <div className='text'>微信好友</div>
</a> </Link>
</li> </li>
<li className='share-icon'> <li className='share-icon'>
<a style={{display: 'block'}} href={props.data.url}> <Link style={{display: 'block'}} to={props.data.url}>
<div className="icon"><i className='iconfont iconpengyouquaniconx'/></div> <div className="icon"><i className='iconfont iconpengyouquaniconx'/></div>
<div className='text'>朋友圈</div> <div className='text'>朋友圈</div>
</a> </Link>
</li> </li>
</ul> </ul>
</div> </div>
......
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