Commit 069ac0c5 by FE

del build

parents ee41d3c9 a97be348
......@@ -65,9 +65,10 @@ class Classify extends Component {
// 获取课程接口
getList = () => {
const _this = this
http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {
if (res.data.code === 200) {
this.setState({
_this.setState({
data: res.data.data,
isLoading: false
})
......@@ -173,10 +174,10 @@ class Classify extends Component {
</div>
)
return (
<VList
key={index}
<VList
key={index}
status={status}
img={item.image_name}
img={item.image_name}
id={item.course_id}
info={Info}
toDetail={this.toCourseDetail}
......
......@@ -20,9 +20,11 @@ class OutLine extends Component {
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
}
componentDidMount() {
this.getList()
}
tabchange = (tab, index) => {
if(index === 1) {
this.getList()
}
};
// 获取大纲数据
getList = () => {
......@@ -49,7 +51,10 @@ class OutLine extends Component {
return (
<div className='course-detail'>
<WhiteSpace/>
<Tabs tabs={tabs}>
<Tabs tabs={tabs}
initialPage={0}
onChange={(tab, index) => { this.tabchange(tab, index) }}
>
{/*介绍*/}
<div className='introduce'>
<p>讲师:{introduce.teachers}</p>
......
......@@ -77,7 +77,7 @@ class Search extends PureComponent {
</Link>
)
})
: <div style={{textAlign: 'center', padding: '20px',fontSize: '12px'}}>暂无历史</div>
: <div className={'no_search_history'} style={{textAlign: 'center', padding: '20px'}}>暂无历史</div>
}
</div>
</div>
......
......@@ -23,6 +23,9 @@
.search-tag {
overflow: hidden;
}
.no_search_history {
font-size: 12px;
}
}
.search-hot {
......
import React, {Component} from 'react'
import React, { Component } from 'react'
import HeaderBar from '@/common/HeaderBar'
import './video.scss'
import { NavLink, Route, Redirect, Switch } from 'react-router-dom'
import { NavLink, Route, Redirect, Switch, Link } from 'react-router-dom'
import { http, getParam } from '@/utils'
import Recommendation from './recommendation'
import VideoCatalog from './video-catalog'
import DatumCatalog from './datum-catalog'
import {Toast} from 'antd-mobile'
import { Toast } from 'antd-mobile'
import videojs from 'video.js'
import 'video.js/dist/video-js.min.css'
import {Modal} from "antd-mobile"
import {Loading} from '@/common'
import {connect} from "react-redux"
import { Modal } from "antd-mobile"
import { Loading } from '@/common'
import { connect } from "react-redux"
import jsCookie from 'js-cookie'
import io from 'socket.io-client'
import Single from "@/components/detail/single";
......@@ -19,6 +19,7 @@ import Single from "@/components/detail/single";
let alert = Modal.alert
function ProgressShareModal(props) {
console.log(props.data.url);
return (
props.isShow &&
<div className='progress-share-modal-wrapper'>
......@@ -39,12 +40,16 @@ function ProgressShareModal(props) {
<div className="title">分享到</div>
<ul>
<li className='share-icon'>
<div className="icon"><i className='iconfont iconweixinzhifu'></i></div>
<div className='text'>微信好友</div>
<a style={{display: 'block'}} href={props.data.url}>
<div className="icon"><i className='iconfont iconweixinzhifu'/></div>
<div className='text'>微信好友</div>
</a>
</li>
<li className='share-icon'>
<div className="icon"><i className='iconfont iconpengyouquaniconx'></i></div>
<div className='text'>朋友圈</div>
<a style={{display: 'block'}} href={props.data.url}>
<div className="icon"><i className='iconfont iconpengyouquaniconx'/></div>
<div className='text'>朋友圈</div>
</a>
</li>
</ul>
</div>
......@@ -96,6 +101,10 @@ class Video extends Component {
componentDidMount() {
this.courseID = getParam('id')
if (!this.courseID) {
this.props.history.replace('/')
return
}
this.setState({
courseId: this.courseID
})
......@@ -117,7 +126,6 @@ class Video extends Component {
}
// 购买单集
toSingleset = (item) => {
console.log(item)
this.setState({
singleBox: true,
singMess: item
......@@ -132,8 +140,10 @@ class Video extends Component {
setupRecord = () => {
this.recordSocket = io(API.record, {
transports: ['websocket']
transports: ['websocket'],
forceNew: true
})
// this.recordSocket = io(API.record)
this.recordSocket.on('seek', time => {
this.player.currentTime(time)
})
......@@ -220,7 +230,7 @@ class Video extends Component {
v_course_id: vCourseId,
uid: this.props.user.data.uid,
token: this.token,
platform: 5
platform: 0
})
}
......@@ -300,12 +310,13 @@ class Video extends Component {
return
}
this.countSchedule()
this.setState({
activeIndex: index
},
() => {
if(this.hasAuth()){
if (this.hasAuth()) {
this.setPlayerSrc(this.state.videoList[index]['play_url'])
this.sendLastRecord()
this.playVideo()
......@@ -371,7 +382,7 @@ class Video extends Component {
}
setPlayerSrc = src => {
if(!this.player){
if (!this.player) {
this.initializePlayer()
}
this.player.src({
......@@ -512,7 +523,7 @@ class Video extends Component {
return <VideoCatalog
activeIndex={this.state.activeIndex}
selectVideo={this.selectVideo}
videoCatalog={this.state.videoList}
videoCatalog={videoList}
{...props}/>
}}/>
<Route path={`${match.path}/datum`} render={props => {
......
import React, { Component } from 'react'
import './video-catalog.scss'
import { Link } from "react-router-dom";
import classnames from 'classnames'
......@@ -29,11 +30,16 @@ class VideoCatalog extends Component {
)}/>
</div>
{
(item.practice && item.practice.qid) ? <div className="exercise">
课后练习:{item.practice.title}
<i className={classnames('iconfont', item.practice.is_tested ? 'iconiconfront-3' : 'iconiconfront-74')}/>
{/*<i className='iconfont iconiconfront-74'/>*/}
</div>
(item.practice && item.practice.qid)
? <Link to={{
pathname: '/campTest',
search: `?keshi_id=${item.id}&qid=${item.practice.qid}`
}}>
<div className="exercise">
课后练习:{item.practice.title}
<i className={classnames('iconfont', item.practice.is_tested ? 'iconiconfront-3' : 'iconiconfront-74')}/>
</div>
</Link>
: null
}
</li>
......
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