Commit cc2345ee by zhangleyuan

feat:添加去向图文课的跳转

parent 5d47d3ab
...@@ -481,6 +481,23 @@ class SelectOperatorModal extends React.Component { ...@@ -481,6 +481,23 @@ class SelectOperatorModal extends React.Component {
return _item; return _item;
}) })
} }
renderFooter = ()=>{
const { activeKey } = this.state;
let href = '';
switch (activeKey){
case 'live':
href = <a target='_blank' className="link-create-course" href={window.location.origin + window.location.pathname + '#/create-live-course?type=add'} onClick={this.props.onClose}>没有找到需要的直播课?<span>去创建</span></a>
break;
case 'video':
href = <a target='_blank' className="link-create-course" href={window.location.origin + window.location.pathname + '#/create-video-course?type=add'} onClick={this.props.onClose}>没有找到需要的视频课?<span>去创建</span></a>
break;
case 'picture':
href = <a target='_blank' className="link-create-course" href={window.location.origin + window.location.pathname + '#/create-graphics-course?type=add'} onClick={this.props.onClose}>没有找到需要的视频课?<span>去创建</span></a>
break;
}
return href;
}
render() { render() {
const { visible } = this.props; const { visible } = this.props;
const { const {
...@@ -515,10 +532,7 @@ class SelectOperatorModal extends React.Component { ...@@ -515,10 +532,7 @@ class SelectOperatorModal extends React.Component {
width={800} width={800}
closeIcon={<span className="icon iconfont modal-close-icon">&#xe6ef;</span>} closeIcon={<span className="icon iconfont modal-close-icon">&#xe6ef;</span>}
footer={[ footer={[
activeKey ==='live'? this.renderFooter()
<a target='_blank' className="link-create-course" href={window.location.origin + window.location.pathname + '#/create-live-course?type=add'} onClick={this.props.onClose}>没有找到需要的直播课?<span>去创建</span></a>
:
<a target='_blank' className="link-create-course" href={window.location.origin + window.location.pathname + '#/create-video-course?type=add'} onClick={this.props.onClose}>没有找到需要的视频课?<span>去创建</span></a>
, ,
<Button <Button
onClick={() => { onClick={() => {
......
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