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 @@
}
.list {
text-align: center;
:global {
.ant-radio-group {
width: 100%;
}
}
}
.tablefooterbox {
text-align: right;
......
......@@ -465,28 +465,34 @@ export default {
callBack();
}
yield put({
type: 'updateState',
type: 'findCourse',
payload: {
addCourseObj: {
title: '',
start_time: '',
charge_type: '',
created_at: '',
cover: '',
type: '',
audio: '',
intro: [
{ type: 'text', value: '' },
],
remark: '',
study_count: '',
status: '',
content: '',
},
id: data.data.id,
},
});
yield delay(50);
yield put(routerRedux.push('/sjd/singleclass'));
// yield put({
// 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 {
yield put({
type: 'webapp/errorrequestresolve',
......
......@@ -152,6 +152,14 @@ class CommentListForm extends React.Component {
staticChartId: gatherDetail.id,
},
});
dispatch({
type: 'coursegatherdetail/searchCourseReply',
payload: {
params: {
source_id: gatherDetail.id,
},
},
});
}
render() {
const {
......
......@@ -212,11 +212,19 @@ class CourseDetailForm extends React.Component {
const formItemModalLineLayout = {
labelCol: {
xs: { span: 24 },
sm: { span: 1 },
sm: { span: 3 },
md: { span: 2 },
lg: { span: 2 },
xl: { span: 2 },
xxl: { span: 1 },
},
wrapperCol: {
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;
......@@ -237,23 +245,28 @@ class CourseDetailForm extends React.Component {
</div>
</div> :
<div className={pageStyle.photoWrap}>
<div className={pageStyle.material} onClick={this.chooseMaterial}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<div className={pageStyle.tip}>从素材库选择</div>
</div>
<div className={pageStyle.material}>
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
<div className={pageStyle.tip}>上传图片</div>
<input
type="file"
className={pageStyle.uploadInput}
accept="image/png, image/jpeg"
onChange={(e) => { this.uploadCover(e); }}
/>
<div className={pageStyle.defaultImgBox}>
<img className={pageStyle.defaultImg} src={`${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />
<div className={pageStyle.chooseType}>
<div className={pageStyle.material} onClick={this.chooseMaterial}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<div className={pageStyle.tip}>从素材库选择</div>
</div>
<div className={pageStyle.material}>
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
<div className={pageStyle.tip}>上传图片</div>
<input
type="file"
className={pageStyle.uploadInput}
accept="image/png, image/jpeg"
onChange={(e) => { this.uploadCover(e); }}
/>
</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 {...formItemModalLineLayout} label="标题">
{getFieldDecorator('title', {
......
......@@ -12,23 +12,56 @@
.photoWrap {
display: inline-flex;
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 {
width: 140px;
width: 260px;
height: 140px;
position: relative;
&>img {
width: 140px;
width: 260px;
height: 140px;
border-radius: 6px;
}
.coverDelete {
font-size: 22px;
color: #fa4f53;
color: #d5d5d5;
cursor: pointer;
position: absolute;
right: -40px;
top: 0;
}
.coverDelete:hover {
color: #fa4f53;
}
}
.material {
width: 140px;
......@@ -103,9 +136,12 @@
top: 3px;
right: 0;
font-size: 22px;
color: #fa4f53;
color: #d5d5d5;
cursor: pointer;
}
.audioDelete:hover {
color: #fa4f53;
}
.voiceUpload {
position: absolute;
width: 100%;
......
......@@ -78,12 +78,12 @@
display: flex;
align-items: center;
justify-content: center;
width: 26px;
height: 22px;
width: 30px;
height: 30px;
margin-right: 19px;
.staticIcon {
width: 26px;
height: 22px;
width: 30px;
height: 30px;
display: block;
}
}
......@@ -109,4 +109,4 @@
}
}
}
}
\ No newline at end of file
}
......@@ -61,6 +61,14 @@ class StaticCenter extends React.Component {
tabIndex: tab,
},
});
dispatch({
type: 'coursegatherdetail/searchCourseReply',
payload: {
params: {
source_id: gatherDetail.id,
},
},
});
}
}
toAddCourse = () => {
......
......@@ -9,7 +9,10 @@ const MediaCard = (props) => {
} = props;
return (
<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.topbox}>
<div className={pageStyle.title}>{info.title}</div>
......
......@@ -40,6 +40,16 @@ class AddCourseModalForm extends React.Component {
componentWillUnmount() { // 卸载
}
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({
isActive: key,
});
......@@ -84,7 +94,9 @@ class AddCourseModalForm extends React.Component {
});
}
close = () => {
const { form } = this.props;
const { close } = this.props;
form.resetFields();
close();
}
render() {
......@@ -171,7 +183,7 @@ class AddCourseModalForm extends React.Component {
<div>
<FormItem>
{getFieldDecorator('is_encrypt', {
initialValue: 'Unchecked',
valuePropName: 'Unchecked',
})(<Checkbox><span className={pageStyle.tip}>设置密码</span></Checkbox>)}
</FormItem>
{
......@@ -188,8 +200,8 @@ class AddCourseModalForm extends React.Component {
],
})(
<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 className={pageStyle.firstItem} {...formItemModalLineLayout}> */}
......@@ -227,7 +239,7 @@ class AddCourseModalForm extends React.Component {
{/* } */}
</div>
<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>
</div>
</div>
......
......@@ -193,14 +193,15 @@ class CommentListForm extends React.Component {
columns={columns}
pagination={false}
footer={() => (
<div className="tablefooterbox">
<span className="tablefooterstatic">{commentListTotal}条数据</span>
<Pagination
pageSize={commentParams.perPage}
total={Number(commentListTotal)}
onChange={this.changePage}
/>
</div>
commentList.length > 0 &&
<div className="tablefooterbox">
<span className="tablefooterstatic">{commentListTotal}条数据</span>
<Pagination
pageSize={commentParams.perPage}
total={Number(commentListTotal)}
onChange={this.changePage}
/>
</div>
)}
/>
<ReplyModal
......
......@@ -283,11 +283,19 @@ class CourseDetailForm extends React.Component {
const formItemModalLineLayout = {
labelCol: {
xs: { span: 24 },
sm: { span: 1 },
sm: { span: 3 },
md: { span: 2 },
lg: { span: 2 },
xl: { span: 2 },
xxl: { span: 1 },
},
wrapperCol: {
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;
......@@ -308,23 +316,28 @@ class CourseDetailForm extends React.Component {
</div>
</div> :
<div className={pageStyle.photoWrap}>
<div className={pageStyle.material} onClick={this.chooseMaterial}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<div className={pageStyle.tip}>从素材库选择</div>
</div>
<div className={pageStyle.material}>
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
<div className={pageStyle.tip}>上传图片</div>
<input
type="file"
className={pageStyle.uploadInput}
accept="image/png, image/jpeg"
onChange={(e) => { this.uploadCover(e); }}
/>
<div className={pageStyle.defaultImgBox}>
<img className={pageStyle.defaultImg} src={`${__IMGCDN__}/course/courseDefaultImg.png`} alt="" />
<div className={pageStyle.chooseType}>
<div className={pageStyle.material} onClick={this.chooseMaterial}>
<img src={`${__IMGCDN__}/course/check.png`} alt="从素材库选择" />
<div className={pageStyle.tip}>从素材库选择</div>
</div>
<div className={pageStyle.material}>
<img src={`${__IMGCDN__}/course/uploadImg.png`} alt="上传图片" />
<div className={pageStyle.tip}>上传图片</div>
<input
type="file"
className={pageStyle.uploadInput}
accept="image/png, image/jpeg"
onChange={(e) => { this.uploadCover(e); }}
/>
</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 {...formItemModalLineLayout} label="标题">
{getFieldDecorator('title', {
......@@ -354,7 +367,7 @@ class CourseDetailForm extends React.Component {
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>
</FormItem>
<FormItem {...formItemModalLineLayout} label="课程类型">
......
......@@ -10,26 +10,60 @@
}
}
}
.photoWrap {
display: inline-flex;
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 {
width: 140px;
width: 260px;
height: 140px;
position: relative;
&>img {
width: 140px;
width: 260px;
height: 140px;
border-radius: 6px;
}
.coverDelete {
font-size: 22px;
color: #fa4f53;
color: #d5d5d5;
cursor: pointer;
position: absolute;
right: -40px;
top: 0;
}
.coverDelete:hover {
color: #fa4f53;
}
}
.material {
width: 140px;
......@@ -104,9 +138,12 @@
top: 3px;
right: 0;
font-size: 22px;
color: #fa4f53;
color: #d5d5d5;
cursor: pointer;
}
.audioDelete:hover {
color: #fa4f53;
}
.voiceUpload {
position: absolute;
width: 100%;
......
......@@ -81,12 +81,12 @@
display: flex;
align-items: center;
justify-content: center;
width: 26px;
height: 22px;
width: 30px;
height: 30px;
margin-right: 19px;
.staticIcon {
width: 26px;
height: 22px;
width: 30px;
height: 30px;
display: block;
}
}
......
......@@ -161,7 +161,9 @@ class ClassMgtForm extends React.Component {
<Card bodyStyle={{ padding: 20, minHeight: 172 }}>
<Card.Meta
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={
<div className={pageStyle.itemTitleWrap}>
<div className={pageStyle.itemTitle}>{item.title}</div>
......
......@@ -49,10 +49,13 @@
.deleteIcon {
position: absolute;
right: 0;
color: red;
color: #d5d5d5;
top: 0;
cursor: pointer;
}
.deleteIcon:hover {
color: #fa4f53;
}
}
.itemTime {
font-size:14px;
......
......@@ -183,7 +183,7 @@ class singleDetailForm extends React.Component {
<div className={pageStyle.tip}>{addCourseObj.status === 1 ? '已发布' : '未发布'}</div> 创建于:{addCourseObj.created_at}
</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">
<CourseDetail />
</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