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
535d0fda
Commit
535d0fda
authored
Aug 05, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:进入企微回放
parent
f88d229b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
src/common/js/wechatApi.js
+17
-3
src/modules/course-manage/components/LiveCourseList.jsx
+10
-0
No files found.
src/common/js/wechatApi.js
View file @
535d0fda
...
@@ -42,7 +42,7 @@ export default class WechatApi {
...
@@ -42,7 +42,7 @@ export default class WechatApi {
timestamp
:
res2
.
timestamp
,
// 必填,生成签名的时间戳
timestamp
:
res2
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
res2
.
nonceStr
,
// 必填,生成签名的随机串
nonceStr
:
res2
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
res2
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法
signature
:
res2
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法
jsApiList
:
[
'selectExternalContact'
,
'getCurExternalContact'
,
'getContext'
,
'shareToExternalContact'
,
'sendChatMessage'
,
'shareToExternalChat'
,
'startLiving'
],
jsApiList
:
[
'selectExternalContact'
,
'getCurExternalContact'
,
'getContext'
,
'shareToExternalContact'
,
'sendChatMessage'
,
'shareToExternalChat'
,
'startLiving'
,
'replayLiving'
],
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
,
'res-agentconfig'
);
console
.
log
(
res
,
'res-agentconfig'
);
console
.
info
(
'window.WWOpenData'
,
window
.
WWOpenData
);
console
.
info
(
'window.WWOpenData'
,
window
.
WWOpenData
);
...
@@ -76,7 +76,7 @@ export default class WechatApi {
...
@@ -76,7 +76,7 @@ export default class WechatApi {
timestamp
:
res2
.
timestamp
,
// 必填,生成签名的时间戳
timestamp
:
res2
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
res2
.
nonceStr
,
// 必填,生成签名的随机串
nonceStr
:
res2
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
res2
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法
signature
:
res2
.
signature
,
// 必填,签名,见附录-JS-SDK使用权限签名算法
jsApiList
:
[
'selectExternalContact'
,
'getCurExternalContact'
,
'getContext'
,
'shareToExternalContact'
,
'sendChatMessage'
,
'shareToExternalChat'
,
'startLiving'
],
jsApiList
:
[
'selectExternalContact'
,
'getCurExternalContact'
,
'getContext'
,
'shareToExternalContact'
,
'sendChatMessage'
,
'shareToExternalChat'
,
'startLiving'
,
'replayLiving'
],
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
,
'res-agentconfig'
);
console
.
log
(
res
,
'res-agentconfig'
);
console
.
info
(
'window.WWOpenData'
,
window
.
WWOpenData
);
console
.
info
(
'window.WWOpenData'
,
window
.
WWOpenData
);
...
@@ -168,7 +168,21 @@ export default class WechatApi {
...
@@ -168,7 +168,21 @@ export default class WechatApi {
reject
(
res
.
err_msg
);
//错误处理
reject
(
res
.
err_msg
);
//错误处理
}
}
});
});
});
})
}
static
replayLiving
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
ready
(()
=>
{
wx
.
invoke
(
'replayLiving'
,
{
"livingId"
:
id
,
},
function
(
res
)
{
if
(
res
.
err_msg
===
"replayLiving:ok"
)
{
resolve
(
true
)
}
else
{
reject
(
res
.
err_msg
);
//错误处理
}
});
});
});
})
})
}
}
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
535d0fda
...
@@ -794,6 +794,16 @@ class LiveCourseList extends React.Component {
...
@@ -794,6 +794,16 @@ class LiveCourseList extends React.Component {
});
});
}
}
handleViewPlayBack
=
(
item
)
=>
{
handleViewPlayBack
=
(
item
)
=>
{
if
(
item
.
thirdPartType
===
"WECHAT"
)
{
WechatApi
.
replayLiving
(
item
.
livingId
)
.
then
((
res
)
=>
{
console
.
log
(
"进入企微回放"
)
})
.
catch
((
err
)
=>
{
console
.
log
(
"进入企微回放失败"
,
err
)
})
return
}
let
htmlUrl
;
let
htmlUrl
;
if
(
item
.
teacherId
===
User
.
getUserId
())
{
if
(
item
.
teacherId
===
User
.
getUserId
())
{
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?teacherId=
${
User
.
getUserId
()}
&id=
${
User
.
getStoreId
()}
`
;
htmlUrl
=
`
${
LIVE_SHARE
}
replay/
${
item
.
liveCourseId
}
?teacherId=
${
User
.
getUserId
()}
&id=
${
User
.
getStoreId
()}
`
;
...
...
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