Commit e07c2fe5 by zhanghaozhe

跳转分享落地页

parent 20a31c99
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,7 +101,7 @@ class Video extends Component {
componentDidMount() {
this.courseID = getParam('id')
if(!this.courseID){
if (!this.courseID) {
this.props.history.replace('/')
return
}
......@@ -311,7 +316,7 @@ class Video extends Component {
activeIndex: index
},
() => {
if(this.hasAuth()){
if (this.hasAuth()) {
this.setPlayerSrc(this.state.videoList[index]['play_url'])
this.sendLastRecord()
this.playVideo()
......@@ -377,7 +382,7 @@ class Video extends Component {
}
setPlayerSrc = src => {
if(!this.player){
if (!this.player) {
this.initializePlayer()
}
this.player.src({
......
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