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
09c6b068
Commit
09c6b068
authored
Nov 20, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111222
parent
32e94aa8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
28 deletions
+63
-28
MaterialModal.js
src/components/MaterialModal.js
+1
-0
MaterialModal.less
src/components/MaterialModal.less
+3
-0
onlineclasses.js
src/models/onlineclasses.js
+41
-15
ThemeEditor.js
src/pages/onlineclasses/ThemeEditor.js
+11
-10
CourseDetail.js
src/pages/onlineclasses/singleclass/CourseDetail.js
+2
-2
index.js
src/pages/onlineclasses/singleclass/index.js
+5
-1
No files found.
src/components/MaterialModal.js
View file @
09c6b068
...
...
@@ -77,6 +77,7 @@ class MaterialModalForm extends React.Component {
sm
:
4
,
}}
footer
=
{
list
.
length
>
0
&&
<
div
className
=
{
pageStyle
.
tablefooterbox
}
>
<
Pagination
total
=
{
Number
(
total
)}
...
...
src/components/MaterialModal.less
View file @
09c6b068
...
...
@@ -4,6 +4,9 @@
border-bottom: none;
}
}
.list {
text-align: center;
}
.item {
width: 150px;
height: 150px;
...
...
src/models/onlineclasses.js
View file @
09c6b068
...
...
@@ -27,9 +27,13 @@ export default {
cover
:
''
,
type
:
''
,
audio
:
''
,
content
:
[
intro
:
[
{
type
:
'text'
,
value
:
''
},
],
remark
:
''
,
study_count
:
''
,
status
:
''
,
content
:
''
,
},
addLoading
:
false
,
},
...
...
@@ -90,12 +94,13 @@ export default {
charge_type
:
data
.
data
.
charge_type
,
created_at
:
data
.
data
.
created_at
,
type
:
data
.
data
.
type
,
content
:
data
.
data
.
content
?
JSON
.
parse
(
data
.
data
.
content
)
:
addCourseObj
.
content
,
intro
:
data
.
data
.
intro
&&
data
.
data
.
intro
!=
null
?
JSON
.
parse
(
data
.
data
.
intro
)
:
addCourseObj
.
intro
,
remark
:
data
.
data
.
remark
,
study_count
:
data
.
data
.
study_count
,
status
:
data
.
data
.
status
,
cover
:
data
.
data
.
cover
,
audio
:
data
.
data
.
audio
,
content
:
data
.
data
.
content
,
},
},
});
...
...
@@ -183,7 +188,7 @@ export default {
study_count
,
callBack
,
}
=
payload
;
addCourseObj
.
content
=
JSON
.
stringify
(
addCourseObj
.
content
);
addCourseObj
.
intro
=
JSON
.
stringify
(
addCourseObj
.
intro
);
const
newCourseObj
=
{
...
addCourseObj
};
console
.
log
(
addCourseObj
,
'addCourseObj1111111111111111111'
);
const
loadmessage
=
message
.
loading
(
'保存中...'
,
0
);
...
...
@@ -193,6 +198,9 @@ export default {
start_time
,
study_count
,
school_id
:
sid
,
content
:
JSON
.
stringify
([
{
type
:
'mp4'
,
value
:
'clock_video-test/member/12351/2019-11-20/fa939b56ae68b1b0e35734a29284778f'
},
]),
});
const
data
=
yield
call
(
onlineAjax
.
editCourse
,
newParams
);
yield
put
({
...
...
@@ -215,9 +223,16 @@ export default {
start_time
:
''
,
charge_type
:
''
,
created_at
:
''
,
content
:
[
cover
:
''
,
type
:
''
,
audio
:
''
,
intro
:
[
{
type
:
'text'
,
value
:
''
},
],
remark
:
''
,
study_count
:
''
,
status
:
''
,
content
:
''
,
},
},
});
...
...
@@ -331,7 +346,7 @@ export default {
const
uploadImg
=
yield
call
(
uploader
.
uploadImg
,
params
);
const
imageUrl
=
filename
;
if
(
uploadtype
==
'uploadImg'
)
{
addCourseObj
.
content
.
push
({
addCourseObj
.
intro
.
push
({
type
:
'img'
,
value
:
imageUrl
,
});
...
...
@@ -394,7 +409,7 @@ export default {
const
uploadImg
=
yield
call
(
uploader
.
uploadVideo
,
params
);
const
videoUrl
=
filename
;
if
(
uploadtype
==
'uploadVideo'
)
{
addCourseObj
.
content
.
push
({
addCourseObj
.
intro
.
push
({
type
:
'video'
,
value
:
videoUrl
,
});
...
...
@@ -464,13 +479,24 @@ export default {
addCourseObj
:
{
...
addCourseObj
},
},
});
}
else
if
(
uploadtype
==
'uploadDescAudio'
)
{
addCourseObj
.
intro
.
push
({
type
:
'audio'
,
value
:
audioUrl
,
});
yield
put
({
type
:
'updateState'
,
payload
:
{
addCourseObj
:
{
...
addCourseObj
},
},
});
}
setTimeout
(
uploaderLoading
);
},
*
courseChangeSize
({
payload
},
{
call
,
put
,
select
})
{
const
{
textValue
,
index
}
=
payload
;
const
{
addCourseObj
}
=
yield
select
(
state
=>
state
.
onlineclasses
);
addCourseObj
.
content
[
index
]
=
{
addCourseObj
.
intro
[
index
]
=
{
type
:
'text'
,
value
:
textValue
,
};
...
...
@@ -484,7 +510,7 @@ export default {
*
deleteCourseImg
({
payload
},
{
call
,
put
,
select
})
{
const
{
index
}
=
payload
;
const
{
addCourseObj
}
=
yield
select
(
state
=>
state
.
onlineclasses
);
const
newContent
=
addCourseObj
.
content
;
const
newContent
=
addCourseObj
.
intro
;
newContent
.
splice
(
index
,
1
);
yield
put
({
type
:
'updateState'
,
...
...
@@ -529,16 +555,16 @@ export default {
const
{
index
,
direction
}
=
payload
;
const
{
addCourseObj
}
=
yield
select
(
state
=>
state
.
onlineclasses
);
let
newContent
=
[];
newContent
=
addCourseObj
.
content
;
const
currentImg
=
addCourseObj
.
content
[
index
];
const
preImg
=
addCourseObj
.
content
[
index
-
1
];
const
afterImg
=
addCourseObj
.
content
[
index
+
1
];
newContent
=
addCourseObj
.
intro
;
const
currentImg
=
addCourseObj
.
intro
[
index
];
const
preImg
=
addCourseObj
.
intro
[
index
-
1
];
const
afterImg
=
addCourseObj
.
intro
[
index
+
1
];
if
(
direction
==
'up'
)
{
newContent
.
splice
(
index
-
1
,
2
,
currentImg
,
preImg
);
}
else
if
(
direction
==
'down'
)
{
newContent
.
splice
(
index
,
2
,
afterImg
,
currentImg
);
}
addCourseObj
.
content
=
newContent
;
addCourseObj
.
intro
=
newContent
;
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
@@ -549,7 +575,7 @@ export default {
*
courseAddText
({
payload
},
{
call
,
put
,
select
})
{
const
{
textValue
}
=
payload
;
const
{
addCourseObj
}
=
yield
select
(
state
=>
state
.
onlineclasses
);
addCourseObj
.
content
.
push
({
addCourseObj
.
intro
.
push
({
type
:
'text'
,
value
:
''
,
});
...
...
@@ -578,7 +604,7 @@ export default {
cover
:
''
,
type
:
''
,
audio
:
''
,
content
:
[
intro
:
[
{
type
:
'text'
,
value
:
''
},
],
},
...
...
src/pages/onlineclasses/ThemeEditor.js
View file @
09c6b068
...
...
@@ -44,11 +44,12 @@ class ThemeEditor extends React.Component {
moveContent
,
editorUploadVideo
,
}
=
this
.
props
;
console
.
log
(
commentParams
,
'commentParams1111111111111'
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
editorwrap
}
>
{
/* eslint-disable-next-line array-callback-return,consistent-return */
}
{
commentParams
.
content
.
map
((
item
,
index
)
=>
{
{
commentParams
.
intro
.
map
((
item
,
index
)
=>
{
// eslint-disable-next-line default-case
switch
(
item
.
type
)
{
case
'text'
:
...
...
@@ -59,8 +60,8 @@ class ThemeEditor extends React.Component {
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
...
...
@@ -76,8 +77,8 @@ class ThemeEditor extends React.Component {
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
...
...
@@ -90,8 +91,8 @@ class ThemeEditor extends React.Component {
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
...
...
@@ -99,12 +100,12 @@ class ThemeEditor extends React.Component {
case
'audio'
:
return
(
<
div
key
=
{
index
}
className
=
{
pageStyle
.
videowrap
}
>
<
audio
controls
=
"controls"
className
=
{
pageStyle
.
videoPoster
}
src
=
{
imagify
(
item
.
value
)}
/
>
<
audio
style
=
{{
height
:
90
}}
controls
=
"controls"
className
=
{
pageStyle
.
videoPoster
}
src
=
{
imagify
(
item
.
value
)}
/
>
<
div
className
=
{
pageStyle
.
toolList
}
>
{
index
===
0
&&
<
div
aria
-
disabled
=
"true"
className
=
{
pageStyle
.
noup
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
>
0
&&
<
div
className
=
{
pageStyle
.
up
}
onClick
=
{()
=>
moveContent
(
index
,
'up'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
content
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
===
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
nodown
}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
{
index
<
(
commentParams
.
intro
.
length
-
1
)
&&
<
div
className
=
{
pageStyle
.
down
}
onClick
=
{()
=>
moveContent
(
index
,
'down'
)}
><
img
src
=
{
upImg
}
alt
=
""
/>
<
/div>
}
<
div
className
=
{
pageStyle
.
delete
}
onClick
=
{()
=>
deleteThemeImg
(
index
)}
><
Icon
type
=
"delete"
theme
=
"filled"
/><
/div
>
<
/div
>
<
/div
>
...
...
src/pages/onlineclasses/singleclass/CourseDetail.js
View file @
09c6b068
...
...
@@ -63,7 +63,7 @@ class CourseDetailForm extends React.Component {
type
:
'onlineclasses/queryvideosignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'upload
audi
o'
,
uploadtype
:
'upload
Vide
o'
,
},
});
}
...
...
@@ -115,7 +115,7 @@ class CourseDetailForm extends React.Component {
type
:
'onlineclasses/queryvoiceignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'upload
Img
'
,
uploadtype
:
'upload
DescAudio
'
,
},
});
}
...
...
src/pages/onlineclasses/singleclass/index.js
View file @
09c6b068
...
...
@@ -50,9 +50,13 @@ class ClassMgtForm extends React.Component {
cover
:
''
,
type
:
''
,
audio
:
''
,
content
:
[
intro
:
[
{
type
:
'text'
,
value
:
''
},
],
remark
:
''
,
study_count
:
''
,
status
:
''
,
content
:
''
,
},
},
});
...
...
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