Commit f24316c8 by xuzhenghua

detail

parent 2f49609e
...@@ -109,8 +109,7 @@ class Index extends Component { ...@@ -109,8 +109,7 @@ class Index extends Component {
<div className='header'> <div className='header'>
<img className="logo" <img className="logo"
src="http://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/img/index/logo.png" alt=""/> src="http://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/img/index/logo.png" alt=""/>
{/*<button className='to-app'>在APP打开</button>*/} <CallApp className='to-app' text='在APP打开'></CallApp>
<CallApp className='to-app'></CallApp>
<i className='iconfont iconiconfront- search' onClick={this.toSearch.bind(this)}></i> <i className='iconfont iconiconfront- search' onClick={this.toSearch.bind(this)}></i>
</div> </div>
......
import React, {Component} from 'react' import React, {Component} from 'react'
import './index.scss' import './index.scss'
import {CallApp} from '../../../common'
class Audition extends Component { class Audition extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
} }
colse = () => { colse = () => {
this.props.boxHide(false); this.props.boxHide(false);
} }
...@@ -18,7 +21,7 @@ class Audition extends Component { ...@@ -18,7 +21,7 @@ class Audition extends Component {
<div className='content audition-box'> <div className='content audition-box'>
<p className='audition-header'>当前页面不支持试听</p> <p className='audition-header'>当前页面不支持试听</p>
<p className='audition-dec'>请前往APP试听</p> <p className='audition-dec'>请前往APP试听</p>
<div className='btn btn-18B4ED'>立即前往</div> <CallApp className='btn btn-18B4ED' text='立即前往'></CallApp>
</div> </div>
<i onClick={this.colse} className={'iconfont iconiconfront-2 close'}></i> <i onClick={this.colse} className={'iconfont iconiconfront-2 close'}></i>
</div> </div>
......
import React, {Component} from 'react'; import React, {Component} from 'react'
import {Carousel, WingBlank} from 'antd-mobile'; import {Carousel, WingBlank} from 'antd-mobile'
import './index.scss' import './index.scss'
import {api, getParam, http} from "@/utils"; import {api, getParam, http} from "@/utils"
// 课程页面滚动广告
class Carouselw extends Component { class Carouselw extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -18,7 +18,7 @@ class Carouselw extends Component { ...@@ -18,7 +18,7 @@ class Carouselw extends Component {
_this.getList() _this.getList()
this.timer = setInterval(function () { this.timer = setInterval(function () {
_this.getList() _this.getList()
},10000); }, 10000);
} }
...@@ -63,4 +63,4 @@ class Carouselw extends Component { ...@@ -63,4 +63,4 @@ class Carouselw extends Component {
} }
} }
export default Carouselw; export default Carouselw
\ No newline at end of file \ No newline at end of file
...@@ -11,8 +11,8 @@ import BtnStatus from "./btnstatus" ...@@ -11,8 +11,8 @@ import BtnStatus from "./btnstatus"
import Carouselw from "./carousel" import Carouselw from "./carousel"
import {connect} from "react-redux" import {connect} from "react-redux"
import {fetchCoursesListIfNeeded} from "./actions" import {fetchCoursesListIfNeeded} from "./actions"
import {api, getParam, http, browser} from "@/utils"; import {api, getParam, http, browser} from "@/utils"
import {Toast} from 'antd-mobile'; import {Toast} from 'antd-mobile'
class Detail extends Component { class Detail extends Component {
......
...@@ -19,8 +19,12 @@ class OutLine extends Component { ...@@ -19,8 +19,12 @@ class OutLine extends Component {
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue; return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
} }
componentDidMount() { componentDidMount() {
this.getList()
}
// 获取大纲数据
getList = () => {
http.get(`${api.home}/m/course/syllabuses/${getParam('id')}`).then((res) => { http.get(`${api.home}/m/course/syllabuses/${getParam('id')}`).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ this.setState({
...@@ -104,15 +108,15 @@ class OutLine extends Component { ...@@ -104,15 +108,15 @@ class OutLine extends Component {
} }
</h2> </h2>
{ {
item.point.map((item, index) => { item.point && item.point.length > 0 && item.point.map((item, index) => {
const type = ( const type = (
<span> <span>
{item.type === 1 && {item.type === 1 &&
<span>知识点{index + 1}</span> <span>知识点{index + 1}</span>
} {item.type === 2 && } {item.type === 2 &&
<span className='red'>实战项目:</span> <span className='red'>实战项目:</span>
} }
</span> </span>
) )
return ( return (
......
...@@ -10,15 +10,20 @@ class ShareRank extends Component { ...@@ -10,15 +10,20 @@ class ShareRank extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
list: [], list: [], // 分销排行榜
rankingslice: [], rankingslice: [], // 分销排行榜前两名
code: '', code: '', // 分销code
shareRank: false shareRank: false
} }
} }
componentDidMount() { componentDidMount() {
// 获取排行榜 this.getRankList()
this.getCode()
}
// 获取排行榜
getRankList = () => {
http.get(`${api.home}/dist/rankList/${getParam('id')}`).then((res) => { http.get(`${api.home}/dist/rankList/${getParam('id')}`).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ this.setState({
...@@ -29,7 +34,10 @@ class ShareRank extends Component { ...@@ -29,7 +34,10 @@ class ShareRank extends Component {
Toast.info(res.data.msg, 2) Toast.info(res.data.msg, 2)
} }
}) })
// 获取分销码 }
// 获取分销码
getCode = () => {
let data = { let data = {
course_id: getParam('id') course_id: getParam('id')
} }
...@@ -44,6 +52,7 @@ class ShareRank extends Component { ...@@ -44,6 +52,7 @@ class ShareRank extends Component {
}) })
} }
// 点击分销跳转到海报页
share = (info) => { share = (info) => {
const courseId = getParam('id') const courseId = getParam('id')
const dist_first = info.dist_first_level_ti const dist_first = info.dist_first_level_ti
...@@ -75,30 +84,31 @@ class ShareRank extends Component { ...@@ -75,30 +84,31 @@ class ShareRank extends Component {
return ( return (
<div className='share-ranking'> <div className='share-ranking'>
<Flex className='share-container' justify='between'> <Flex className='share-container' justify='between'>
<Flex className='share-list'> <Flex className='share-list'>
<span className="title">排行榜:</span> <span className="title">排行榜:</span>
<div className='ranking-box' onClick={this.openRanking}> <div className='ranking-box' onClick={this.openRanking}>
{ {
this.state.rankingslice && this.state.rankingslice.length > 0 && this.state.rankingslice.map((item, index) => { this.state.rankingslice && this.state.rankingslice.length > 0 && this.state.rankingslice.map((item, index) => {
return ( return (
<span key={index} className="ranking-mess"> <span key={index} className="ranking-mess">
<img src={item.head_imgurl} alt=""/> <img src={item.head_imgurl} alt=""/>
<i>{item.amount}</i> <i>{item.amount}</i>
</span> </span>
) )
}) })
} }
</div> </div>
</Flex> </Flex>
<Flex className='share-money' justify='between' align='center'> <Flex className='share-money' justify='between' align='center'>
<img onClick={this.openRanking} className="ranking-ellipsis" <img onClick={this.openRanking} className="ranking-ellipsis"
src="https://julyedu-img.oss-cn-beijing.aliyuncs.com/Image/train/ellipsis.png" alt=""/> src="https://julyedu-img.oss-cn-beijing.aliyuncs.com/Image/train/ellipsis.png" alt=""/>
<button className="share" onClick={this.share.bind(this,info)}>分享赚{info.dist_first_level_ti}</button> <button className="share" onClick={this.share.bind(this, info)}>分享赚{info.dist_first_level_ti}
</Flex> </button>
</Flex>
</Flex> </Flex>
{ {
this.state.shareRank && this.state.shareRank &&
...@@ -122,11 +132,11 @@ class ShareRank extends Component { ...@@ -122,11 +132,11 @@ class ShareRank extends Component {
} }
</ul> </ul>
<div className='shareBtn'> <div className='shareBtn'>
<button onClick={this.share.bind(this,info)}>分享赚{info.dist_first_level_ti}</button> <button onClick={this.share.bind(this, info)}>分享赚{info.dist_first_level_ti}</button>
</div> </div>
<i onClick={this.colse} className={'iconfont iconiconfront-2 close'}></i> <i onClick={this.colse} className={'iconfont iconiconfront-2 close'}></i>
</div> </div>
</div> </div>
} }
</div> </div>
......
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
border-radius: 3px; border-radius: 3px;
color: $red; color: $red;
background-color: $bg_fff; background-color: $bg_fff;
width: 76px;
height: 22px; height: 22px;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
......
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