Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
3c3737d4
Commit
3c3737d4
authored
Nov 26, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
e89891cd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
121 additions
and
38 deletions
+121
-38
index.html
index.html
+1
-1
coursegatherdetail.js
src/models/coursegatherdetail.js
+31
-20
CourseDetail.js
src/pages/coursegather/detail/CourseDetail.js
+8
-6
index.js
src/pages/coursegather/detail/index.js
+44
-1
ChangePsdModal.js
src/pages/onlineclasses/ChangePsdModal.js
+4
-5
CourseDetail.js
src/pages/onlineclasses/singleclass/CourseDetail.js
+3
-3
singleDetail.js
src/pages/onlineclasses/singleclass/singleDetail.js
+30
-2
No files found.
index.html
View file @
3c3737d4
...
...
@@ -17,6 +17,6 @@
</head>
<body>
<div
id=
"root"
></div>
<script
src=
"dist/main.js?157475
3959867
"
charset=
"utf-8"
></script>
<script
src=
"dist/main.js?157475
7759016
"
charset=
"utf-8"
></script>
</body>
</html>
\ No newline at end of file
src/models/coursegatherdetail.js
View file @
3c3737d4
...
...
@@ -70,6 +70,8 @@ export default {
study_count
:
''
,
status
:
''
,
content
:
''
,
is_encrypt
:
1
,
password
:
''
,
},
editLoading
:
false
,
materialVisible
:
false
,
...
...
@@ -349,6 +351,8 @@ export default {
cover
:
data
.
cover
,
audio
:
data
.
audio
,
content
:
data
.
content
,
is_encrypt
:
data
.
is_encrypt
,
password
:
data
.
password
,
},
},
});
...
...
@@ -932,6 +936,7 @@ export default {
if
(
file
&&
(
REGEXP_VIDEO
.
test
(
file
.
type
)
||
file
.
type
===
''
))
{
const
uploadSignature
=
yield
call
(
uploader
.
uploadVideoSignature
,
params
);
signature
=
uploadSignature
.
data
;
console
.
log
(
'dadasdad'
);
yield
put
({
type
:
'uploadvideo'
,
payload
:
{
...
...
@@ -1124,7 +1129,7 @@ export default {
},
*
editCourse
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
{
editLoading
,
addCourseObj
}
=
yield
select
(
state
=>
state
.
coursegatherdetail
);
const
{
editLoading
,
addCourseObj
,
id
}
=
yield
select
(
state
=>
state
.
coursegatherdetail
);
if
(
editLoading
)
{
return
;
}
...
...
@@ -1168,28 +1173,34 @@ export default {
callBack
();
}
yield
put
({
type
:
'
updateState
'
,
type
:
'
getGatherDetail
'
,
payload
:
{
addCourseObj
:
{
title
:
''
,
start_time
:
''
,
charge_type
:
''
,
created_at
:
''
,
cover
:
''
,
type
:
''
,
audio
:
''
,
intro
:
[
{
type
:
'text'
,
value
:
''
},
],
remark
:
''
,
study_count
:
''
,
status
:
''
,
content
:
''
,
},
id
,
},
});
yield
delay
(
50
);
yield
put
(
routerRedux
.
push
(
'/sjd/coursegather'
));
// 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/coursegather'));
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
...
...
src/pages/coursegather/detail/CourseDetail.js
View file @
3c3737d4
...
...
@@ -55,13 +55,14 @@ class CourseDetailForm extends React.Component {
},
});
}
courseUploadVideo
=
(
e
)
=>
{
const
{
dispatch
}
=
this
.
props
;
courseUploadVideo
=
(
{
files
,
uploadtype
,
time
}
)
=>
{
const
{
dispatch
,
addCourseObj
}
=
this
.
props
;
dispatch
({
type
:
'coursegatherdetail/queryvideosignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'uploadVideo'
,
files
,
uploadtype
,
time
,
},
});
}
...
...
@@ -209,6 +210,7 @@ class CourseDetailForm extends React.Component {
materiaList
,
queryParams
,
materiaListTotal
,
toChangePsd
,
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
...
...
@@ -301,8 +303,8 @@ class CourseDetailForm extends React.Component {
<
span
className
=
"ant-form-text"
>
设置学习人数基数,让学员更有东西学习喔
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"课程类型"
>
<
div
className
=
{
pageStyle
.
courseType
}
>
{
addCourseObj
.
is_encrypt
==
1
?
'加密'
:
'未加密'
}
<
/div
>
<
span
className
=
"hreflink"
style
=
{{
marginLeft
:
'10px'
}}
>
修改
<
/span
>
<
div
className
=
{
pageStyle
.
courseType
}
>
{
addCourseObj
.
is_encrypt
==
1
?
`加密 密码:
${
addCourseObj
.
password
}
`
:
'未加密'
}
<
/div
>
<
span
className
=
"hreflink"
style
=
{{
marginLeft
:
'10px'
}}
onClick
=
{
toChangePsd
}
>
修改
<
/span
>
{
/* <span className={pageStyle.typeEdit}>点击修改</span> */
}
{
/* <span className="ant-form-text">有人报名则无法修改课程类型</span> */
}
<
/FormItem
>
...
...
src/pages/coursegather/detail/index.js
View file @
3c3737d4
...
...
@@ -19,17 +19,50 @@ import AddCourseModal from './AddCourseModal';
import
ManageCourse
from
'./ManageCourse'
;
import
MaterialModal
from
'../../../components/MaterialModal'
;
import
UploadCourseware
from
'../../../components/UploadCourseware'
;
import
ChangePsdModal
from
'../../onlineclasses/ChangePsdModal'
;
class
StaticCenter
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
addWareType
:
1
,
// 1是批量操作时添加 2 单课添加课程
psdChangeShow
:
false
,
};
}
componentDidMount
()
{
// 挂载
pageIn
(
'轻校-专栏详情'
);
this
.
state
=
{
addWareType
:
1
,
// 1是批量操作时添加 2 单课添加课程
psdChangeShow
:
false
,
};
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
toChangePsd
=
()
=>
{
this
.
setState
({
psdChangeShow
:
true
,
});
}
savePsd
=
(
value
,
callback
)
=>
{
const
{
dispatch
,
addCourseObj
}
=
this
.
props
;
dispatch
({
type
:
'coursegatherdetail/updateState'
,
payload
:
{
addCourseObj
:
{
...
addCourseObj
,
is_encrypt
:
value
.
is_encrypt
?
1
:
2
,
password
:
value
.
password
?
value
.
password
:
''
,
},
},
});
this
.
setState
({
psdChangeShow
:
false
,
});
if
(
callback
&&
(
typeof
callback
==
'function'
))
{
callback
();
}
}
tabShift
=
(
tab
)
=>
{
const
{
dispatch
,
gatherDetail
}
=
this
.
props
;
dispatch
({
...
...
@@ -696,6 +729,7 @@ class StaticCenter extends React.Component {
isEditSingleCourse
,
editSingleCourseInfo
,
saveSingleCourseSubmitting
,
addCourseObj
,
}
=
this
.
props
;
const
menu
=
(
<
Menu
>
...
...
@@ -769,7 +803,9 @@ class StaticCenter extends React.Component {
queryChartParams
=
{
queryChartParams
}
dateChange
=
{
this
.
dateChange
}
/>
}
{
tabIndex
==
3
&&
<
CourseDetail
/>
}
{
tabIndex
==
3
&&
<
CourseDetail
toChangePsd
=
{
this
.
toChangePsd
}
/>
}
{
tabIndex
==
4
&&
<
CommentList
/>
}
<
AddCourseModal
courseList
=
{
allCourseList
}
...
...
@@ -806,6 +842,11 @@ class StaticCenter extends React.Component {
delCourseware
=
{
this
.
delCourseware
}
chooseFromCourseMateria
=
{
this
.
chooseFromCourseMateria
}
/
>
<
ChangePsdModal
visible
=
{
this
.
state
.
psdChangeShow
}
info
=
{
addCourseObj
}
save
=
{
this
.
savePsd
}
/
>
<
/div
>
);
}
...
...
@@ -846,6 +887,7 @@ function mapStateToProps(state) {
isEditSingleCourse
,
editSingleCourseInfo
,
saveSingleCourseSubmitting
,
addCourseObj
,
}
=
state
.
coursegatherdetail
;
return
{
tabIndex
,
...
...
@@ -878,6 +920,7 @@ function mapStateToProps(state) {
isEditSingleCourse
,
editSingleCourseInfo
,
saveSingleCourseSubmitting
,
addCourseObj
,
};
}
export
default
connect
(
mapStateToProps
)(
StaticCenter
);
...
...
src/pages/onlineclasses/ChangePsdModal.js
View file @
3c3737d4
...
...
@@ -38,9 +38,8 @@ class ChangePsdModal extends React.Component {
save
({
is_encrypt
,
password
,
callBack
:
()
=>
{
form
.
resetFields
();
},
},
()
=>
{
form
.
resetFields
();
});
}
});
...
...
@@ -65,14 +64,14 @@ class ChangePsdModal extends React.Component {
};
return
(
<
Modal
visible
=
{
fals
e
}
visible
=
{
visibl
e
}
maskClosable
=
{
false
}
zIndex
=
{
110
}
width
=
{
600
}
bodyStyle
=
{{
padding
:
'40px 20px'
,
}}
title
=
"
回复
"
title
=
"
修改密码
"
closable
=
{
false
}
onCancel
=
{
this
.
close
}
okText
=
"保存"
...
...
src/pages/onlineclasses/singleclass/CourseDetail.js
View file @
3c3737d4
...
...
@@ -278,6 +278,7 @@ class CourseDetailForm extends React.Component {
materiaListTotal
,
coursewareInfo
,
info
,
toChangePsd
,
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
...
...
@@ -302,7 +303,6 @@ class CourseDetailForm extends React.Component {
const
selectBefore
=
(
<
div
>
{
title
.
length
+
textLength
}
/40</
div
>
);
console
.
log
(
addCourseObj
,
'addCourseObj'
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
Form
hideRequiredMark
className
=
{
pageStyle
.
modalform
}
labelAlign
=
"left"
onSubmit
=
{
this
.
save
}
>
...
...
@@ -371,8 +371,8 @@ class CourseDetailForm extends React.Component {
<
span
className
=
"ant-form-text"
>
设置学习人数基数,让学员更有东西学习喔
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"课程类型"
>
<
div
className
=
{
pageStyle
.
courseType
}
>
{
addCourseObj
.
is_encrypt
==
1
?
'加密'
:
'未加密'
}
<
/div
>
<
span
className
=
"hreflink"
style
=
{{
marginLeft
:
'10px'
}}
>
修改
<
/span
>
<
div
className
=
{
pageStyle
.
courseType
}
>
{
addCourseObj
.
is_encrypt
==
1
?
`加密 密码:
${
addCourseObj
.
password
}
`
:
'未加密'
}
<
/div
>
<
span
className
=
"hreflink"
style
=
{{
marginLeft
:
'10px'
}}
onClick
=
{
toChangePsd
}
>
修改
<
/span
>
{
/* <span className={pageStyle.typeEdit}>点击修改</span> */
}
{
/* <span className="ant-form-text">有人报名则无法修改课程类型</span> */
}
<
/FormItem
>
...
...
src/pages/onlineclasses/singleclass/singleDetail.js
View file @
3c3737d4
...
...
@@ -35,6 +35,7 @@ class singleDetailForm extends React.Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
psdChangeShow
:
false
,
};
}
componentDidMount
()
{
// 挂载
...
...
@@ -44,6 +45,11 @@ class singleDetailForm extends React.Component {
}
componentWillUnmount
()
{
// 卸载
}
toChangePsd
=
()
=>
{
this
.
setState
({
psdChangeShow
:
true
,
});
}
changeStatus
=
(
key
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
...
...
@@ -148,6 +154,25 @@ class singleDetailForm extends React.Component {
},
});
}
savePsd
=
(
value
,
callback
)
=>
{
const
{
dispatch
,
addCourseObj
}
=
this
.
props
;
dispatch
({
type
:
'onlineclasses/updateState'
,
payload
:
{
addCourseObj
:
{
...
addCourseObj
,
is_encrypt
:
value
.
is_encrypt
?
1
:
2
,
password
:
value
.
password
?
value
.
password
:
''
,
},
},
});
this
.
setState
({
psdChangeShow
:
false
,
});
if
(
callback
&&
(
typeof
callback
==
'function'
))
{
callback
();
}
}
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
...
...
@@ -193,7 +218,9 @@ class singleDetailForm extends React.Component {
<
/div
>
<
Tabs
className
=
{
pageStyle
.
tabs
}
defaultActiveKey
=
"1"
onChange
=
{
this
.
callback
}
animated
=
{
false
}
>
<
TabPane
tab
=
"课程详情"
key
=
"1"
>
<
CourseDetail
/>
<
CourseDetail
toChangePsd
=
{
this
.
toChangePsd
}
/
>
<
/TabPane
>
<
TabPane
tab
=
"数据分析"
key
=
"2"
>
<
StaticBox
/>
...
...
@@ -218,8 +245,9 @@ class singleDetailForm extends React.Component {
save
=
{
this
.
materialSave2
}
/
>
<
ChangePsdModal
visible
visible
=
{
this
.
state
.
psdChangeShow
}
info
=
{
addCourseObj
}
save
=
{
this
.
savePsd
}
/
>
<
/div
>
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment