Commit dbee4b21 authored by baixian's avatar baixian

111222dd

parent 9ea67054
image/course/data_icon1.png

1.63 KB | W: | H:

image/course/data_icon1.png

1.62 KB | W: | H:

image/course/data_icon1.png
image/course/data_icon1.png
image/course/data_icon1.png
image/course/data_icon1.png
  • 2-up
  • Swipe
  • Onion skin
image/course/data_icon2.png

1.4 KB | W: | H:

image/course/data_icon2.png

1.42 KB | W: | H:

image/course/data_icon2.png
image/course/data_icon2.png
image/course/data_icon2.png
image/course/data_icon2.png
  • 2-up
  • Swipe
  • Onion skin
image/course/data_icon3.png

568 Bytes | W: | H:

image/course/data_icon3.png

594 Bytes | W: | H:

image/course/data_icon3.png
image/course/data_icon3.png
image/course/data_icon3.png
image/course/data_icon3.png
  • 2-up
  • Swipe
  • Onion skin
image/course/data_icon4.png

974 Bytes | W: | H:

image/course/data_icon4.png

998 Bytes | W: | H:

image/course/data_icon4.png
image/course/data_icon4.png
image/course/data_icon4.png
image/course/data_icon4.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
} }
.list { .list {
text-align: center; text-align: center;
:global {
.ant-radio-group {
width: 100%;
}
}
} }
.tablefooterbox { .tablefooterbox {
text-align: right; text-align: right;
......
...@@ -465,28 +465,34 @@ export default { ...@@ -465,28 +465,34 @@ export default {
callBack(); callBack();
} }
yield put({ yield put({
type: 'updateState', type: 'findCourse',
payload: { payload: {
addCourseObj: { id: data.data.id,
title: '',
start_time: '',
charge_type: '',
created_at: '',
cover: '',
type: '',
audio: '',
intro: [
{ type: 'text', value: '' },
],
remark: '',
study_count: '',
status: '',
content: '',
},
}, },
}); });
yield delay(50); // yield put({
yield put(routerRedux.push('/sjd/singleclass')); // type: 'updateState',
// payload: {
// addCourseObj: {
// title: '',
// start_time: '',
// charge_type: '',
// created_at: '',
// cover: '',
// type: '',
// audio: '',
// intro: [
// { type: 'text', value: '' },
// ],
// remark: '',
// study_count: '',
// status: '',
// content: '',
// },
// },
// });
// yield delay(50);
// yield put(routerRedux.push('/sjd/singleclass'));
} else { } else {
yield put({ yield put({
type: 'webapp/errorrequestresolve', type: 'webapp/errorrequestresolve',
......
...@@ -152,6 +152,14 @@ class CommentListForm extends React.Component { ...@@ -152,6 +152,14 @@ class CommentListForm extends React.Component {
staticChartId: gatherDetail.id, staticChartId: gatherDetail.id,
}, },
}); });
dispatch({
type: 'coursegatherdetail/searchCourseReply',
payload: {
params: {
source_id: gatherDetail.id,
},
},
});
} }
render() { render() {
const { const {
......
...@@ -212,11 +212,19 @@ class CourseDetailForm extends React.Component { ...@@ -212,11 +212,19 @@ class CourseDetailForm extends React.Component {
const formItemModalLineLayout = { const formItemModalLineLayout = {
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 1 }, sm: { span: 3 },
md: { span: 2 },
lg: { span: 2 },
xl: { span: 2 },
xxl: { span: 1 },
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 23 }, sm: { span: 21 },
md: { span: 22 },
lg: { span: 22 },
xl: { span: 22 },
xxl: { span: 23 },
}, },
}; };
const { textLength } = this.state; const { textLength } = this.state;
...@@ -237,23 +245,28 @@ class CourseDetailForm extends React.Component { ...@@ -237,23 +245,28 @@ class CourseDetailForm extends React.Component {
</div> </div>
</div> : </div> :
<div className={pageStyle.photoWrap}> <div className={pageStyle.photoWrap}>
<div className={pageStyle.material} onClick={this.chooseMaterial}> <div className={pageStyle.defaultImgBox}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" /> <img className={pageStyle.defaultImg} src={`${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />
<div className={pageStyle.tip}>从素材库选择</div> <div className={pageStyle.chooseType}>
</div> <div className={pageStyle.material} onClick={this.chooseMaterial}>
<div className={pageStyle.material}> <img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" /> <div className={pageStyle.tip}>从素材库选择</div>
<div className={pageStyle.tip}>上传图片</div> </div>
<input <div className={pageStyle.material}>
type="file" <img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
className={pageStyle.uploadInput} <div className={pageStyle.tip}>上传图片</div>
accept="image/png, image/jpeg" <input
onChange={(e) => { this.uploadCover(e); }} type="file"
/> className={pageStyle.uploadInput}
accept="image/png, image/jpeg"
onChange={(e) => { this.uploadCover(e); }}
/>
</div>
</div>
</div> </div>
</div> </div>
} }
<span className="ant-form-text">图片建议格式位JPG/PNG,尺寸140*140,图片大小不超过10MB</span> <span className="ant-form-text">图片建议格式位JPG/PNG,尺寸260*140,图片大小不超过10MB</span>
</FormItem> </FormItem>
<FormItem {...formItemModalLineLayout} label="标题"> <FormItem {...formItemModalLineLayout} label="标题">
{getFieldDecorator('title', { {getFieldDecorator('title', {
......
...@@ -12,23 +12,56 @@ ...@@ -12,23 +12,56 @@
.photoWrap { .photoWrap {
display: inline-flex; display: inline-flex;
width: 320px; width: 320px;
height: 140px;
position: relative;
.defaultImgBox {
width: 260px;
height: 140px;
cursor: pointer;
.chooseType {
position: absolute;
width: 100%;
height: 100%;
bottom: -140px;
left: 0;
background-color: #fff;
transition: bottom 0.2s;
opacity: 0;
display: flex;
align-items: center;
justify-content: space-between;
z-index: -1;
}
.defaultImg {
width: 260px;
height: 140px;
}
}
.defaultImgBox:hover .chooseType {
bottom: 0;
opacity: 1;
z-index: 0;
}
.photoCover { .photoCover {
width: 140px; width: 260px;
height: 140px; height: 140px;
position: relative; position: relative;
&>img { &>img {
width: 140px; width: 260px;
height: 140px; height: 140px;
border-radius: 6px; border-radius: 6px;
} }
.coverDelete { .coverDelete {
font-size: 22px; font-size: 22px;
color: #fa4f53; color: #d5d5d5;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: -40px; right: -40px;
top: 0; top: 0;
} }
.coverDelete:hover {
color: #fa4f53;
}
} }
.material { .material {
width: 140px; width: 140px;
...@@ -103,9 +136,12 @@ ...@@ -103,9 +136,12 @@
top: 3px; top: 3px;
right: 0; right: 0;
font-size: 22px; font-size: 22px;
color: #fa4f53; color: #d5d5d5;
cursor: pointer; cursor: pointer;
} }
.audioDelete:hover {
color: #fa4f53;
}
.voiceUpload { .voiceUpload {
position: absolute; position: absolute;
width: 100%; width: 100%;
......
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 26px; width: 30px;
height: 22px; height: 30px;
margin-right: 19px; margin-right: 19px;
.staticIcon { .staticIcon {
width: 26px; width: 30px;
height: 22px; height: 30px;
display: block; display: block;
} }
} }
...@@ -109,4 +109,4 @@ ...@@ -109,4 +109,4 @@
} }
} }
} }
} }
\ No newline at end of file
...@@ -61,6 +61,14 @@ class StaticCenter extends React.Component { ...@@ -61,6 +61,14 @@ class StaticCenter extends React.Component {
tabIndex: tab, tabIndex: tab,
}, },
}); });
dispatch({
type: 'coursegatherdetail/searchCourseReply',
payload: {
params: {
source_id: gatherDetail.id,
},
},
});
} }
} }
toAddCourse = () => { toAddCourse = () => {
......
...@@ -9,7 +9,10 @@ const MediaCard = (props) => { ...@@ -9,7 +9,10 @@ const MediaCard = (props) => {
} = props; } = props;
return ( return (
<div className={pageStyle.box} {...props} onClick={() => method.gogatherdetail(info.id)}> <div className={pageStyle.box} {...props} onClick={() => method.gogatherdetail(info.id)}>
<img className={pageStyle.image} src={imagify(info.cover)} alt="" /> {
info.cover ? <img className={pageStyle.image} src={imagify(info.cover)} alt="" /> :
<img className={pageStyle.image} src={`${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />
}
<div className={pageStyle.infobox}> <div className={pageStyle.infobox}>
<div className={pageStyle.topbox}> <div className={pageStyle.topbox}>
<div className={pageStyle.title}>{info.title}</div> <div className={pageStyle.title}>{info.title}</div>
......
...@@ -40,6 +40,16 @@ class AddCourseModalForm extends React.Component { ...@@ -40,6 +40,16 @@ class AddCourseModalForm extends React.Component {
componentWillUnmount() { // 卸载 componentWillUnmount() { // 卸载
} }
handleClick = (key) => { handleClick = (key) => {
const { dispatch, form } = this.props;
this.props.form.validateFields((err, values) => {
if ((values.title != '') && (values.time != '')) {
this.setState({
isActive: key,
});
}
});
}
goBack = (key) => {
this.setState({ this.setState({
isActive: key, isActive: key,
}); });
...@@ -84,7 +94,9 @@ class AddCourseModalForm extends React.Component { ...@@ -84,7 +94,9 @@ class AddCourseModalForm extends React.Component {
}); });
} }
close = () => { close = () => {
const { form } = this.props;
const { close } = this.props; const { close } = this.props;
form.resetFields();
close(); close();
} }
render() { render() {
...@@ -171,7 +183,7 @@ class AddCourseModalForm extends React.Component { ...@@ -171,7 +183,7 @@ class AddCourseModalForm extends React.Component {
<div> <div>
<FormItem> <FormItem>
{getFieldDecorator('is_encrypt', { {getFieldDecorator('is_encrypt', {
initialValue: 'Unchecked', valuePropName: 'Unchecked',
})(<Checkbox><span className={pageStyle.tip}>设置密码</span></Checkbox>)} })(<Checkbox><span className={pageStyle.tip}>设置密码</span></Checkbox>)}
</FormItem> </FormItem>
{ {
...@@ -188,8 +200,8 @@ class AddCourseModalForm extends React.Component { ...@@ -188,8 +200,8 @@ class AddCourseModalForm extends React.Component {
], ],
})( })(
<Input style={{ width: 200 }} maxLength={8} placeholder="请输入4-8位密码" />, <Input style={{ width: 200 }} maxLength={8} placeholder="请输入4-8位密码" />,
<span className="ant-form-text">请输入4-8位数字密码</span>,
)} )}
<span className="ant-form-text">&nbsp;&nbsp;请输入4-8位数字密码</span>
</FormItem> : '' </FormItem> : ''
} }
{/* <FormItem className={pageStyle.firstItem} {...formItemModalLineLayout}> */} {/* <FormItem className={pageStyle.firstItem} {...formItemModalLineLayout}> */}
...@@ -227,7 +239,7 @@ class AddCourseModalForm extends React.Component { ...@@ -227,7 +239,7 @@ class AddCourseModalForm extends React.Component {
{/* } */} {/* } */}
</div> </div>
<div className={pageStyle.modalFooter}> <div className={pageStyle.modalFooter}>
<Button style={{ marginRight: 20 }} onClick={() => this.handleClick(1)}>上一步</Button> <Button style={{ marginRight: 20 }} onClick={() => this.goBack(1)}>上一步</Button>
<Button type="primary" loading={addLoading} htmlType="submit">创建课程</Button> <Button type="primary" loading={addLoading} htmlType="submit">创建课程</Button>
</div> </div>
</div> </div>
......
...@@ -193,14 +193,15 @@ class CommentListForm extends React.Component { ...@@ -193,14 +193,15 @@ class CommentListForm extends React.Component {
columns={columns} columns={columns}
pagination={false} pagination={false}
footer={() => ( footer={() => (
<div className="tablefooterbox"> commentList.length > 0 &&
<span className="tablefooterstatic">{commentListTotal}条数据</span> <div className="tablefooterbox">
<Pagination <span className="tablefooterstatic">{commentListTotal}条数据</span>
pageSize={commentParams.perPage} <Pagination
total={Number(commentListTotal)} pageSize={commentParams.perPage}
onChange={this.changePage} total={Number(commentListTotal)}
/> onChange={this.changePage}
</div> />
</div>
)} )}
/> />
<ReplyModal <ReplyModal
......
...@@ -283,11 +283,19 @@ class CourseDetailForm extends React.Component { ...@@ -283,11 +283,19 @@ class CourseDetailForm extends React.Component {
const formItemModalLineLayout = { const formItemModalLineLayout = {
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 1 }, sm: { span: 3 },
md: { span: 2 },
lg: { span: 2 },
xl: { span: 2 },
xxl: { span: 1 },
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 23 }, sm: { span: 21 },
md: { span: 22 },
lg: { span: 22 },
xl: { span: 22 },
xxl: { span: 23 },
}, },
}; };
const { textLength } = this.state; const { textLength } = this.state;
...@@ -308,23 +316,28 @@ class CourseDetailForm extends React.Component { ...@@ -308,23 +316,28 @@ class CourseDetailForm extends React.Component {
</div> </div>
</div> : </div> :
<div className={pageStyle.photoWrap}> <div className={pageStyle.photoWrap}>
<div className={pageStyle.material} onClick={this.chooseMaterial}> <div className={pageStyle.defaultImgBox}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" /> <img className={pageStyle.defaultImg} src={`${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />
<div className={pageStyle.tip}>从素材库选择</div> <div className={pageStyle.chooseType}>
</div> <div className={pageStyle.material} onClick={this.chooseMaterial}>
<div className={pageStyle.material}> <img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" /> <div className={pageStyle.tip}>从素材库选择</div>
<div className={pageStyle.tip}>上传图片</div> </div>
<input <div className={pageStyle.material}>
type="file" <img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
className={pageStyle.uploadInput} <div className={pageStyle.tip}>上传图片</div>
accept="image/png, image/jpeg" <input
onChange={(e) => { this.uploadCover(e); }} type="file"
/> className={pageStyle.uploadInput}
accept="image/png, image/jpeg"
onChange={(e) => { this.uploadCover(e); }}
/>
</div>
</div>
</div> </div>
</div> </div>
} }
<span className="ant-form-text">图片建议格式位JPG/PNG,尺寸140*140,图片大小不超过10MB</span> <span className="ant-form-text">图片建议格式位JPG/PNG,尺寸260*140,图片大小不超过10MB</span>
</FormItem> </FormItem>
<FormItem {...formItemModalLineLayout} label="标题"> <FormItem {...formItemModalLineLayout} label="标题">
{getFieldDecorator('title', { {getFieldDecorator('title', {
...@@ -354,7 +367,7 @@ class CourseDetailForm extends React.Component { ...@@ -354,7 +367,7 @@ class CourseDetailForm extends React.Component {
pattern: new RegExp(/^[1-9]\d*$/, 'g'), pattern: new RegExp(/^[1-9]\d*$/, 'g'),
}, },
], ],
})(<InputNumber max={999999} style={{ width: 520, marginRight: 30 }} placeholder="请输入学习人数" />)} })(<InputNumber min={0} max={999999} style={{ width: 520, marginRight: 30 }} placeholder="请输入学习人数" />)}
<span className="ant-form-text">设置学习人数基数,让学员更有东西学习喔</span> <span className="ant-form-text">设置学习人数基数,让学员更有东西学习喔</span>
</FormItem> </FormItem>
<FormItem {...formItemModalLineLayout} label="课程类型"> <FormItem {...formItemModalLineLayout} label="课程类型">
......
...@@ -10,26 +10,60 @@ ...@@ -10,26 +10,60 @@
} }
} }
} }
.photoWrap { .photoWrap {
display: inline-flex; display: inline-flex;
width: 320px; width: 320px;
height: 140px;
position: relative;
.defaultImgBox {
width: 260px;
height: 140px;
cursor: pointer;
.chooseType {
position: absolute;
width: 100%;
height: 100%;
bottom: -140px;
left: 0;
background-color: #fff;
transition: bottom 0.2s;
opacity: 0;
display: flex;
align-items: center;
justify-content: space-between;
z-index: -1;
}
.defaultImg {
width: 260px;
height: 140px;
}
}
.defaultImgBox:hover .chooseType {
bottom: 0;
opacity: 1;
z-index: 0;
}
.photoCover { .photoCover {
width: 140px; width: 260px;
height: 140px; height: 140px;
position: relative; position: relative;
&>img { &>img {
width: 140px; width: 260px;
height: 140px; height: 140px;
border-radius: 6px; border-radius: 6px;
} }
.coverDelete { .coverDelete {
font-size: 22px; font-size: 22px;
color: #fa4f53; color: #d5d5d5;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: -40px; right: -40px;
top: 0; top: 0;
} }
.coverDelete:hover {
color: #fa4f53;
}
} }
.material { .material {
width: 140px; width: 140px;
...@@ -104,9 +138,12 @@ ...@@ -104,9 +138,12 @@
top: 3px; top: 3px;
right: 0; right: 0;
font-size: 22px; font-size: 22px;
color: #fa4f53; color: #d5d5d5;
cursor: pointer; cursor: pointer;
} }
.audioDelete:hover {
color: #fa4f53;
}
.voiceUpload { .voiceUpload {
position: absolute; position: absolute;
width: 100%; width: 100%;
......
...@@ -81,12 +81,12 @@ ...@@ -81,12 +81,12 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 26px; width: 30px;
height: 22px; height: 30px;
margin-right: 19px; margin-right: 19px;
.staticIcon { .staticIcon {
width: 26px; width: 30px;
height: 22px; height: 30px;
display: block; display: block;
} }
} }
......
...@@ -161,7 +161,9 @@ class ClassMgtForm extends React.Component { ...@@ -161,7 +161,9 @@ class ClassMgtForm extends React.Component {
<Card bodyStyle={{ padding: 20, minHeight: 172 }}> <Card bodyStyle={{ padding: 20, minHeight: 172 }}>
<Card.Meta <Card.Meta
style={{ padding: 0 }} style={{ padding: 0 }}
avatar={<img className={pageStyle.itemImg} alt="图片" src={imagify(item.cover)} />} avatar={
item.cover ? <img className={pageStyle.itemImg} alt="图片" src={imagify(item.cover)} /> :
<img className={pageStyle.itemImg} src={`${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />}
title={ title={
<div className={pageStyle.itemTitleWrap}> <div className={pageStyle.itemTitleWrap}>
<div className={pageStyle.itemTitle}>{item.title}</div> <div className={pageStyle.itemTitle}>{item.title}</div>
......
...@@ -49,10 +49,13 @@ ...@@ -49,10 +49,13 @@
.deleteIcon { .deleteIcon {
position: absolute; position: absolute;
right: 0; right: 0;
color: red; color: #d5d5d5;
top: 0; top: 0;
cursor: pointer; cursor: pointer;
} }
.deleteIcon:hover {
color: #fa4f53;
}
} }
.itemTime { .itemTime {
font-size:14px; font-size:14px;
......
...@@ -183,7 +183,7 @@ class singleDetailForm extends React.Component { ...@@ -183,7 +183,7 @@ class singleDetailForm extends React.Component {
<div className={pageStyle.tip}>{addCourseObj.status === 1 ? '已发布' : '未发布'}</div> 创建于:{addCourseObj.created_at} <div className={pageStyle.tip}>{addCourseObj.status === 1 ? '已发布' : '未发布'}</div> 创建于:{addCourseObj.created_at}
</div> </div>
</div> </div>
<Tabs className={pageStyle.tabs} defaultActiveKey="1" onChange={this.callback}> <Tabs className={pageStyle.tabs} defaultActiveKey="1" onChange={this.callback} animated={false}>
<TabPane tab="课程详情" key="1"> <TabPane tab="课程详情" key="1">
<CourseDetail /> <CourseDetail />
</TabPane> </TabPane>
......
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