Commit c5c58832 authored by baixian's avatar baixian

直播功能完成

parent 08cf0400
......@@ -18,5 +18,5 @@
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="/dist/main.df6d5a.js"></script></body>
<script type="text/javascript" src="/dist/main.6c2759.js"></script></body>
</html>
\ No newline at end of file
......@@ -219,8 +219,8 @@ export default {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/crmactive.png`,
notactiveurl: `${__IMGCDN__}menu/crm.png`,
activeurl: `${__IMGCDN__}menu/live.png?v=1`,
notactiveurl: `${__IMGCDN__}menu/liveactive.png`,
path: '/sjd/liveClass',
relativePath: ['/sjd/liveClass', '/sjd/addLive', '/sjd/editLive/:id'],
},
......
......@@ -106,10 +106,11 @@ export default {
const { code, data } = permissionData;
if (code == 200) {
const userPermission = data.list.map(ele => Number(ele.menu_id));
userPermission.push(70);
yield put({
type: 'webapp/updateState',
payload: {
userPermission,
userPermission: [...userPermission],
},
});
const matchMenu = menuConfig.menus.find(ele => userPermission.indexOf(ele.key) != -1);
......
......@@ -1434,11 +1434,13 @@ export default {
perPage: 200,
});
const { code, data } = permissionData;
const newArray = data.list.map(ele => Number(ele.menu_id));
newArray.push(70);
if (code == 200) {
yield put({
type: 'updateState',
payload: {
userPermission: data.list.map(ele => Number(ele.menu_id)),
userPermission: [...newArray],
},
});
} else {
......
......@@ -33,6 +33,7 @@ class AddCrmForm extends React.Component {
constructor(props) {
super(props);
this.state = {
example: false,
};
this.editorref = React.createRef();
}
......@@ -110,6 +111,16 @@ class AddCrmForm extends React.Component {
},
});
}
handleClickExample = () => {
this.setState({
example: true,
});
}
closeExample = () => {
this.setState({
example: false,
});
}
render() {
const {
form: { getFieldDecorator, getFieldValue },
......@@ -118,6 +129,7 @@ class AddCrmForm extends React.Component {
screenIsBig,
liveLoading,
} = this.props;
const { example } = this.state;
const formItemLayout = {
labelCol: {
xs: { span: 24 },
......@@ -217,7 +229,8 @@ class AddCrmForm extends React.Component {
</div>
</div>
</FormItem>
<FormItem {...formItemLayout} label="直播详情">
<FormItem {...formItemLayout} label="直播详情" style={{ marginBottom: 50 }}>
<div className={pageStyle.exampleSize} onClick={this.handleClickExample}>查看填写范例</div>
<Editor
ref={this.editorref.current}
uEditorCallback={this.uEditorCallback}
......@@ -301,6 +314,17 @@ class AddCrmForm extends React.Component {
</div>
</Form>
</div>
{
example &&
<div className={pageStyle.example}>
<div className={pageStyle.exampleImg}>
<img src={`${__IMGCDN__}liveclass/exampleImg.png`} alt="" />
</div>
<div className={pageStyle.exampleClose} onClick={this.closeExample}>
<Button className={pageStyle.closeBtn}>关闭</Button>
</div>
</div>
}
</div>
);
}
......
......@@ -22,17 +22,18 @@
color:rgba(0,0,0,0.85);
margin-bottom: 20px;
.line {
width: 3px;
height: 19px;
width: 4px;
height: 20px;
background-color: #1890FF;
display: inline-block;
vertical-align: -10%;
margin-right: 6px;
border-radius: 2px;
}
}
:global {
.ant-form-item {
margin-bottom: 20px;
margin-bottom: 25px;
}
}
}
......@@ -183,3 +184,63 @@
z-index: 20;
text-align: left;
}
.exampleSize {
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #1890ff;
cursor: pointer;
}
.example {
font-size: 16px;
display: flex;
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
-webkit-justify-content: center;
justify-content: center;
z-index: 9999;
top: 0;
left: 0;
.exampleImg {
position: absolute;
width: 379px;
height: 95%;
top: 5%;
overflow-y: scroll;
&>img {
max-width: 100%;
min-width: 100%;
}
}
.exampleClose {
position: absolute;
top: 5%;
width: 550px;
text-align: right;
.closeBtn {
width: 76px;
height: 32px;
border-radius: 4px;
color: white;
font-size: 14px;
background:#8D8D8D;
line-height: 32px;
border:1px solid rgba(255,255,255,1);
}
}
}
::-webkit-scrollbar {
width: 8px;
height: 10px;
background-color: rgba(0,0,0,0);
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(0,0,0,.2);
transition: all .4s ease;
-moz-transition: all .4s ease;
-webkit-transition: all .4s ease;
-o-transition: all .4s ease;
}
......@@ -106,7 +106,7 @@ class DownloadModal extends React.Component {
<div className={pageStyle.stepOne} style={{ marginTop: 16 }}>
<span>2</span>网页端地
<div className={pageStyle.copyWrap} style={{ marginTop: 0, marginLeft: 47 }}>
<div className={pageStyle.copyBox} id="copy3">{ENVIRONMENT == 'pro' ? `https://clock-h5.wp53.cn/livecoursedesc/${liveUrlData.id}` : `https://clock-h5.wp53.cn/livecoursedesc/${liveUrlData.id}`}</div>
<div className={pageStyle.copyBox} id="copy3">{ENVIRONMENT == 'pro' ? `https://h5.qingxiao.online/livecoursedesc/${liveUrlData.id}` : `https://clock-h5.wp53.cn/livecoursedesc/${liveUrlData.id}`}</div>
<div className={pageStyle.copyButton} data-clipboard-target="#copy3" id="btnCopyLink3">复制</div>
</div>
</div>
......
......@@ -226,7 +226,7 @@ class LiveClass extends React.Component {
type: 'liveclass/updateState',
payload: {
previewQrcodeShow: true,
previewQrcode: ENVIRONMENT == 'pro' ? `https://clock-h5.wp53.cn/livecoursedesc/${record.id}` : `https://clock-h5.wp53.cn/livecoursedesc/${record.id}`,
previewQrcode: ENVIRONMENT == 'pro' ? `https://h5.qingxiao.online/livecoursedesc/${record.id}` : `https://clock-h5.wp53.cn/livecoursedesc/${record.id}`,
},
});
}
......@@ -242,7 +242,6 @@ class LiveClass extends React.Component {
}
goLook = (record) => {
const { dispatch } = this.props;
console.log(record, 'record');
if (record.replay_url.url == '') {
message.warning('转码中,请稍后查看', 0.5);
return;
......
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