Commit f24316c8 by xuzhenghua

detail

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