diff --git a/public/react/src/modules/courses/Video/LiveItem.js b/public/react/src/modules/courses/Video/LiveItem.js index 8e70e2972..c6796d747 100644 --- a/public/react/src/modules/courses/Video/LiveItem.js +++ b/public/react/src/modules/courses/Video/LiveItem.js @@ -1,11 +1,16 @@ import React,{ Component } from "react"; import { getImageUrl } from 'educoder'; +import { Modal } from 'antd'; import { WordsBtn } from 'educoder'; -import moment from 'moment'; import axios from 'axios'; class LiveItem extends Component{ - + constructor(props) { + super(props); + this.state = { + visible:false + } + } deleteLive=(id)=>{ this.props.confirm({ @@ -27,12 +32,55 @@ class LiveItem extends Component{ console.log('Cancel'); }, }); + } + alertInfo=()=>{ + console.log("dddd"); + this.setState({ + visible:true + }) + } + onDialogOkBtnClick=()=>{ + this.setState({ + visible:false, + }) } render(){ const { key, item , setLiveId } = this.props; + const { visible } = this.state; + console.log(visible); return( <div className="liveItem" key={key}> + <Modal + title="提示" + visible={visible} + closable={false} + footer={null} + keyboard={false} + > + <div className="task-popup-content"> + <p className="task-popup-text-center font-16 pb20">直播链接失效</p > + </div> + <div className="task-popup-submit clearfix edu-txt-center"> + <a className="task-btn task-btn-orange mr51" onClick={this.onDialogOkBtnClick}>知道了</a > + </div> + </Modal> + { + visible ? + <style>{ + ` + body{ + width: calc(100% - 7px)!important; + overflow: hidden!important; + } + .-task-sidebar{ + right:44px!important + } + `} + </style> + : + "" + } <div className="lineMiddle livesMain"> <span className="lineMiddle"> <span className="font-18 task-hide" style={{maxWidth:"759px"}}>{item.course_name}</span> @@ -44,11 +92,20 @@ class LiveItem extends Component{ <p><span className="task-hide-2 break_word">{item.description}</span></p> </div> { - (item.on_status && item.url)? - <a className="btns going" target="_blank" href={`${item.url}`}>进入</a> + item.on_status ? + <React.Fragment> + { + item.url ? + <a className="btns going" target="_blank" href={`${item.url}`}>进入</a> + : + <a className="btns going" onClick={this.alertInfo}>进入</a> + } + </React.Fragment> : <span className="btns ect">进入</span> } + <a className="btns going" onClick={this.alertInfo}>进入</a> + </div> <p className="lineMiddle livesMain mt15 font-12"> <span className="lineMiddle color-grey-9"> diff --git a/public/react/src/modules/courses/Video/LiveNew.js b/public/react/src/modules/courses/Video/LiveNew.js index e9d9bf9b1..0961d0ef7 100644 --- a/public/react/src/modules/courses/Video/LiveNew.js +++ b/public/react/src/modules/courses/Video/LiveNew.js @@ -9,7 +9,8 @@ import axios from 'axios'; const { TextArea } = Input; const { Option } = Select; -const array=['腾讯课堂','B站','斗鱼','威佰通'] +// ,'威佰通' +const array=['腾讯课堂','B站','斗鱼']; function range(start, end) { const result = [];