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
04885823
Commit
04885823
authored
Jan 07, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:调整分享的标题的显示
parent
6a491b00
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
25 deletions
+59
-25
src/modules/course-manage/modal/ShareLiveModal.jsx
+1
-2
src/modules/course-manage/video-course/AddVideoCourse.jsx
+18
-7
src/modules/course-manage/video-course/AddVideoCourse.less
+5
-2
src/modules/course-manage/video-course/components/AddVideoIntro.jsx
+9
-5
src/modules/course-manage/video-course/components/AddVideoIntro.less
+12
-0
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+5
-7
src/modules/course-manage/video-course/modal/WatchDataModal.jsx
+9
-2
No files found.
src/modules/course-manage/modal/ShareLiveModal.jsx
View file @
04885823
...
...
@@ -28,7 +28,7 @@ class ShareLiveModal extends React.Component {
shareUrl
:
'https://xiaomai5.com/liveShare?courseId=12'
}
}
componentDidMount
()
{
// 获取短链接
this
.
handleConvertShortUrl
();
...
...
@@ -113,7 +113,6 @@ class ShareLiveModal extends React.Component {
</
div
>
<
div
className=
"course-name-title"
>
{
type
===
'videoClass'
?
`${courseName}开课啦`
:
`邀请你观看直播:`
}
</
div
>
<
div
className=
"course-name"
>
{
courseName
}
</
div
>
<
img
src=
{
coverImgSrc
}
crossOrigin=
"*"
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
04885823
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-0
4 13:50:0
5
* @LastEditTime: 2021-01-0
7 15:44:2
5
* @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -114,7 +114,9 @@ class AddVideoCourse extends React.Component {
// scheduleVideoUrl,
shelfState
,
whetherVisitorsJoin
,
courseMediaVOS
courseMediaVOS
,
categoryOneName
,
categoryTwoName
}
=
result
;
let
coverId
;
let
coverUrl
;
...
...
@@ -124,6 +126,7 @@ class AddVideoCourse extends React.Component {
let
scheduleMedia
=
[];
let
scheduleVideoId
;
let
scheduleVideoUrl
;
courseMediaVOS
.
map
((
item
)
=>
{
switch
(
item
.
contentType
){
case
"COVER"
:
...
...
@@ -145,6 +148,13 @@ class AddVideoCourse extends React.Component {
}
return
item
;
})
let
categoryName
;
if
(
categoryTwoName
){
categoryName
=
`
${
categoryOneName
}
-
${
categoryTwoName
}
`
;
}
else
{
categoryName
=
`
${
categoryOneName
}
`
;
}
this
.
setState
({
coverId
,
coverUrl
,
...
...
@@ -156,7 +166,8 @@ class AddVideoCourse extends React.Component {
scheduleVideoId
,
scheduleVideoUrl
,
shelfState
,
whetherVisitorsJoin
whetherVisitorsJoin
,
categoryName
});
})
...
...
@@ -472,12 +483,12 @@ class AddVideoCourse extends React.Component {
</
div
>
<
div
className=
"course-catalog"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
课程分类:
</
span
>
{
(
pageType
===
'add'
)
&&
<
Cascader
defaultValue=
{
[
categoryName
]
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
/>
{
/* { (pageType === 'edit'
) &&
}
{
(
pageType
===
'edit'
&&
categoryName
)
&&
<
Cascader
defaultValue=
{
[
categoryName
]
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
/>
}
*/
}
}
</
div
>
<
div
className=
"intro-info mt16"
>
<
AddVideoIntro
...
...
src/modules/course-manage/video-course/AddVideoCourse.less
View file @
04885823
...
...
@@ -41,7 +41,10 @@
top: 0;
}
}
.course-catalog{
margin-bottom:16px;
margin-top:16px;
}
.course-ware {
display: flex;
align-items: center;
...
...
@@ -82,7 +85,7 @@
padding: 52px 24px;
text-align: center;
}
.opt-btns {
margin-top: 8px;
display: flex;
...
...
src/modules/course-manage/video-course/components/AddVideoIntro.jsx
View file @
04885823
...
...
@@ -185,15 +185,17 @@ class AddVideoIntro extends React.Component {
return
(
<
div
className=
"add-video__intro-info"
>
<
div
className=
"allow-tourist-join"
>
<
span
className=
"label"
>
允许游客加入
:
</
span
>
<
span
className=
"label"
>
观看设置
:
</
span
>
<
div
className=
"content"
>
<
Row
>
<
Col
span=
{
3
}
>
<
Switch
checked=
{
whetherVisitorsJoin
===
"YES"
?
true
:
false
}
onChange=
{
this
.
whetherVisitorsJoinChange
}
/>
</
Col
>
<
Col
span=
{
21
}
>
<
div
>
开启:用户可直接进入直播间观看直播
</
div
>
<
div
>
关闭:用户需先填写手机号并短信验证,通过后才可进入直播间观看直播
</
div
>
<
div
className=
"desc"
>
<
div
>
开启:仅限绑定了手机号的用户可以观看视频
</
div
>
<
div
>
关闭:未绑定手机号的用户也可观看
</
div
>
</
div
>
</
Col
>
</
Row
>
</
div
>
...
...
@@ -206,8 +208,10 @@ class AddVideoIntro extends React.Component {
<
Switch
checked=
{
shelfState
===
"YES"
?
true
:
false
}
onChange=
{
this
.
shelfStateChange
}
/>
</
Col
>
<
Col
span=
{
21
}
>
<
div
>
开启:此视频将在用户店铺的视频列表中出现
</
div
>
<
div
>
关闭:此视频将在用户店铺的视频列表中隐藏
</
div
>
<
div
className=
"desc"
>
<
div
>
开启:此视频将在用户店铺的视频列表中出现
</
div
>
<
div
>
关闭:此视频将在用户店铺的视频列表中隐藏
</
div
>
</
div
>
</
Col
>
</
Row
>
</
div
>
...
...
src/modules/course-manage/video-course/components/AddVideoIntro.less
View file @
04885823
...
...
@@ -17,9 +17,21 @@
}
.allow-tourist-join{
display:flex;
.desc{
margin-left:16px;
font-size:14px;
color:#999;
}
}
.store-show{
display:flex;
margin-top:16px;
margin-bottom:16px;
.desc{
margin-left:16px;
font-size:14px;
color:#999;
}
}
.radio {
display: block;
...
...
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
04885823
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors:
wuf
an
* @LastEditTime: 2021-01-0
6 20:53:27
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2021-01-0
7 15:38:16
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -87,7 +87,7 @@ class VideoCourseList extends React.Component {
render
:
(
val
,
record
)
=>
{
return
(
<
div
className=
"record__item"
>
{
record
.
categoryOneName
}{
record
.
categoryTwoName
?
``
:
''
}
{
record
.
categoryOneName
}{
record
.
categoryTwoName
?
`
-${record.categoryTwoName}
`
:
''
}
</
div
>
)
}
...
...
@@ -241,14 +241,12 @@ class VideoCourseList extends React.Component {
const
htmlUrl
=
`
${
LIVE_SHARE
}
store/
${
User
.
getStoreId
()}
/video_detail/
${
liveCourseId
}
`
;
const
longUrl
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
_appId
}
&redirect_uri=
${
encodeURIComponent
(
htmlUrl
)}
%26appid%3D
${
_appId
}
&response_type=code&scope=snsapi_base&state=state#wechat_redirect`
;
const
{
coverUrl
,
scheduleName
}
=
record
;
const
{
coverUrl
,
courseName
}
=
record
;
const
shareData
=
{
longUrl
,
coverUrl
,
scheduleVideoUrl
,
courseName
:
scheduleName
,
courseName
,
};
const
shareLiveModal
=
(
...
...
src/modules/course-manage/video-course/modal/WatchDataModal.jsx
View file @
04885823
...
...
@@ -55,9 +55,16 @@ class WatchDataModal extends React.Component {
});
});
}
handleChangNickname
=
(
nickName
)
=>
{
handleChangNickname
=
(
value
)
=>
{
const
isPhone
=
(
value
||
''
).
match
(
/^
\d
+$/
);
const
{
query
}
=
this
.
state
;
query
.
nickName
=
nickName
;
if
(
isPhone
){
query
.
phone
=
value
;
query
.
nickName
=
null
;
}
else
{
query
.
nickName
=
value
;
query
.
phone
=
null
;
}
query
.
current
=
1
;
this
.
setState
({
query
...
...
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