Commit 3144a717 authored by wangxuelai's avatar wangxuelai

''

parent 0fab8d00
......@@ -17,6 +17,6 @@
</head>
<body>
<div id="root"></div>
<script src="dist/main.js?1574779111827" charset="utf-8"></script>
<script src="dist/main.js?1574819925045" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -89,15 +89,15 @@ class UploadCourseware extends React.Component {
width={600}
>
<div className={pageStyle.uploadBox} style={{ display: !info.src ? 'block' : 'none' }}>
<input
type="file"
className={pageStyle.uploadInput}
accept=".ppt, .pptx, image/*, application/vnd.ms-powerpoint, video/mp4, application/pdf, audio/*"
onChange={this.uploadCourseMateria}
id="uploadcourseware"
/>
<div className={pageStyle.uploadBoxTitle}>可将文件直接拖拽到此处上传或者点击上传</div>
<div className={pageStyle.filetypebox}>
<input
type="file"
className={pageStyle.uploadInput}
accept=".ppt, .pptx, image/*, application/vnd.ms-powerpoint, video/mp4, application/pdf, audio/*"
onChange={this.uploadCourseMateria}
id="uploadcourseware"
/>
<div className={pageStyle.boxotem}>
<img src={`${__IMGCDN__}course/ppt.png`} alt="" />
<div className={pageStyle.boxotemname}>支持ppt</div>
......
......@@ -13,6 +13,15 @@
border:2px dashed rgba(194,194,194,1);
margin: 0 auto;
position: relative;
.uploadInput {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
.uploadBoxTitle {
color: #575757;
font-size: 16px;
......@@ -25,15 +34,6 @@
align-items: center;
justify-content: space-around;
position: relative;
.uploadInput {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
.boxotem {
img {
display: block;
......
......@@ -1077,11 +1077,21 @@ export default {
},
});
yield put({
type: 'findCourse',
type: 'updateState',
payload: {
id: addCourseObj.id,
addCourseObj: {
...addCourseObj,
content: JSON.stringify(info),
},
coursewareInfo: info,
},
});
// yield put({
// type: 'findCourse',
// payload: {
// id: addCourseObj.id,
// },
// });
yield put({
type: 'selectCourseList',
payload: {
......
......@@ -353,11 +353,11 @@ class CourseDetailForm extends React.Component {
{!addCourseObj.poster ?
<div className={pageStyle.posterWrap}>
<div className={pageStyle.posterUploadBox} onClick={choosePoster}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<img src={`${__IMGCDN__}/course/postermodul.png`} alt="从素材库选择" />
<div className={pageStyle.tip}>选择模板</div>
</div>
<div className={pageStyle.posterUploadBox} style={{ marginRight: 30 }}>
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
<img src={`${__IMGCDN__}/course/posterlocal.png`} alt="上传图片" />
<div className={pageStyle.tip}>本地上传</div>
<input
type="file"
......
......@@ -86,7 +86,7 @@ class AddCourseModalForm extends React.Component {
is_encrypt: is_encrypt && is_encrypt === true ? 1 : 2,
type,
password,
start_time: moment(time[0]).format('YYYY-MM-DD HH:mm'),
start_time: moment(time).format('YYYY-MM-DD HH:mm'),
},
});
}
......
......@@ -323,6 +323,7 @@ class CourseDetailForm extends React.Component {
};
const { textLength } = this.state;
const { title } = addCourseObj;
console.log(addCourseObj, 'addCourseObj');
const selectBefore = (
<div>{title.length + textLength}/40</div>
);
......@@ -441,11 +442,11 @@ class CourseDetailForm extends React.Component {
{!addCourseObj.poster ?
<div className={pageStyle.posterWrap}>
<div className={pageStyle.posterUploadBox} onClick={choosePoster}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<img src={`${__IMGCDN__}/course/postermodul.png`} alt="从素材库选择" />
<div className={pageStyle.tip}>选择模板</div>
</div>
<div className={pageStyle.posterUploadBox} style={{ marginRight: 30 }}>
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
<img src={`${__IMGCDN__}/course/posterlocal.png`} alt="上传图片" />
<div className={pageStyle.tip}>本地上传</div>
<input
type="file"
......
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