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
1335d49e
Commit
1335d49e
authored
Jul 13, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理图片预览
parent
e9a67d8c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
24 deletions
+22
-24
src/modules/course-manage/modal/PreviewCourseModal.jsx
+1
-1
src/modules/course-manage/modal/ShareLiveModal.jsx
+1
-1
src/modules/course-manage/video-course/AddVideoCourse.jsx
+3
-5
src/modules/course-manage/video-course/VideoCourseDetail.tsx
+7
-5
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
+1
-1
src/modules/knowledge-base/modal/AddCourse.jsx
+1
-1
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
+4
-3
src/modules/plan-manage/modal/relatedCourseModal.jsx
+1
-1
No files found.
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
1335d49e
...
...
@@ -169,7 +169,7 @@ class PreviewCourseModal extends React.Component {
<
video
controls
src=
{
courseChapterList
.
length
&&
courseChapterList
[
0
].
mediaUrl
||
scheduleVideoUrl
}
poster=
{
coverUrl
?
coverUrl
:
`https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png`
}
poster=
{
coverUrl
?
coverUrl
:
`https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png`
}
className=
'course-url'
/>
</
When
>
...
...
src/modules/course-manage/modal/ShareLiveModal.jsx
View file @
1335d49e
...
...
@@ -116,7 +116,7 @@ class ShareLiveModal extends React.Component {
}
break
;
case
'videoClass'
:
// 视频课
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png'
;
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png'
;
break
;
case
'graphicsClass'
:
// 图文课
coverImgSrc
=
coverUrl
||
'https://image.xiaomaiketang.com/xm/wFnpZtp2yB.png'
;
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
1335d49e
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-
09 16:17:21
* @LastEditTime: 2021-07-
13 14:12:20
* @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -767,9 +767,7 @@ class AddVideoCourse extends React.Component {
selectTypeList
,
accept
}
=
this
.
state
// const courseWareIcon = FileVerifyMap[videoType] ? FileTypeIcon[FileVerifyMap[videoType].type] : FileTypeIcon[videoType]
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/mt3ZQRxGKB.png'
;
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png'
;
const
isDefaultCover
=
coverUrl
===
defaultCover
||
coverUrl
==
null
;
return
(
...
...
@@ -903,7 +901,7 @@ class AddVideoCourse extends React.Component {
isDefaultCover
&&
<
span
className=
"tag"
>
默认图
</
span
>
}
{
/* 如果视频和封面都没有上传的话, 那么就显示缺省, 如果上传了视频, 那么封面图就默认显示视频的第一帧, 如果上传了封面图, 那么就显示上传的封面图 */
}
<
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
>
...
...
src/modules/course-manage/video-course/VideoCourseDetail.tsx
View file @
1335d49e
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-04-28 18:05:30
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-
09 15:32:13
* @LastEditTime: 2021-07-
13 14:11:00
* @Description: 线上课课程课节详情
*/
...
...
@@ -31,9 +31,10 @@ function VideoCourseDetail(){
const
[
categoryName
,
setCategoryName
]
=
useState
(
""
);
const
[
scanFileModal
,
setScanFileModal
]
=
useState
<
any
>
(
null
);
const
[
showPreviewModal
,
setShowPreviewModal
]
=
useState
(
false
);
//是否显示loading
const
[
previewing
,
setPreviewing
]
=
useState
(
false
);
//是否正在预览
//
const [previewing,setPreviewing] = useState(false); //是否正在预览
const
[
previewStatus
,
setPreviewStatus
]
=
useState
(
'UPLOAD'
);
//预览文件的生成状态
const
[
url
,
setUrl
]
=
useState
(
''
);
let
previewing
=
false
;
useEffect
(()
=>
{
handleFetchScheudleDetail
(
courseId
);
},[
courseId
])
...
...
@@ -95,7 +96,7 @@ function VideoCourseDetail(){
}
else
{
if
(
!
fileVersionId
){
setShowPreviewModal
(
true
);
setPreviewing
(
true
)
;
previewing
=
true
;
setPreviewStatus
(
'UPLOAD'
);
const
uploadParams
=
{
fileUrl
:
mediaUrl
,
...
...
@@ -148,7 +149,8 @@ function VideoCourseDetail(){
// }
function
cancelPreview
(){
setShowPreviewModal
(
false
);
setPreviewing
(
false
);
// setPreviewing(false);
previewing
=
false
;
setPreviewStatus
(
'UPLOAD'
);
}
...
...
@@ -165,7 +167,7 @@ function VideoCourseDetail(){
<
div
className=
"course-detail"
>
<
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
className=
"course-detail__info"
>
<
div
className=
"info__title"
>
{
courseName
}
</
div
>
...
...
src/modules/course-manage/video-course/components/LearningDetailModal.jsx
View file @
1335d49e
...
...
@@ -2,6 +2,7 @@ import User from "@/common/js/user";
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
React
from
"react"
;
import
{
Modal
}
from
"antd"
;
import
{
FileTypeIcon
}
from
'@/common/constants/academic/lessonEnum'
import
"./LearningDetailModal.less"
;
class
LearningDetailModal
extends
React
.
Component
{
...
...
@@ -58,11 +59,7 @@ class LearningDetailModal extends React.Component {
<
div
className=
"course-ware__index"
>
{
`${
index > 9 ? index + 1 : `
0
$
{
index
+
1
}
`
} `
}
</
div
>
<
img
className=
"course-ware__img"
src=
"https://image.xiaomaiketang.com/xm/TKwbQGYDBR.png"
alt=
""
/>
<
img
className=
'course-ware__img'
src=
{
FileTypeIcon
[
item
.
mediaType
]
}
alt=
''
/>
<
div
className=
"course-ware__name"
>
{
item
.
courseChapterName
&&
item
.
courseChapterName
.
replace
(
'.MP4'
,
''
)
}
</
div
>
</
div
>
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
1335d49e
...
...
@@ -69,7 +69,7 @@ class VideoCourseList extends React.Component {
<
img
className=
'course-cover'
src=
{
coverUrl
||
'https://image.xiaomaiketang.com/xm/
mt3ZQRxGKB
.png'
coverUrl
||
'https://image.xiaomaiketang.com/xm/
TwtGPQGE4K
.png'
}
alt=
'封面图'
/>
...
...
src/modules/knowledge-base/components/KnowledgeBaseList.jsx
View file @
1335d49e
...
...
@@ -296,7 +296,7 @@ class KnowledgeBaseList extends React.Component {
?
coverUrl
:
courseDivision
!==
"EXTERNAL"
?
`${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=
''
/>
...
...
src/modules/knowledge-base/modal/AddCourse.jsx
View file @
1335d49e
...
...
@@ -421,7 +421,7 @@ class AddCourse extends React.Component {
coverUrl
||
(
videoCourseDivision
===
'internal'
?
`${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=
''
/>
...
...
src/modules/plan-manage/modal/UserLearnDetailModal.jsx
View file @
1335d49e
/*
* @Author: yuananting
* @Date: 2021-07-05 10:50:30
* @LastEditors:
yuananting
* @LastEditTime: 2021-07-0
6 15:16:47
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-07-0
9 17:36:15
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
...
@@ -13,6 +13,7 @@ import PlanService from '@/domains/plan-domain/planService';
import
User
from
'@/common/js/user'
;
import
'./UserLearnDetailModal.less'
;
import
_
from
'underscore'
;
import
{
FileTypeIcon
}
from
'@/common/constants/academic/lessonEnum'
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
;
const
CourseType
=
{
LIVE
:
{
...
...
@@ -195,7 +196,7 @@ class UserLearnDetailModal extends React.Component {
<
span
>
{
chapterIndex
+
1
}
.
{
index
+
1
}
</
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
>
</
div
>
);
...
...
src/modules/plan-manage/modal/relatedCourseModal.jsx
View file @
1335d49e
...
...
@@ -397,7 +397,7 @@ class SelectOperatorModal extends React.Component {
const
{
coverUrl
}
=
record
;
return
(
<
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
>
);
...
...
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