Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
a4f5d121
Commit
a4f5d121
authored
Jul 15, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
fix:解决合并代码的冲突
parents
da9c44e2
b998aab6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
133 additions
and
44 deletions
+133
-44
src/bu-components/PreviewFileModal.less
+1
-0
src/common/constants/academic/lessonEnum.js
+6
-2
src/data-source/base/request-apis.ts
+4
-1
src/domains/basic-domain/baseService.ts
+6
-2
src/domains/resource-disk/constants.ts
+6
-2
src/modules/course-manage/components/AddLiveBasic.jsx
+1
-1
src/modules/course-manage/modal/PreviewCourseModal.jsx
+2
-7
src/modules/course-manage/modal/ShareLiveModal.jsx
+1
-1
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
+2
-2
src/modules/course-manage/video-course/AddVideoCourse.jsx
+0
-0
src/modules/course-manage/video-course/VideoCourseDetail.tsx
+79
-10
src/modules/course-manage/video-course/components/ChapterList.jsx
+2
-0
src/modules/course-manage/video-course/components/LearningDetailModal.jsx
+2
-5
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+1
-1
src/modules/knowledge-base/components/KnowledgeBaseList.jsx
+2
-2
src/modules/knowledge-base/modal/AddCourse.jsx
+1
-1
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
+5
-4
src/modules/plan-manage/modal/UserLearnDetailModal.less
+6
-0
src/modules/plan-manage/modal/relatedCourseModal.jsx
+1
-1
src/modules/prepare-lesson/modal/SelectPrepareFileModal.jsx
+4
-1
src/modules/resource-disk/modal/ScanFileModal.jsx
+1
-1
No files found.
src/bu-components/PreviewFileModal.less
View file @
a4f5d121
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
}
}
}
}
.operate{
.operate{
display:inline-block;
margin-top:24px;
margin-top:24px;
.btn {
.btn {
padding:5px 12px;
padding:5px 12px;
...
...
src/common/constants/academic/lessonEnum.js
View file @
a4f5d121
...
@@ -44,6 +44,10 @@ const FileVerifyMap = {
...
@@ -44,6 +44,10 @@ const FileVerifyMap = {
type
:
"word"
,
type
:
"word"
,
maxSize
:
100
maxSize
:
100
},
},
"application/wps-writer"
:
{
type
:
"word"
,
maxSize
:
100
,
},
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
:
{
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
:
{
type
:
"word"
,
type
:
"word"
,
maxSize
:
100
maxSize
:
100
...
@@ -133,13 +137,13 @@ const FileTypeIcon = {
...
@@ -133,13 +137,13 @@ const FileTypeIcon = {
PPTX
:
"https://image.xiaomaiketang.com/xm/847pFAdYGW.png"
,
PPTX
:
"https://image.xiaomaiketang.com/xm/847pFAdYGW.png"
,
PDF
:
"https://image.xiaomaiketang.com/xm/rrEJMNkhTG.png"
,
PDF
:
"https://image.xiaomaiketang.com/xm/rrEJMNkhTG.png"
,
MP3
:
"https://image.xiaomaiketang.com/xm/ykjnSWDyQ6.png"
,
MP3
:
"https://image.xiaomaiketang.com/xm/ykjnSWDyQ6.png"
,
MP4
:
"https://image.xiaomaiketang.com/xm/
TKwbQGYDBR
.png"
,
MP4
:
"https://image.xiaomaiketang.com/xm/
yK3ASiS8ch
.png"
,
JPG
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
JPG
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
JPEG
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
JPEG
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
PNG
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
PNG
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
GIF
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
GIF
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
BMP
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
BMP
:
"https://image.xiaomaiketang.com/xm/XRkX8JBTPs.png"
,
VIDEO
:
"https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png"
VIDEO
:
'https://image.xiaomaiketang.com/xm/yK3ASiS8ch.png'
};
};
const
UploadIcon
=
"https://image.xiaomaiketang.com/xm/4DXNrZWWsd.png"
;
const
UploadIcon
=
"https://image.xiaomaiketang.com/xm/4DXNrZWWsd.png"
;
...
...
src/data-source/base/request-apis.ts
View file @
a4f5d121
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-12-01 17:21:21
* @Date: 2020-12-01 17:21:21
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-0
6-22 14:56:34
* @LastEditTime: 2021-0
7-09 15:33:33
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -62,6 +62,9 @@ export function saveYoZoFileVersionId(params: object) {
...
@@ -62,6 +62,9 @@ export function saveYoZoFileVersionId(params: object) {
export
function
yoZoUpload
(
ossUrl
:
String
,
appId
:
String
,
uploadSign
:
String
){
export
function
yoZoUpload
(
ossUrl
:
String
,
appId
:
String
,
uploadSign
:
String
){
return
axios
.
post
(
`https://dmc.yozocloud.cn/api/file/http?fileUrl=
${
ossUrl
}
&appId=
${
appId
}
&sign=
${
uploadSign
}
`
)
return
axios
.
post
(
`https://dmc.yozocloud.cn/api/file/http?fileUrl=
${
ossUrl
}
&appId=
${
appId
}
&sign=
${
uploadSign
}
`
)
}
}
export
function
saveFileVersionIdByCourseChapter
(
params
:
object
)
{
return
Service
.
Hades
(
'public/hades/saveFileVersionIdByCourseChapter'
,
params
);
}
export
const
getOssClient
=
(
export
const
getOssClient
=
(
data
:
object
,
data
:
object
,
instId
:
string
,
instId
:
string
,
...
...
src/domains/basic-domain/baseService.ts
View file @
a4f5d121
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-12-01 17:20:49
* @Date: 2020-12-01 17:20:49
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-0
6-22 14:57:01
* @LastEditTime: 2021-0
7-09 15:33:59
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
{
getUserStore
,
getUserPermission
,
logout
,
getStoreUser
,
sendBizAuthCode
,
editUserPhone
,
checkBizAuthCode
,
sendNewPhoneAuthCode
,
sendLoginAuthCode
,
login
,
getLastedVersion
,
getEnterpriseUser
,
getWXWorkLoginNoCheck
,
getLesseeVersionMsg
,
getYoZoSign
,
saveYoZoFileVersionId
,
yoZoUpload
}
from
'@/data-source/base/request-apis'
;
import
{
getUserStore
,
getUserPermission
,
logout
,
getStoreUser
,
sendBizAuthCode
,
editUserPhone
,
checkBizAuthCode
,
sendNewPhoneAuthCode
,
sendLoginAuthCode
,
login
,
getLastedVersion
,
getEnterpriseUser
,
getWXWorkLoginNoCheck
,
getLesseeVersionMsg
,
getYoZoSign
,
saveYoZoFileVersionId
,
yoZoUpload
,
saveFileVersionIdByCourseChapter
}
from
'@/data-source/base/request-apis'
;
export
default
class
StoreService
{
export
default
class
StoreService
{
// 获取员工列表
// 获取员工列表
...
@@ -73,4 +73,7 @@ export default class StoreService {
...
@@ -73,4 +73,7 @@ export default class StoreService {
static
yoZoUpload
(
ossUrl
:
String
,
appId
:
String
,
uploadSign
:
String
){
static
yoZoUpload
(
ossUrl
:
String
,
appId
:
String
,
uploadSign
:
String
){
return
yoZoUpload
(
ossUrl
,
appId
,
uploadSign
);
return
yoZoUpload
(
ossUrl
,
appId
,
uploadSign
);
}
}
static
saveFileVersionIdByCourseChapter
(
params
:
any
){
return
saveFileVersionIdByCourseChapter
(
params
);
}
}
}
\ No newline at end of file
src/domains/resource-disk/constants.ts
View file @
a4f5d121
/*
/*
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @Date: 2020-08-20 09:21:40
* @LastEditors:
zhangleyuan
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
3-04 17:16:30
* @LastEditTime: 2021-0
7-15 11:48:58
* @Description:
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -77,6 +77,10 @@ const FILR_VERIFY_MAP = {
...
@@ -77,6 +77,10 @@ const FILR_VERIFY_MAP = {
type
:
"word"
,
type
:
"word"
,
maxSize
:
100
maxSize
:
100
},
},
"application/wps-writer"
:
{
type
:
"word"
,
maxSize
:
100
,
},
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
:
{
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
:
{
type
:
"word"
,
type
:
"word"
,
maxSize
:
100
maxSize
:
100
...
...
src/modules/course-manage/components/AddLiveBasic.jsx
View file @
a4f5d121
...
@@ -149,7 +149,7 @@ class AddLiveBasic extends React.Component {
...
@@ -149,7 +149,7 @@ class AddLiveBasic extends React.Component {
<
span
className=
{
`default-btn ${isDefaultCover ? 'disabled' : ''}`
}
onClick=
{
this
.
handleResetCoverUrl
}
>
<
span
className=
{
`default-btn ${isDefaultCover ? 'disabled' : ''}`
}
onClick=
{
this
.
handleResetCoverUrl
}
>
使用默认图
使用默认图
</
span
>
</
span
>
<
div
className=
'tips'
>
建议尺寸1280*720px
,图片支持jpg、jpeg、png格式
。
</
div
>
<
div
className=
'tips'
>
建议尺寸1280*720px
或16:9。封面图最大5M,支持jpg、jpeg和png
。
</
div
>
</
div
>
</
div
>
<
div
className=
'img-content'
>
<
div
className=
'img-content'
>
{
isDefaultCover
&&
<
span
className=
'tag'
>
默认图
</
span
>
}
{
isDefaultCover
&&
<
span
className=
'tag'
>
默认图
</
span
>
}
...
...
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
a4f5d121
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-07-23 14:54:16
* @Date: 2020-07-23 14:54:16
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-1
2 11:39:35
* @LastEditTime: 2021-07-1
5 14:02:37
* @Description: 大班直播课预览弹窗
* @Description: 大班直播课预览弹窗
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -166,12 +166,7 @@ class PreviewCourseModal extends React.Component {
...
@@ -166,12 +166,7 @@ class PreviewCourseModal extends React.Component {
<
div
className=
'container__header'
>
<
div
className=
'container__header'
>
<
Choose
>
<
Choose
>
<
When
condition=
{
type
===
'videoCourse'
}
>
<
When
condition=
{
type
===
'videoCourse'
}
>
<
video
<
img
src=
{
coverUrl
?
coverUrl
:
`https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png`
}
className=
'course-cover'
alt=
''
/>
controls
src=
{
courseChapterList
.
length
&&
courseChapterList
[
0
].
mediaUrl
||
scheduleVideoUrl
}
poster=
{
coverUrl
?
coverUrl
:
`https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png`
}
className=
'course-url'
/>
</
When
>
</
When
>
<
Otherwise
>
<
Otherwise
>
<
img
src=
{
coverUrl
}
className=
'course-cover'
alt=
''
/>
<
img
src=
{
coverUrl
}
className=
'course-cover'
alt=
''
/>
...
...
src/modules/course-manage/modal/ShareLiveModal.jsx
View file @
a4f5d121
...
@@ -116,7 +116,7 @@ class ShareLiveModal extends React.Component {
...
@@ -116,7 +116,7 @@ class ShareLiveModal extends React.Component {
}
}
break
;
break
;
case
'videoClass'
:
// 视频课
case
'videoClass'
:
// 视频课
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png'
;
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png'
;
break
;
break
;
case
'graphicsClass'
:
// 图文课
case
'graphicsClass'
:
// 图文课
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'
;
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'
;
...
...
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
View file @
a4f5d121
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-15 1
3:57:59
* @LastEditTime: 2021-07-15 1
4:02:45
* @Description: 线下课新增/编辑页
* @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -758,7 +758,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -758,7 +758,7 @@ class AddOfflineCourse extends React.Component {
<
span
className=
{
`default-btn ${isDefaultCover ? 'disabled' : ''}`
}
onClick=
{
this
.
handleResetCoverUrl
}
>
<
span
className=
{
`default-btn ${isDefaultCover ? 'disabled' : ''}`
}
onClick=
{
this
.
handleResetCoverUrl
}
>
使用默认图
使用默认图
</
span
>
</
span
>
<
div
className=
'tips'
>
建议尺寸1280*720px
,图片支持jpg、jpeg、png格式
。
</
div
>
<
div
className=
'tips'
>
建议尺寸1280*720px
或16:9。封面图最大5M,支持jpg、jpeg和png
。
</
div
>
</
div
>
</
div
>
<
div
className=
'img-content'
>
<
div
className=
'img-content'
>
{
isDefaultCover
&&
<
span
className=
'tag'
>
默认图
</
span
>
}
{
isDefaultCover
&&
<
span
className=
'tag'
>
默认图
</
span
>
}
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
a4f5d121
This diff is collapsed.
Click to expand it.
src/modules/course-manage/video-course/VideoCourseDetail.tsx
View file @
a4f5d121
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-04-28 18:05:30
* @Date: 2020-04-28 18:05:30
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-
09 16:21:13
* @LastEditTime: 2021-07-
15 14:04:21
* @Description: 线上课课程课节详情
* @Description: 线上课课程课节详情
*/
*/
...
@@ -12,12 +12,15 @@ import { withRouter } from "react-router-dom";
...
@@ -12,12 +12,15 @@ import { withRouter } from "react-router-dom";
import
CourseService
from
'@/domains/course-domain/CourseService'
import
CourseService
from
'@/domains/course-domain/CourseService'
import
underscore
from
'underscore'
;
import
underscore
from
'underscore'
;
import
ScanFileModal
from
'@/modules/resource-disk/modal/ScanFileModal.jsx'
;
import
ScanFileModal
from
'@/modules/resource-disk/modal/ScanFileModal.jsx'
;
import
{
FileTypeIcon
}
from
'@/common/constants/academic/lessonEnum'
import
BaseService
from
"@/domains/basic-domain/baseService"
;
import
{
YZ_APPId
,
YZ_PREVIEW_URL
}
from
'@/domains/basic-domain/constants'
;
import
PreviewFileModal
from
'@/bu-components/PreviewFileModal'
;
import
'./VideoCourseDetail.less'
;
import
'./VideoCourseDetail.less'
;
declare
var
getParameterByName
:
any
;
declare
var
getParameterByName
:
any
;
declare
var
window
:
any
;
declare
var
window
:
any
;
const
FileTypeIconMap
:
any
=
FileTypeIcon
function
VideoCourseDetail
(){
function
VideoCourseDetail
(){
const
courseId
=
window
.
getParameterByName
(
"courseId"
);
// 课程ID
const
courseId
=
window
.
getParameterByName
(
"courseId"
);
// 课程ID
const
[
coverUrl
,
setCoverUrl
]
=
useState
(
""
);
const
[
coverUrl
,
setCoverUrl
]
=
useState
(
""
);
...
@@ -27,7 +30,11 @@ function VideoCourseDetail(){
...
@@ -27,7 +30,11 @@ function VideoCourseDetail(){
const
[
courseName
,
setCourseName
]
=
useState
(
""
);
const
[
courseName
,
setCourseName
]
=
useState
(
""
);
const
[
categoryName
,
setCategoryName
]
=
useState
(
""
);
const
[
categoryName
,
setCategoryName
]
=
useState
(
""
);
const
[
scanFileModal
,
setScanFileModal
]
=
useState
<
any
>
(
null
);
const
[
scanFileModal
,
setScanFileModal
]
=
useState
<
any
>
(
null
);
const
[
showPreviewModal
,
setShowPreviewModal
]
=
useState
(
false
);
//是否显示loading
// const [previewing,setPreviewing] = useState(false); //是否正在预览
const
[
previewStatus
,
setPreviewStatus
]
=
useState
(
'UPLOAD'
);
//预览文件的生成状态
const
[
url
,
setUrl
]
=
useState
(
''
);
let
previewing
=
false
;
useEffect
(()
=>
{
useEffect
(()
=>
{
handleFetchScheudleDetail
(
courseId
);
handleFetchScheudleDetail
(
courseId
);
},[
courseId
])
},[
courseId
])
...
@@ -73,9 +80,9 @@ function VideoCourseDetail(){
...
@@ -73,9 +80,9 @@ function VideoCourseDetail(){
setCourseChapterList
(
courseChapterVOList
);
setCourseChapterList
(
courseChapterVOList
);
})
})
}
}
async
function
handleScanFileModal
(
fileType
:
string
=
"MP4"
,
fileObj
:
any
){
function
handleScanFileModal
(
fileType
:
string
=
"MP4"
,
fileObj
:
Object
){
const
{
fileVersionId
,
name
,
mediaUrl
,
id
}
=
fileObj
;
if
(
fileType
===
"VIDEO"
){
const
scanFileModal
=
(
const
scanFileModal
=
(
<
ScanFileModal
<
ScanFileModal
fileType=
{
fileType
}
fileType=
{
fileType
}
...
@@ -86,6 +93,65 @@ function VideoCourseDetail(){
...
@@ -86,6 +93,65 @@ function VideoCourseDetail(){
/>
/>
);
);
setScanFileModal
(
scanFileModal
)
setScanFileModal
(
scanFileModal
)
}
else
{
if
(
!
fileVersionId
){
setShowPreviewModal
(
true
);
previewing
=
true
;
setPreviewStatus
(
'UPLOAD'
);
const
uploadParams
=
{
fileUrl
:
mediaUrl
,
yoZoTypeEnum
:
'UPLOAD'
}
const
uploadSign
:
any
=
await
BaseService
.
getYoZoSign
(
uploadParams
);
BaseService
.
yoZoUpload
(
mediaUrl
,
YZ_APPId
,
uploadSign
).
then
(
async
function
(
response
){
const
saveParams
=
{
fileVersionId
:
response
.
data
.
data
.
fileVersionId
,
courseChapterId
:
id
}
BaseService
.
saveFileVersionIdByCourseChapter
(
saveParams
);
if
(
previewing
){
const
previewParams
=
{
fileVersionId
:
response
.
data
.
data
.
fileVersionId
,
yoZoTypeEnum
:
'VIEW'
,
htmlTitle
:
name
}
const
previewSign
=
await
BaseService
.
getYoZoSign
(
previewParams
);
const
url
=
`
${
YZ_PREVIEW_URL
}
?fileVersionId=
${
response
.
data
.
data
.
fileVersionId
}
&appId=
${
YZ_APPId
}
&sign=
${
previewSign
}
&htmlTitle=
${
name
}
`
setPreviewStatus
(
'UPLOAD_SUCCESS'
);
setUrl
(
url
)
}
})
}
else
{
const
previewParams
=
{
fileVersionId
,
yoZoTypeEnum
:
'VIEW'
,
htmlTitle
:
name
}
const
previewSign
=
await
BaseService
.
getYoZoSign
(
previewParams
);
const
url
=
`
${
YZ_PREVIEW_URL
}
?fileVersionId=
${
fileVersionId
}
&appId=
${
YZ_APPId
}
&sign=
${
previewSign
}
&htmlTitle=
${
name
}
`
const
a
=
document
.
createElement
(
'a'
);
document
.
body
.
appendChild
(
a
);
a
.
setAttribute
(
'href'
,
url
);
a
.
setAttribute
(
'target'
,
'_blank'
);
a
.
click
();
document
.
body
.
removeChild
(
a
)
}
}
}
// function previewingSet(){
// return new Promise(async (resolve) => {
// setShowPreviewModal(true);
// setPreviewing(true);
// setPreviewStatus('UPLOAD');
// resolve(true);
// })
// }
function
cancelPreview
(){
setShowPreviewModal
(
false
);
// setPreviewing(false);
previewing
=
false
;
setPreviewStatus
(
'UPLOAD'
);
}
}
...
@@ -101,7 +167,7 @@ function VideoCourseDetail(){
...
@@ -101,7 +167,7 @@ function VideoCourseDetail(){
<
div
className=
"course-detail"
>
<
div
className=
"course-detail"
>
<
div
className=
'course-detail__img'
>
<
div
className=
'course-detail__img'
>
{
/* 如果视频和封面都没有上传的话, 那么就显示缺省, 如果上传了视频, 那么封面图就默认显示视频的第一帧, 如果上传了封面图, 那么就显示上传的封面图 */
}
{
/* 如果视频和封面都没有上传的话, 那么就显示缺省, 如果上传了视频, 那么封面图就默认显示视频的第一帧, 如果上传了封面图, 那么就显示上传的封面图 */
}
<
img
src=
{
coverUrl
||
`https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png`
}
alt=
''
/>
<
img
src=
{
coverUrl
||
`https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png`
}
alt=
''
/>
</
div
>
</
div
>
<
div
className=
"course-detail__info"
>
<
div
className=
"course-detail__info"
>
<
div
className=
"info__title"
>
{
courseName
}
</
div
>
<
div
className=
"info__title"
>
{
courseName
}
</
div
>
...
@@ -116,9 +182,9 @@ function VideoCourseDetail(){
...
@@ -116,9 +182,9 @@ function VideoCourseDetail(){
<
If
condition=
{
courseChapterList
.
length
>
0
}
>
<
If
condition=
{
courseChapterList
.
length
>
0
}
>
{
{
underscore
.
map
(
courseChapterList
,(
item
:
any
,
index
:
number
)
=>
{
underscore
.
map
(
courseChapterList
,(
item
:
any
,
index
:
number
)
=>
{
return
<
div
className=
'course-ware'
onClick=
{
()
=>
{
handleScanFileModal
(
"MP4"
,
item
)}
}
key=
{
index
}
>
return
<
div
className=
'course-ware'
onClick=
{
()
=>
{
handleScanFileModal
(
item
.
mediaType
,
item
)}
}
key=
{
index
}
>
<
div
className=
"course-ware__index"
>
{
index
<
9
?
`0${index + 1 } `
:
index
+
1
}
</
div
>
<
div
className=
"course-ware__index"
>
{
index
<
9
?
`0${index + 1 } `
:
index
+
1
}
</
div
>
<
img
className=
'course-ware__img'
src=
'https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png'
alt=
''
/>
<
img
className=
'course-ware__img'
src=
{
FileTypeIconMap
[
item
.
mediaType
]
}
alt=
''
/>
<
div
className=
'course-ware__name'
>
{
item
.
name
}
</
div
>
<
div
className=
'course-ware__name'
>
{
item
.
name
}
</
div
>
</
div
>
</
div
>
})
})
...
@@ -127,6 +193,9 @@ function VideoCourseDetail(){
...
@@ -127,6 +193,9 @@ function VideoCourseDetail(){
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
{
showPreviewModal
&&
<
PreviewFileModal
onCancel=
{
()
=>
cancelPreview
()
}
previewStatus=
{
previewStatus
}
url=
{
url
}
/>
}
{
scanFileModal
}
{
scanFileModal
}
</
div
>
</
div
>
}
}
...
...
src/modules/course-manage/video-course/components/ChapterList.jsx
View file @
a4f5d121
...
@@ -12,7 +12,9 @@ function ChapterList(props){
...
@@ -12,7 +12,9 @@ function ChapterList(props){
<
div
className=
'course-ware__index'
>
{
index
<
9
?
`0${index + 1 } `
:
`${index + 1 } `
}
</
div
>
<
div
className=
'course-ware__index'
>
{
index
<
9
?
`0${index + 1 } `
:
`${index + 1 } `
}
</
div
>
<
div
className=
"course-ware__detail"
>
<
div
className=
"course-ware__detail"
>
<
div
className=
'course-ware__detail__name'
>
{
item
.
mediaName
}
</
div
>
<
div
className=
'course-ware__detail__name'
>
{
item
.
mediaName
}
</
div
>
{
item
.
mediaType
===
'VIDEO'
&&
<
div
className=
'course-ware__detail__duration'
>
{
window
.
formatDuration
(
item
.
videoDuration
)
}
</
div
>
<
div
className=
'course-ware__detail__duration'
>
{
window
.
formatDuration
(
item
.
videoDuration
)
}
</
div
>
}
</
div
>
</
div
>
</
div
>
</
div
>
})
})
...
...
src/modules/course-manage/video-course/components/LearningDetailModal.jsx
View file @
a4f5d121
...
@@ -2,6 +2,7 @@ import User from "@/common/js/user";
...
@@ -2,6 +2,7 @@ import User from "@/common/js/user";
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
React
from
"react"
;
import
React
from
"react"
;
import
{
Modal
}
from
"antd"
;
import
{
Modal
}
from
"antd"
;
import
{
FileTypeIcon
}
from
'@/common/constants/academic/lessonEnum'
import
"./LearningDetailModal.less"
;
import
"./LearningDetailModal.less"
;
class
LearningDetailModal
extends
React
.
Component
{
class
LearningDetailModal
extends
React
.
Component
{
...
@@ -58,11 +59,7 @@ class LearningDetailModal extends React.Component {
...
@@ -58,11 +59,7 @@ class LearningDetailModal extends React.Component {
<
div
className=
"course-ware__index"
>
{
`${
<
div
className=
"course-ware__index"
>
{
`${
index < 9 ? `
0
$
{
index
+
1
}
` : index + 1
index < 9 ? `
0
$
{
index
+
1
}
` : index + 1
} `
}
</
div
>
} `
}
</
div
>
<
img
<
img
className=
'course-ware__img'
src=
{
FileTypeIcon
[
item
.
mediaType
]
}
alt=
''
/>
className=
"course-ware__img"
src=
"https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png"
alt=
""
/>
<
div
className=
"course-ware__name"
>
{
item
.
courseChapterName
&&
item
.
courseChapterName
.
replace
(
'.MP4'
,
''
)
}
</
div
>
<
div
className=
"course-ware__name"
>
{
item
.
courseChapterName
&&
item
.
courseChapterName
.
replace
(
'.MP4'
,
''
)
}
</
div
>
</
div
>
</
div
>
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
a4f5d121
...
@@ -68,7 +68,7 @@ class VideoCourseList extends React.Component {
...
@@ -68,7 +68,7 @@ class VideoCourseList extends React.Component {
<
img
<
img
className=
'course-cover'
className=
'course-cover'
src=
{
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png'
coverUrl
||
'https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png'
}
}
alt=
'封面图'
alt=
'封面图'
/>
/>
...
...
src/modules/knowledge-base/components/KnowledgeBaseList.jsx
View file @
a4f5d121
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
* @Description:
* @Description:
* @Author: zangsuyun
* @Author: zangsuyun
* @Date: 2021-03-12 14:49:40
* @Date: 2021-03-12 14:49:40
* @LastEditors:
Please set LastEditors
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
6-11 16:44:59
* @LastEditTime: 2021-0
7-15 14:07:42
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
...
src/modules/knowledge-base/modal/AddCourse.jsx
View file @
a4f5d121
...
@@ -421,7 +421,7 @@ class AddCourse extends React.Component {
...
@@ -421,7 +421,7 @@ class AddCourse extends React.Component {
coverUrl
||
coverUrl
||
(
videoCourseDivision
===
'internal'
(
videoCourseDivision
===
'internal'
?
`${mediaCourseUrl}?x-oss-process=video/snapshot,t_0,m_fast`
?
`${mediaCourseUrl}?x-oss-process=video/snapshot,t_0,m_fast`
:
'https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png'
)
:
'https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png'
)
}
}
alt=
''
alt=
''
/>
/>
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
View file @
a4f5d121
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-05 10:50:30
* @Date: 2021-07-05 10:50:30
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-
06 15:16:47
* @LastEditTime: 2021-07-
14 14:32:55
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -13,6 +13,7 @@ import PlanService from '@/domains/plan-domain/planService';
...
@@ -13,6 +13,7 @@ import PlanService from '@/domains/plan-domain/planService';
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
'./UserLearnDetailModal.less'
;
import
'./UserLearnDetailModal.less'
;
import
_
from
'underscore'
;
import
_
from
'underscore'
;
import
{
FileTypeIcon
}
from
'@/common/constants/academic/lessonEnum'
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
;
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
;
const
CourseType
=
{
const
CourseType
=
{
LIVE
:
{
LIVE
:
{
...
@@ -193,10 +194,10 @@ class UserLearnDetailModal extends React.Component {
...
@@ -193,10 +194,10 @@ class UserLearnDetailModal extends React.Component {
return
(
return
(
<
div
className=
'chapter-record'
>
<
div
className=
'chapter-record'
>
<
span
>
<
span
>
{
chapterIndex
+
1
}
.
{
index
+
1
}
{
index
<
9
?
`0${index + 1} `
:
index
+
1
}
</
span
>
</
span
>
<
img
className=
'chapter-img'
src=
'https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png'
/>
<
img
className=
'chapter-img'
src=
{
FileTypeIcon
[
record
.
mediaType
]
}
/>
<
span
>
{
record
.
name
}
</
span
>
<
span
className=
'chapter-name'
>
{
record
.
name
}
</
span
>
</
div
>
</
div
>
);
);
},
},
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.less
View file @
a4f5d121
...
@@ -65,6 +65,12 @@
...
@@ -65,6 +65,12 @@
height: 18px;
height: 18px;
margin: 0 10px;
margin: 0 10px;
}
}
.chapter-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 400px;
}
}
}
.record-name {
.record-name {
display: flex;
display: flex;
...
...
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
a4f5d121
...
@@ -397,7 +397,7 @@ class SelectOperatorModal extends React.Component {
...
@@ -397,7 +397,7 @@ class SelectOperatorModal extends React.Component {
const
{
coverUrl
}
=
record
;
const
{
coverUrl
}
=
record
;
return
(
return
(
<
div
className=
'course-info'
>
<
div
className=
'course-info'
>
<
img
className=
'course-cover'
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png'
}
alt=
''
/>
<
img
className=
'course-cover'
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png'
}
alt=
''
/>
<
div
className=
'course-name'
>
{
record
.
courseName
}
</
div
>
<
div
className=
'course-name'
>
{
record
.
courseName
}
</
div
>
</
div
>
</
div
>
);
);
...
...
src/modules/prepare-lesson/modal/SelectPrepareFileModal.jsx
View file @
a4f5d121
...
@@ -101,7 +101,7 @@ class SelectPrepareFileModal extends React.Component {
...
@@ -101,7 +101,7 @@ class SelectPrepareFileModal extends React.Component {
// 获取文件列表
// 获取文件列表
handleFetchFolderList
=
(
params
=
{},
loadMore
=
false
)
=>
{
handleFetchFolderList
=
(
params
=
{},
loadMore
=
false
)
=>
{
// 根据当前根节点获取文件列表
// 根据当前根节点获取文件列表
const
{
selectTypeList
}
=
this
.
props
;
const
{
selectTypeList
,
queryTypeEnum
}
=
this
.
props
;
const
{
query
,
folderList
,
currentRootDisk
}
=
this
.
state
;
const
{
query
,
folderList
,
currentRootDisk
}
=
this
.
state
;
const
_params
=
{
const
_params
=
{
...
query
,
...
query
,
...
@@ -114,6 +114,9 @@ class SelectPrepareFileModal extends React.Component {
...
@@ -114,6 +114,9 @@ class SelectPrepareFileModal extends React.Component {
if
(
selectTypeList
)
{
if
(
selectTypeList
)
{
_params
.
folderFileType
=
selectTypeList
_params
.
folderFileType
=
selectTypeList
}
}
if
(
queryTypeEnum
){
_params
.
queryTypeEnum
=
queryTypeEnum
}
Service
.
Hades
(
FOLDERLIST_URL_MAP
[
currentRootDisk
.
disk
],
_params
).
then
((
res
)
=>
{
Service
.
Hades
(
FOLDERLIST_URL_MAP
[
currentRootDisk
.
disk
],
_params
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
result
=
{}
}
=
res
;
...
...
src/modules/resource-disk/modal/ScanFileModal.jsx
View file @
a4f5d121
...
@@ -34,7 +34,7 @@ class ScanFileModal extends React.Component {
...
@@ -34,7 +34,7 @@ class ScanFileModal extends React.Component {
style=
{
{
width
:
632
,
objectFit
:
"cover"
}
}
style=
{
{
width
:
632
,
objectFit
:
"cover"
}
}
/>
/>
)
}
)
}
{
fileType
===
"
MP4
"
&&
(
{
fileType
===
"
VIDEO
"
&&
(
<
div
>
<
div
>
<
Player
<
Player
src=
{
item
.
mediaUrl
||
item
.
ossAddress
||
item
.
ossUrl
}
src=
{
item
.
mediaUrl
||
item
.
ossAddress
||
item
.
ossUrl
}
...
...
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