Commit 010c83e5 by wangshuo

单集购买

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