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
f36a1d9f
Commit
f36a1d9f
authored
Aug 05, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/zhujian/0726/qwLiving' into dev
parents
46dc22d4
2ff9f5cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
src/common/js/wechatApi.js
+3
-2
src/modules/course-manage/components/AddLiveClassInfoWorkWX.jsx
+5
-6
src/modules/course-manage/components/CreateWorkWXCourse.jsx
+8
-1
src/modules/course-manage/components/LiveCourseList.jsx
+11
-1
No files found.
src/common/js/wechatApi.js
View file @
f36a1d9f
...
...
@@ -170,6 +170,7 @@ export default class WechatApi {
resolve
(
true
)
}
else
{
let
err
=
"进入回放失败"
console
.
log
(
res
.
err_msg
)
if
(
res
.
err_msg
===
"replayLiving:fail invalid living id"
)
{
err
=
"不合法的直播ID"
}
else
if
(
res
.
err_msg
===
"replayLiving:fail not allow to cross corp"
)
{
...
...
@@ -177,9 +178,9 @@ export default class WechatApi {
}
else
if
(
res
.
err_msg
===
"replayLiving:fail not allow to cross app"
)
{
err
=
"不可跨应用使用直播ID"
}
else
if
(
res
.
err_msg
===
"replayLiving:fail living has no replay"
)
{
err
=
"
不存在直播回放
"
err
=
"
直播回放已失效或不存在
"
}
else
if
(
res
.
err_msg
===
"replayLiving:fail replay is beging creating"
)
{
err
=
"
正在直播中,或回放正在生成中,稍后观看回放
"
err
=
"
回放生成中,请耐心等待
"
}
else
if
(
res
.
err_msg
===
"replayLiving:fail create replay failed"
)
{
err
=
"回放创建失败"
}
else
if
(
res
.
err_msg
===
"replayLiving:fail invalid parameter"
)
{
...
...
src/modules/course-manage/components/AddLiveClassInfoWorkWX.jsx
View file @
f36a1d9f
...
...
@@ -37,7 +37,6 @@ export default function AddLiveClassInfoWorkWX(props) {
setEndDate
(
moment
(
props
.
data
.
startTime
+
Number
(
props
.
data
.
duration
)).
startOf
(
'day'
).
valueOf
())
setTeacherId
(
props
.
data
.
teacherId
)
setRemindTime
(
props
.
data
.
remindTime
)
console
.
log
(
props
.
data
)
},[
props
.
data
])
useEffect
(()
=>
{
...
...
@@ -57,7 +56,8 @@ export default function AddLiveClassInfoWorkWX(props) {
message
.
warning
(
'开始日期不能早于当前日期'
)
setBeginDate
(
moment
().
startOf
(
'day'
).
valueOf
())
}
else
{
setBeginDate
(
date
.
startOf
(
'day'
).
valueOf
())
let
_begindate
=
date
.
startOf
(
'day'
).
valueOf
();
setBeginDate
(
_begindate
)
}
}
else
{
setBeginDate
(
0
)
...
...
@@ -89,7 +89,8 @@ export default function AddLiveClassInfoWorkWX(props) {
//结束日期
function
onEndDateChange
(
date
,
dateString
)
{
if
(
date
)
{
setEndDate
(
date
.
startOf
(
'day'
).
valueOf
())
let
_endDate
=
date
.
startOf
(
'day'
).
valueOf
()
setEndDate
(
_endDate
)
}
else
{
setEndDate
(
0
)
}
...
...
@@ -171,8 +172,6 @@ export default function AddLiveClassInfoWorkWX(props) {
}
}
// console.log(moment(beginDate).format("YYYY-MM-DD HH:mm"))
// console.log(moment(endDate).format("YYYY-MM-DD HH:mm"))
return
(
<
div
className=
"AddLiveClassInfoWorkWX"
>
<
div
className=
"begin-time item"
>
...
...
@@ -276,7 +275,7 @@ export default function AddLiveClassInfoWorkWX(props) {
maxLimit=
{
1000
}
detail=
{
introduce
}
onChange=
{
(
val
)
=>
{
onChangeIntro
(
val
);
onChangeIntro
(
val
);
}
}
></
GraphicsEditor
>
</
div
>
...
...
src/modules/course-manage/components/CreateWorkWXCourse.jsx
View file @
f36a1d9f
...
...
@@ -58,12 +58,15 @@ function CreateWorkWXCourse() {
const
[
classInfo
,
setClassInfo
]
=
useState
(
defaultClassInfo
)
const
[
endTime
,
setEndTime
]
=
useState
(
0
)
const
[
introduce
,
setIntroduce
]
=
useState
(
''
)
const
[
getInfo
,
setGetInfo
]
=
useState
(
false
)
const
[
previewLiveCourseModal
,
setPreviewLiveCourseModal
]
=
useState
()
useEffect
(()
=>
{
routeHook
.
addSaveCase
();
if
(
type
===
'edit'
)
{
getCourseDetail
();
}
else
{
setGetInfo
(
true
)
}
Bus
.
bind
(
'editorLimit'
,
(
editorTextLength
)
=>
{
setEditorTextLength
(
editorTextLength
)
...
...
@@ -144,6 +147,7 @@ function CreateWorkWXCourse() {
success
:
(
res
)
=>
{
setLoadintroduce
(
true
)
setIntroduce
(
res
)
setGetInfo
(
true
)
},
error
:
()
=>
{
message
.
warning
(
'获取简介失败'
);
...
...
@@ -432,7 +436,10 @@ function CreateWorkWXCourse() {
<
div
className=
'class-info__wrap'
>
<
div
className=
'title'
>
上课信息
</
div
>
{
/* <AddLiveClass isEdit={isEdit} pageType={type} data={{ ...addLiveClassInfo, id }} onChange={handleChangeClassInfo} /> */
}
<
AddLiveClassInfoWorkWX
type=
{
type
}
data=
{
classInfo
}
isEdit=
{
isEdit
}
introduce=
{
introduce
}
onChange=
{
onClassInfoChange
}
/>
{
getInfo
&&
<
AddLiveClassInfoWorkWX
type=
{
type
}
data=
{
classInfo
}
isEdit=
{
isEdit
}
introduce=
{
introduce
}
onChange=
{
onClassInfoChange
}
/>
}
</
div
>
</
div
>
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
f36a1d9f
...
...
@@ -736,7 +736,10 @@ class LiveCourseList extends React.Component {
WechatApi
.
enterLiveRoom
(
item
.
livingId
).
then
((
res
)
=>
{
console
.
log
(
res
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
Modal
.
warning
({
title
:
"提示"
,
content
:
err
})
})
return
}
...
...
@@ -795,6 +798,13 @@ class LiveCourseList extends React.Component {
}
handleViewPlayBack
=
(
item
)
=>
{
if
(
item
.
thirdPartType
===
"WECHAT"
)
{
if
(
!
isWorkWx
())
{
Modal
.
warning
({
title
:
"提示"
,
content
:
"请使用企业微信进入回放"
})
return
}
WechatApi
.
replayLiving
(
item
.
livingId
)
.
then
((
res
)
=>
{
console
.
log
(
"进入企微回放"
)
...
...
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