Commit 19e77109 by xuzhenghua

bug

parent 054b9e4b
......@@ -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>
)
})
......
......@@ -218,7 +218,7 @@ class Detail extends Component {
nowPrice: res.data.data.data.now_price,
laterPrice: res.data.data.data.three_day_later_price,
singleType: 2,
})
} else {
Toast.info(res.data.data.msg, 2)
......@@ -274,7 +274,7 @@ class Detail extends Component {
}
}
}
});
}
......@@ -415,7 +415,7 @@ class Detail extends Component {
// 自组件传给父组件的boxHide
boxHide = (val) => {
this.setState({
auditionBox: val,
auditionBox: val,
singleBox: val,
singleType: 1
})
......@@ -442,14 +442,14 @@ class Detail extends Component {
if(state.oid) {
href='/classify'
}
return (
<div>
<div className='detail-box'>
<HeaderBar
title='课程详情'
arrow={true}
cart={true}
<HeaderBar
title='课程详情'
arrow={true}
cart={true}
toHref={href}
/>
<CallApp className='toapp' />
......@@ -471,7 +471,7 @@ class Detail extends Component {
<p className='contact text-overflow-2'>{course_info.simpledescription}</p>
<div className='des'>
{
course_info.is_baoming === 0 &&
course_info.is_baoming === 0 &&
<p className="course-price">
<span className="new">¥{course_info.price1}</span>
<span className="old">¥{course_info.price0}</span>
......@@ -521,11 +521,11 @@ class Detail extends Component {
{/*单集购买弹窗*/}
{
singleBox &&
singleBox &&
<Single
singleType={this.state.singleType}
singleBox={this.state.singleBox}
boxHide={this.boxHide}
boxHide={this.boxHide}
data={this.state.singMess}
vcourseId={course_info.v_course_id}
videoId={this.state.singMess.video_id}
......@@ -536,10 +536,10 @@ class Detail extends Component {
{/* 单集购买成功弹窗 */}
{
singleType !== 1 &&
<SingleSuccess
<SingleSuccess
boxHide={this.boxHide}
data={this.state.singMess}
singleType={singleType}
singleType={singleType}
vcourseId={course_info.v_course_id}
videoId={this.state.singMess.video_id}
nowPrice={this.state.nowPrice}
......@@ -565,7 +565,7 @@ class Detail extends Component {
!course_info.is_aist && (course_info.group_status === 3 || course_info.group_status === 4) &&
<Group
courseInfo={course_info}
history={this.props.history}
history={this.props.history}
countdown={countdown}
invitedFriends={this.invitedFriends}
/>
......@@ -578,16 +578,16 @@ class Detail extends Component {
}
{/*课程介绍、大纲*/}
<OutLine
data={course_info}
toAudition={this.toAudition}
<OutLine
data={course_info}
toAudition={this.toAudition}
toSingleset={this.toSingleset}
/>
{/*课程按钮*/}
{
course_info &&
<BtnStatus
<BtnStatus
countdown={countdown}
data={course_info}
user={this.props.user}
......@@ -599,7 +599,7 @@ class Detail extends Component {
{
share ? (
<div
<div
className='groupSuccessMbc'
onClick={() => {
this.setState({share: false})
......@@ -642,6 +642,6 @@ const mapDispatchToProps = (dispatch) => {
dispatch
)
}
export default connect(mapStateToProps, mapDispatchToProps)(Detail)
\ No newline at end of file
......@@ -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>
......@@ -557,7 +557,7 @@ class Video extends Component {
this.setState(
{
activeIndex: index
},
},
() => {
if (this.lessonAvailable(index)) {
if (this.hasAuth(index)) {
......@@ -673,14 +673,14 @@ class Video extends Component {
<div className="purchase-box">
<div className='hint'>您尚未购买该课时,请购买后学习。</div>
<div className='btns'>
<button
<button
type='button'
onClick={this.tobuy}
className='purchase-class'
>
¥{salePrice} 购买课程
</button>
<button
<button
type='button'
onClick={this.toSingleset.bind(this, videoList[activeIndex])}
className='purchase-episode'
......@@ -719,10 +719,10 @@ class Video extends Component {
{/*单集购买*/}
{
singleBox &&
<Single
<Single
courseId={course.course_id}
singleBox={this.state.singleBox}
boxHide={this.boxHide}
singleBox={this.state.singleBox}
boxHide={this.boxHide}
data={this.state.singMess}
singleType={this.state.singleType}
vcourseId={course.v_course_id}
......@@ -751,8 +751,8 @@ class Video extends Component {
pathname: '/play/video',
search: location.search
}}/>
<Route
path={`${match.path}/video`}
<Route
path={`${match.path}/video`}
render={props => {
return (
<VideoCatalog
......
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