From 5ed217d5b5814f6185951e265e49aaff76355f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 6 Feb 2020 22:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/Resource/Fileslistitem.js | 24 +++++++++++-------- .../courses/coursesPublic/Showoldfiles.js | 5 +++- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index fe0574f56..27d8f471b 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { WordsBtn,ActionBtn,getmyUrl } from 'educoder'; +import { WordsBtn,ActionBtn,getmyUrl,getUrl } from 'educoder'; import {Tooltip,message,Input, Button} from 'antd'; import {Link} from 'react-router-dom'; import axios from 'axios' @@ -60,7 +60,8 @@ class Fileslistitem extends Component{ if(list.content_type==="video/mp4"){ this.setState({ videoModalObj:true, - file_url:"https://"+document.domain+list.url+'?file_name='+list.title, + // file_url:"https://"+document.domain+list.url+'?file_name='+list.title+"&disposition=MP4", + file_url:getUrl()+list.url+'?file_name='+list.title+'&disposition=MP4', }) return }else{ @@ -92,7 +93,9 @@ class Fileslistitem extends Component{ if(list.content_type==="video/mp4"){ this.setState({ videoModalObj:true, - file_url:"https://"+document.domain+list.url+'?file_name='+list.title, + // file_url:"https://"+document.domain+list.url+'?file_name='+list.title+'&disposition=MP4', + file_url:getUrl()+list.url+'?file_name='+list.title+'&disposition=MP4', + }) return }else{ @@ -126,10 +129,11 @@ class Fileslistitem extends Component{ } Clicktobroadcastthevideo=(bool,url)=>{ - this.setState({ - videoModalObj:bool, - file_url:"https://"+document.domain+url, - }) + this.setState({ + videoModalObj:bool, + // file_url:"https://"+document.domain+url+'&disposition=MP4', + file_url:getUrl()+url+'&disposition=MP4', + }) } @@ -231,8 +235,8 @@ class Fileslistitem extends Component{ width={800 - 1} >
@@ -259,7 +263,7 @@ class Fileslistitem extends Component{ {...this.props} visible={this.state.Showoldfiles} allfiles={this.state.allfiles} - Clicktobroadcastthevideo={(bool,urls)=>this.Clicktobroadcastthevideo(bool,urls)} + Clicktobroadcastthevideo={(bool,urls,index)=>this.Clicktobroadcastthevideo(bool,urls,index)} closaoldfilesprops={this.closaoldfilesprops} />