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
1
Merge Requests
1
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
0997c860
Commit
0997c860
authored
Aug 04, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:企微直播。。。。
parent
61a5d6d2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
11 deletions
+50
-11
src/common/js/wechatApi.js
+17
-0
src/modules/course-manage/components/CreateWorkWXCourse.jsx
+2
-2
src/modules/course-manage/components/LiveCourseList.jsx
+18
-0
src/modules/course-manage/components/LiveModeSelect.less
+9
-6
src/modules/course-manage/components/LiveModeSelect.tsx
+3
-3
src/modules/course-manage/modal/PreviewCourseModal.jsx
+1
-0
No files found.
src/common/js/wechatApi.js
View file @
0997c860
...
...
@@ -155,4 +155,21 @@ export default class WechatApi {
});
});
}
//进入直播间
static
enterLiveRoom
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
ready
(()
=>
{
wx
.
invoke
(
'startLiving'
,
{
"livingId"
:
id
,
},
function
(
res
)
{
if
(
res
.
err_msg
===
"startLiving:ok"
)
{
resolve
(
true
)
}
else
{
reject
(
res
.
err_msg
);
//错误处理
}
});
});
})
}
}
src/modules/course-manage/components/CreateWorkWXCourse.jsx
View file @
0997c860
...
...
@@ -400,8 +400,8 @@ function CreateWorkWXCourse() {
const
previewLiveCourseModal
=
(
<
PreviewCourseModal
courseBasicInfo=
{
basicInfo
}
courseClassInfo=
{
addLiveClassInfo
}
courseIntroInfo=
{
addLiveIntroInfo
}
courseClassInfo=
{
{...
classInfo
,
endTime
}
}
courseIntroInfo=
{
{
introduce
:
introduce
,
categoryName
:
basicInfo
.
courseName
}
}
type=
{
type
}
courseState=
{
courseState
}
close=
{
()
=>
{
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
0997c860
...
...
@@ -7,9 +7,11 @@
*/
import
User
from
'@/common/js/user'
;
import
WechatApi
from
'@/common/js/wechatApi'
;
import
college
from
'@/common/lottie/college'
;
import
{
PageControl
,
XMTable
}
from
'@/components'
;
import
DownloadLiveModal
from
'@/components/DownloadLiveModal'
;
import
{
isWorkWx
}
from
'@/core/platform'
;
import
BaseService
from
'@/domains/basic-domain/baseService'
;
import
{
LIVE_SHARE
}
from
'@/domains/course-domain/constants'
;
import
CourseService
from
'@/domains/course-domain/CourseService'
;
...
...
@@ -734,6 +736,22 @@ class LiveCourseList extends React.Component {
),
});
}
else
{
if
(
item
.
thirdPartType
===
"WECHAT"
)
{
//进入企微直播间
if
(
!
isWorkWx
())
{
Modal
.
warning
({
title
:
'提示'
,
content
:
"请使用企业微信进入直播间"
})
return
}
WechatApi
.
enterLiveRoom
(
item
.
livingId
).
then
((
res
)
=>
{
console
.
log
(
res
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
return
}
CourseService
.
getLiveCloudCourseDetail
({
liveCourseId
:
item
.
liveCourseId
,
}).
then
((
res
)
=>
{
...
...
src/modules/course-manage/components/LiveModeSelect.less
View file @
0997c860
...
...
@@ -47,17 +47,14 @@
box-shadow: 0px 2px 8px 3px rgba(41, 102, 255, 0.1);
border-radius: 5px;
text-align: center;
background-size: contain;
background-repeat: no-repeat;
.logo {
width: 80px;
height: 80px;
margin: 31px auto 0 auto;
}
.xiaomai-logo {
background-image: url("https://image.xiaomaiketang.com/xm/ZxaYpAy8kB.png");
}
.qiwei-logo {
background-image: url("https://image.xiaomaiketang.com/xm/7Sjm26wAt8.png");
}
.item-title {
font-size: 16px;
font-weight: 500;
...
...
@@ -83,6 +80,12 @@
cursor: pointer;
}
}
.xiaomai-logo {
background-image: url("https://image.xiaomaiketang.com/xm/rjwN8Yc7xa.png");
}
.qiwei-logo {
background-image: url("https://image.xiaomaiketang.com/xm/CzdyntSxha.png");
}
}
}
}
...
...
src/modules/course-manage/components/LiveModeSelect.tsx
View file @
0997c860
...
...
@@ -30,13 +30,13 @@ export default function LiveModeSelect(props: LiveModeSelectProps) {
<
span
className=
"icon iconfont close"
onClick=
{
handleClose
}
>

</
span
>
</
div
>
<
div
className=
"content"
>
<
div
className=
"item"
>
<
div
className=
"logo
xiaomai-logo
"
></
div
>
<
div
className=
"item
xiaomai-logo
"
>
<
div
className=
"logo"
></
div
>
<
div
className=
"item-title"
>
小麦直播
</
div
>
<
div
className=
"des"
>
通过小麦企学院“PC客户
<
br
/>
端”进行直播
</
div
>
<
div
className=
"button"
onClick=
{
handleSelect0
}
>
立即创建
</
div
>
</
div
>
<
div
className=
"item"
>
<
div
className=
"item
qiwei-logo
"
>
<
div
className=
"logo qiwei-logo"
></
div
>
<
div
className=
"item-title"
>
企微直播
</
div
>
<
div
className=
"des"
>
通过“企业微信APP”进行
<
br
/>
直播进行直播
</
div
>
...
...
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
0997c860
...
...
@@ -48,6 +48,7 @@ class PreviewCourseModal extends React.Component {
return
hours
+
":"
+
mins
+
":"
+
seconds
;
};
dealWithTime
=
(
startTime
,
endTime
)
=>
{
debugger
const
startDate
=
new
Date
(
Number
(
startTime
));
const
endDate
=
new
Date
(
Number
(
endTime
));
...
...
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