base加解密

courseware
dinglink 5 years ago
parent c4d2394f66
commit fc72c8c92a

@ -14,6 +14,7 @@ import './video.css';
import '../../user/usersInfo/video/InfosVideo.css'
import axios from 'axios';
import { logWatchHistory } from "../../../services/video-service";
import { Base64 } from 'js-base64';
const DEFAULT_VIDEO_WIDTH_IN_MD = "90%" // 400
const DEFAULT_VIDEO_HEIGHT_IN_MD = "55%" // 400
@ -33,7 +34,8 @@ class Video extends Component {
visible: false,
moveVisible: false,
moveVideoId: undefined
moveVideoId: undefined,
videourl:null
}
}
@ -64,6 +66,7 @@ class Video extends Component {
if (!_clipboard) {
_clipboard = new ClipboardJS('.copybtn');
_clipboard.on('success', (e) => {
this.props.showNotification('复制成功');
});
}
@ -110,6 +113,7 @@ class Video extends Component {
videoVisible: flag
})
if (flag === false) {
if (_clipboard) {
this.setState({
videoId: undefined
@ -119,8 +123,12 @@ class Video extends Component {
}
} else {
setTimeout(() => {
this.setState({
videourl:'12321'
})
if (!_clipboard) {
_clipboard = new ClipboardJS('.copybtn');
_clipboard.on('success', (e) => {
this.props.showNotification('复制成功');
});
@ -131,7 +139,7 @@ class Video extends Component {
}
getCopyText = (file_url, cover_url) => {
return `<video src="${file_url}" controls="true" controlslist="nodownload" width="${DEFAULT_VIDEO_WIDTH_IN_MD}" height="${DEFAULT_VIDEO_HEIGHT_IN_MD}" poster="${cover_url}">您的浏览器不支持 video 标签。</video>`
return `<video src="${Base64.decode(file_url)}" controls="true" controlslist="nodownload" width="${DEFAULT_VIDEO_WIDTH_IN_MD}" height="${DEFAULT_VIDEO_HEIGHT_IN_MD}" poster="${cover_url}">您的浏览器不支持 video 标签。</video>`
}
// 删除事件
@ -228,9 +236,9 @@ class Video extends Component {
className="showVideoModal"
width={800 - 1}
>
{videoId && <VideoPanel src={videoId.file_url} videoId={videoId.videoId} courseId={CourseId} logWatchHistory={logWatchHistory} />}
{videoId && <VideoPanel src={this.state.videourl===null?videoId.file_url:Base64.decode(videoId.file_url)} videoId={videoId.videoId} courseId={CourseId} logWatchHistory={logWatchHistory} />}
<div className="df copyLine">
<div className="df copyLine" style={{}}>
<Input value={_inputValue}
className="dark"
></Input>

@ -404,7 +404,7 @@ class CoursesBanner extends Component {
exitclass=()=>{
this.setState({
modalsType: true,
modalsTopval: "退出后您将不再是本课堂的成员,作品将全部被删除,",
modalsTopval: "退出后您将不再是本课题的成员,作品将全部被删除,",
modalsBottomval:"确定要退出该课堂吗?",
metype:6
})
@ -606,28 +606,28 @@ class CoursesBanner extends Component {
<div className="clearfix ">
<div className="fl fl mr40 mb20" >
<div>
<a href={"/users/" + coursedata.teacher_login} className="fl">
<img alt="头像" className="radius fl mt3 bannerimgname"
src={getImageUrl(`images/` + coursedata.teacher_img)}/>
</a>
<div className="fl mt13">
<p className="color-white">
<a href={"/users/" + coursedata.teacher_login}
className="color-white bannnerusername">{coursedata.teacher_name}</a>
</p>
</div>
<div className="fl mt13">
<p className="color-white bannnerusernames">{coursedata.teacher_school}</p>
</div>
</div>
<a href={"/users/" + coursedata.teacher_login} className="fl">
<img alt="头像" className="radius fl mt3 bannerimgname"
src={getImageUrl(`images/` + coursedata.teacher_img)}/>
</a>
<div className="fl mt13">
<p className="color-white">
<a href={"/users/" + coursedata.teacher_login}
className="color-white bannnerusername">{coursedata.teacher_name}</a>
</p>
</div>
<div className="fl mt13">
<p className="color-white bannnerusernames">{coursedata.teacher_school}</p>
</div>
</div>
{/* <div className="task-hide" style={{height:25,marginBottom:10,marginLeft:60}}>
{coursedata.teacher_users.length===0?'':
<span className="color-white" >协作老师
{coursedata.teacher_users.map((iem,idx)=>{
return(
<span className="task-hide" style={{width:50,marginLeft:5}}>{idx<3?iem:''} {coursedata.teacher_users.length>3&&idx===2?'...':''} </span>
<span className="task-hide" style={{width:50,marginLeft:5}}>{idx<3?iem:''} {coursedata.teacher_users.length>3&&idx===2?'...':''} </span>
)
})
}
@ -636,7 +636,7 @@ class CoursesBanner extends Component {
</div> */}
</div>
{/*{excellent===false?*/}
{/* :*/}
@ -766,12 +766,12 @@ background:rgba(204,204,204,0.2) !important;
placement="topLeft"
title={<pre className="antsoancss">
{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
<span>新收到{coursedata.teacher_applies_count}加入课堂的申请
<a className={"daishenp ml5"} onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
<span >您有{coursedata.teacher_applies_count}新的加入申请
<a className={"daishenp"} onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
<span style={{
color:"#FFA804"
}}>
审批
审批
</span></a></span>:""}</pre>}>
<span className="color-grey-c font-16" onClick={excellent === true && this.props.isAdminOrStudent() === false ?"":()=>this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers")}>
<span className={"mr10"}>教师</span>

Loading…
Cancel
Save