Commit 08cf0400 authored by baixian's avatar baixian

优化

parent 339adfc3
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="text/javascript" src="/dist/main.59d729.js"></script></body> <script type="text/javascript" src="/dist/main.df6d5a.js"></script></body>
</html> </html>
\ No newline at end of file
...@@ -93,13 +93,13 @@ class MaterialModalForm extends React.Component { ...@@ -93,13 +93,13 @@ class MaterialModalForm extends React.Component {
{item.type === 1 && {item.type === 1 &&
<div className={`${pageStyle.mediaBox} ${pageStyle.imgBox}`} title={JSON.parse(item.content).name}> <div className={`${pageStyle.mediaBox} ${pageStyle.imgBox}`} title={JSON.parse(item.content).name}>
<img className={pageStyle.img} src={imagify(item.src)} alt="" /> <img className={pageStyle.img} src={imagify(item.src)} alt="" />
<img className={pageStyle.imageicon} src={`${__IMGCDN__}/course/photo_icon.png`} alt="" /> <img className={pageStyle.imageicon} src={`${__IMGCDN__}course/photo_icon.png`} alt="" />
</div> </div>
} }
{item.type === 2 && {item.type === 2 &&
<div className={`${pageStyle.mediaBox} ${pageStyle.videoBox}`} title={JSON.parse(item.content).name}> <div className={`${pageStyle.mediaBox} ${pageStyle.videoBox}`} title={JSON.parse(item.content).name}>
<img className={pageStyle.img} src={`${videoPoster(item.src)}`} alt="" /> <img className={pageStyle.img} src={`${videoPoster(item.src)}`} alt="" />
<img className={pageStyle.videoicon} src={`${__IMGCDN__}/course/video_icon.png`} alt="" /> <img className={pageStyle.videoicon} src={`${__IMGCDN__}course/video_icon.png`} alt="" />
<div className={pageStyle.videoplay}> <div className={pageStyle.videoplay}>
<img className={pageStyle.videoplayicon} src={`${__IMGCDN__}smallplayicon.png`} alt="" /> <img className={pageStyle.videoplayicon} src={`${__IMGCDN__}smallplayicon.png`} alt="" />
</div> </div>
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
mobile: (data.data.business && data.data.business.mobile) || '', mobile: (data.data.business && data.data.business.mobile) || '',
nickname: (data.data.business && data.data.business.nickname) || '', nickname: (data.data.business && data.data.business.nickname) || '',
expiresDateTime: data.data.expiresDateTime || '', expiresDateTime: data.data.expiresDateTime || '',
bind_member_id: (data.data.business && data.data.business.bind_member_id) || 0,
}); });
} }
message.success('注册成功!', 1); message.success('注册成功!', 1);
...@@ -125,7 +126,7 @@ export default { ...@@ -125,7 +126,7 @@ export default {
}); });
// yield delay(200); // yield delay(200);
yield put(routerRedux.push({ yield put(routerRedux.push({
pathname: `/deploySchool/${schooladd.data.id}`, pathname: `/erp/deploySchool/${schooladd.data.id}`,
})); }));
} }
} else { } else {
......
...@@ -1370,7 +1370,7 @@ export default { ...@@ -1370,7 +1370,7 @@ export default {
}, },
}); });
} }
const deploySchoolMath = pathToRegexp('/deploySchool/:id').exec(pathname); const deploySchoolMath = pathToRegexp('/erp/deploySchool/:id').exec(pathname);
if (deploySchoolMath) { if (deploySchoolMath) {
dispatch({ dispatch({
type: 'deployschool/queryinfo', type: 'deployschool/queryinfo',
......
...@@ -62,6 +62,10 @@ class AddCrmForm extends React.Component { ...@@ -62,6 +62,10 @@ class AddCrmForm extends React.Component {
pay_switch, pay_switch,
status, status,
} = values; } = values;
if (Number(pay_switch) == 1 && secret == '') {
message.error('请先设置密码', 0.5);
return;
}
dispatch({ dispatch({
type: 'liveclass/saveLive', type: 'liveclass/saveLive',
payload: { payload: {
...@@ -138,7 +142,8 @@ class AddCrmForm extends React.Component { ...@@ -138,7 +142,8 @@ class AddCrmForm extends React.Component {
}; };
return ( return (
<div className={pageStyle.container}> <div className={pageStyle.container}>
<div className={pageStyle.topTip}>查看教程</div> {/* eslint-disable-next-line react/jsx-no-target-blank */}
<a className={pageStyle.topTip} href="https://w.url.cn/s/APP4rb7" target="_blank">查看教程</a>
<div className={pageStyle.headerWrap}> <div className={pageStyle.headerWrap}>
<div className={pageStyle.commonTitle}><span className={pageStyle.line} />基本信息</div> <div className={pageStyle.commonTitle}><span className={pageStyle.line} />基本信息</div>
<Form labelAlign="left" onSubmit={this.save}> <Form labelAlign="left" onSubmit={this.save}>
...@@ -205,7 +210,7 @@ class AddCrmForm extends React.Component { ...@@ -205,7 +210,7 @@ class AddCrmForm extends React.Component {
<div className={pageStyle.imgCase} onClick={this.lookCase}> <div className={pageStyle.imgCase} onClick={this.lookCase}>
<span>查看示例</span> <span>查看示例</span>
<div className={pageStyle.caseWrap}> <div className={pageStyle.caseWrap}>
<img src="https://static-resource.xiaoeknow.com/b_static/course_manage/courseListResource/images/video_push.jpg?428ddd1727e2ef7dcad0112b98b0e453&app_id=appnsHaHvXv8409" alt="" /> <img src={`${__IMGCDN__}liveclass/banner.png`} alt="" />
</div> </div>
</div> </div>
</div> </div>
...@@ -235,7 +240,6 @@ class AddCrmForm extends React.Component { ...@@ -235,7 +240,6 @@ class AddCrmForm extends React.Component {
{getFieldDecorator('secret', { {getFieldDecorator('secret', {
initialValue: addLiveObj.secret, initialValue: addLiveObj.secret,
rules: [ rules: [
{ required: true, message: '密码不能为空' },
{ {
message: '请输入正整数', message: '请输入正整数',
pattern: new RegExp(/^[0-9]\d*$/, 'g'), pattern: new RegExp(/^[0-9]\d*$/, 'g'),
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
font-weight:400; font-weight:400;
color:rgba(33,148,255,1); color:rgba(33,148,255,1);
padding-bottom: 20px; padding-bottom: 20px;
display: block;
} }
.headerWrap { .headerWrap {
.commonTitle { .commonTitle {
......
...@@ -41,7 +41,7 @@ class DownloadModal extends React.Component { ...@@ -41,7 +41,7 @@ class DownloadModal extends React.Component {
downLoadApp = (type) => { downLoadApp = (type) => {
const a = document.createElement('a'); // 生成一个a元素 const a = document.createElement('a'); // 生成一个a元素
const event = new MouseEvent('click'); // 创建一个单击事件 const event = new MouseEvent('click'); // 创建一个单击事件
const url = (type == 'windows' ? 'https://xiaoetong-1252524126.file.myqcloud.com/obs-download/OBS-Studio-23.0.1-Full-Installer-x86.exe' : 'https://xiaoetong-1252524126.file.myqcloud.com/obs-download/OBS-Studio-23.0.1-Full-Installer-x86.exe'); const url = (type == 'windows' ? 'https://cdn.s.shangjiadao.cn/clock/software/OBS-Studio-23.0.1-Full-Installer-x86.exe' : 'https://cdn.s.shangjiadao.cn/clock/software/obs-mac-23.2.1-installer.pkg');
a.href = url; // 将生成的URL设置为a.href属性 a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件 a.dispatchEvent(event); // 触发a的单击事件
} }
...@@ -58,7 +58,7 @@ class DownloadModal extends React.Component { ...@@ -58,7 +58,7 @@ class DownloadModal extends React.Component {
onCancel={this.close} onCancel={this.close}
maskClosable={false} maskClosable={false}
zIndex={110} zIndex={110}
width={800} width={740}
bodyStyle={{ borderRadius: 8 }} bodyStyle={{ borderRadius: 8 }}
footer={ footer={
<div className={pageStyle.footerTip}> <div className={pageStyle.footerTip}>
...@@ -68,7 +68,8 @@ class DownloadModal extends React.Component { ...@@ -68,7 +68,8 @@ class DownloadModal extends React.Component {
> >
<div className={pageStyle.wrap}> <div className={pageStyle.wrap}>
<div className={pageStyle.title}>直播间创建成功,快去OBS直播客户端开始学员讲课吧</div> <div className={pageStyle.title}>直播间创建成功,快去OBS直播客户端开始学员讲课吧</div>
<div className={pageStyle.titleTip}>说明:OBS是讲师进行直播推流使用的第三方软件,助教可以配合网页/h5进行直播评论互动,详情操作 查看 <span>OBS直播使用教程</span></div> {/* eslint-disable-next-line react/jsx-no-target-blank */}
<div className={pageStyle.titleTip}>说明:OBS是讲师进行直播推流使用的第三方软件,助教可以配合网页/h5进行直播评论互动,详情操作 查看 <a className={pageStyle.dowTip} href="https://w.url.cn/s/APP4rb7" target="_blank">OBS直播使用教程</a></div>
<div className={pageStyle.stepOne}> <div className={pageStyle.stepOne}>
<span>1</span>OBS推 <span>1</span>OBS推
</div> </div>
...@@ -109,7 +110,7 @@ class DownloadModal extends React.Component { ...@@ -109,7 +110,7 @@ class DownloadModal extends React.Component {
<div className={pageStyle.copyButton} data-clipboard-target="#copy3" id="btnCopyLink3">复制</div> <div className={pageStyle.copyButton} data-clipboard-target="#copy3" id="btnCopyLink3">复制</div>
</div> </div>
</div> </div>
<p className={pageStyle.webTip} >复制链接在网页直接打开</p> <p className={pageStyle.webTip}>复制链接在网页直接打开</p>
</div> </div>
</Modal> </Modal>
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
color:rgba(128,128,128,1); color:rgba(128,128,128,1);
text-align: center; text-align: center;
} }
.dowTip {
color: #2A75ED;
cursor: pointer;
}
} }
} }
.stepOne { .stepOne {
......
...@@ -20,7 +20,6 @@ class QrcodeShow extends React.Component { ...@@ -20,7 +20,6 @@ class QrcodeShow extends React.Component {
} }
download = () => { download = () => {
const { previewQrcode, downloadTitle } = this.props;
const Qr = document.getElementById('qrid'); const Qr = document.getElementById('qrid');
const image = new Image(); const image = new Image();
image.src = Qr.toDataURL('image/png'); image.src = Qr.toDataURL('image/png');
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
text-align: center; text-align: center;
padding: 20px 0; padding: 20px 0;
cursor: pointer; cursor: pointer;
width: 190px;
margin: 0 auto;
} }
.copyWrap { .copyWrap {
display: -webkit-flex; display: -webkit-flex;
......
...@@ -252,6 +252,7 @@ class LiveClass extends React.Component { ...@@ -252,6 +252,7 @@ class LiveClass extends React.Component {
payload: { payload: {
lookVideoShow: true, lookVideoShow: true,
lookVideoUrl: record.replay_url.url, lookVideoUrl: record.replay_url.url,
lookVideoPoster: record.cover,
}, },
}); });
} }
...@@ -371,7 +372,8 @@ class LiveClass extends React.Component { ...@@ -371,7 +372,8 @@ class LiveClass extends React.Component {
<div className={pageStyle.container}> <div className={pageStyle.container}>
<div className={pageStyle.headerbox}> <div className={pageStyle.headerbox}>
<Button size="small" style={{ marginRight: 20 }} type="primary" onClick={this.createLive}>创建直播</Button> <Button size="small" style={{ marginRight: 20 }} type="primary" onClick={this.createLive}>创建直播</Button>
<span className={pageStyle.headerbtn}>查看直播教程</span> {/* eslint-disable-next-line react/jsx-no-target-blank */}
<a className={pageStyle.headerbtn} href="https://w.url.cn/s/APP4rb7" target="_blank">查看直播教程</a>
</div> </div>
<div className={pageStyle.searchbox}> <div className={pageStyle.searchbox}>
<Row <Row
...@@ -438,7 +440,6 @@ class LiveClass extends React.Component { ...@@ -438,7 +440,6 @@ class LiveClass extends React.Component {
visible={downloadVisible} visible={downloadVisible}
close={this.closeDownload} close={this.closeDownload}
liveUrlData={liveUrlData} liveUrlData={liveUrlData}
previewQrcode={previewQrcode}
/> />
<QrcodeShow <QrcodeShow
previewQrcodeShow={previewQrcodeShow} previewQrcodeShow={previewQrcodeShow}
...@@ -451,6 +452,7 @@ class LiveClass extends React.Component { ...@@ -451,6 +452,7 @@ class LiveClass extends React.Component {
<VideoPlay <VideoPlay
src={lookVideoUrl} src={lookVideoUrl}
closeVideoPlay={this.closeVideoPlay} closeVideoPlay={this.closeVideoPlay}
poster={lookVideoPoster}
/> />
} }
</div> </div>
...@@ -473,6 +475,7 @@ function mapStateToProps(state) { ...@@ -473,6 +475,7 @@ function mapStateToProps(state) {
previewQrcode, previewQrcode,
lookVideoShow, lookVideoShow,
lookVideoUrl, lookVideoUrl,
lookVideoPoster,
} = state.liveclass; } = state.liveclass;
const { const {
guideStep, guideStep,
...@@ -496,6 +499,7 @@ function mapStateToProps(state) { ...@@ -496,6 +499,7 @@ function mapStateToProps(state) {
previewQrcode, previewQrcode,
lookVideoShow, lookVideoShow,
lookVideoUrl, lookVideoUrl,
lookVideoPoster,
}; };
} }
export default connect(mapStateToProps)(LiveClassForm); export default connect(mapStateToProps)(LiveClassForm);
......
...@@ -370,6 +370,7 @@ function RouterConfig({ history }) { ...@@ -370,6 +370,7 @@ function RouterConfig({ history }) {
render={() => ( render={() => (
<OuterPage> <OuterPage>
<Switch> <Switch>
<Route path="/erp/deploySchool/:id" exact component={DeploySchool} />
<Route path="/erp/joinschooladd" exact component={JoinSchoolAdd} /> <Route path="/erp/joinschooladd" exact component={JoinSchoolAdd} />
<Route path="/erp/schoollist" exact component={SchoolList} /> <Route path="/erp/schoollist" exact component={SchoolList} />
<Route path="/erp/schooladd" exact component={SchoolAdd} /> <Route path="/erp/schooladd" exact component={SchoolAdd} />
...@@ -384,7 +385,6 @@ function RouterConfig({ history }) { ...@@ -384,7 +385,6 @@ function RouterConfig({ history }) {
<Route path="/login" exact component={Login} /> <Route path="/login" exact component={Login} />
<Route path="/register" exact component={NewRegister} /> <Route path="/register" exact component={NewRegister} />
<Route path="/rechargedesc" exact component={RechargeDesc} /> <Route path="/rechargedesc" exact component={RechargeDesc} />
<Route path="/deploySchool/:id" exact component={DeploySchool} />
<Route path="/404" render={() => (<Errorpage />)} /> <Route path="/404" render={() => (<Errorpage />)} />
<Route component={Errorpage} /> <Route component={Errorpage} />
</Switch> </Switch>
......
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