Commit 92a64eae by maolipeng

fix:去掉企微直播限制

parent 0997c860
...@@ -160,20 +160,6 @@ function CreateWorkWXCourse() { ...@@ -160,20 +160,6 @@ function CreateWorkWXCourse() {
setBasicInfo(binfo) setBasicInfo(binfo)
}; };
// 修改上课信息
function handleChangeClassInfo(field, value, type, optionValue) {
const _value = value ? value.valueOf() : null;
const { teacherName, assistantNames, assistantStoreUserId } = addLiveClassInfo;
let _addLiveClassInfo = {
addLiveClassInfo,
[field]: _value,
teacherName: type === 'teacherType' ? optionValue : teacherName,
assistantNames: type === 'assistantType' ? _.pluck(optionValue, 'children') : assistantNames,
assistantStoreUserId: type === 'assistantType' ? _.pluck(optionValue, 'key') : assistantStoreUserId,
}
setAddLiveClassInfo(_addLiveClassInfo)
};
//课程信息变更回调 //课程信息变更回调
function onClassInfoChange(field, value) { function onClassInfoChange(field, value) {
let classinfo = {...classInfo} let classinfo = {...classInfo}
......
...@@ -724,6 +724,22 @@ class LiveCourseList extends React.Component { ...@@ -724,6 +724,22 @@ class LiveCourseList extends React.Component {
}; };
//进入直播间 //进入直播间
handleEnterLiveRoom = (item) => { handleEnterLiveRoom = (item) => {
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
}
if (item.startTime - Date.now() > 1800000) { if (item.startTime - Date.now() > 1800000) {
Modal.warning({ Modal.warning({
title: '你来得太早了', title: '你来得太早了',
...@@ -736,22 +752,6 @@ class LiveCourseList extends React.Component { ...@@ -736,22 +752,6 @@ class LiveCourseList extends React.Component {
), ),
}); });
} else { } 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({ CourseService.getLiveCloudCourseDetail({
liveCourseId: item.liveCourseId, liveCourseId: item.liveCourseId,
}).then((res) => { }).then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment