Commit e7c8b2b9 by maolipeng

Merge branch 'feature/zhujian/0726/qwLiving' into dev

# Conflicts:
#	src/common/js/platform.js
#	src/components/ContactWidget.tsx
#	src/index.html
#	src/index.tsx
#	src/modules/course-manage/components/LiveCourseList.jsx
#	src/modules/course-manage/video-course/AddVideoCourse.jsx
parents a61819ae c5250b93
......@@ -117,7 +117,8 @@
"build:dev1": "better-npm-run build:dev1",
"build:rc": "cross-env DEPLOY_ENV=rc node scripts/build.js",
"build:gray": "cross-env DEPLOY_ENV=gray node scripts/build.js",
"build:syoo": "better-npm-run build:syoo",
"build:gray-syoo": "better-npm-run build:gray-syoo",
"build:prod-syoo": "better-npm-run build:prod-syoo",
"build:prod": "cross-env DEPLOY_ENV=prod node scripts/build.js"
},
"betterScripts": {
......@@ -128,7 +129,14 @@
"BRAND": "syoo"
}
},
"build:syoo": {
"build:gray-syoo": {
"command": "node scripts/build.js",
"env": {
"DEPLOY_ENV": "gray",
"BRAND": "syoo"
}
},
"build:prod-syoo": {
"command": "node scripts/build.js",
"env": {
"DEPLOY_ENV": "prod",
......
......@@ -17,7 +17,7 @@
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<link rel="shortcut icon" href="https://image.xiaomaiketang.com/xm/KGSYFEpcHT.png">
<title>小麦企学院</title>
<title>扫码登陆</title>
<script type="text/javascript" charset="utf-8" src="./jquery.min.js"></script>
<style type="text/css">
......
......@@ -39,5 +39,8 @@ module.exports = {
const ua = navigator.userAgent.toLowerCase();
return /xmappc/i.test(ua);
},
};
isMac() {
const ua = navigator.platform.toLowerCase();
return ua.indexOf("mac") > 0
}
};
......@@ -39,5 +39,9 @@ module.exports = {
const ua = navigator.userAgent.toLowerCase();
return /xmappc/i.test(ua);
},
isMac() {
const ua = navigator.platform.toLowerCase();
return ua.indexOf("mac") > 0
}
};
\ No newline at end of file
......@@ -23,8 +23,8 @@ const PATH_MAP: MapInterface = {
dev: 'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html',
dev1: 'https://dev.xiaomai5.com/dev1/xiaomai-cloud-class-web/h5.html',
rc: 'https://rc.xiaomai5.com/xiaomai-cloud-class-web/h5.html',
gray: 'https://res.xiaomai0.com/xiaomai-cloud-class-web/gray/h5.html',
prod: path,
gray: path + '/gray/h5.html',
prod: path + '/h5.html',
}
export const YZ_APPId = "yozoqvpO2Hvz8346";
......
......@@ -22,13 +22,13 @@ const BrandBannerMap: any = {
}
const PATH_MAP: any = {
prod: 'https://res.xiaomai0.com/xiaomai-cloud-class-web/h5.html',
syoo: 'https://res.xiaomai0.com/xiaomai-cloud-class-web/h5.html',
xiaomai: 'https://res.xiaomai0.com/xiaomai-cloud-class-web',
syoo: 'https://study.syoo.cn/syoo-cloud-class-web',
}
const LIVE_SHARE_MAP: any = {
xiaomai: process.env.DEPLOY_ENV === 'dev' ? 'https://dev.xiaomai5.com/store-live/index.html#/' : 'https://res.xiaomai0.com/store-live/index.html#/',
syoo: 'https://dev.xiaomai5.com/dev1/store-live/index.html#/',
xiaomai: 'https://res.xiaomai0.com/store-live',
syoo: 'https://study.syoo.cn/syoo-store-live',
}
......
......@@ -30,8 +30,8 @@ const LIVE_SHARE_MAP: MapInterface = {
dev: 'https://dev.xiaomai5.com/store-live/index.html#/',
dev1: 'https://dev.xiaomai5.com/dev1/store-live/index.html#/',
rc: 'https://rc.xiaomai5.com/store-live/index.html#/',
gray: 'https://res.xiaomai0.com/store-live/gray/index.html#/',
prod: live,
gray: live+'/gray/index.html#/',
prod: live+'/index.html#/',
}
......
......@@ -212,9 +212,10 @@ class DataList extends React.Component {
<Tooltip
title={()=> {
return <div>
<div>学员-已加入当前学院的企业员工</div>
<div>待加入-未加入当前学院的企业员工</div>
<div>游客-非企业员工</div>
<div>学员:已加入当前学院的企业员工</div>
<div>待加入:未加入当前学院的企业员工</div>
<div>游客:非企业员工</div>
<div>*企业员工以企业微信通讯录为准</div>
</div>
}}>
<i className='icon iconfont' style={{fontSize:"14px",fontWeight:"400"}}> &#xe61d;</i>
......@@ -237,8 +238,6 @@ class DataList extends React.Component {
{
title: '累计在线时长',
dataIndex: 'totalDuration',
sorter: (a, b) => a.totalDuration - b.totalDuration,
sortDirections: ['descend', 'ascend'],
render: (text, record) => {
//如无离开时间,就置空
return <span>{text ? dealTimeDuration(text) : '00:00:00'}</span>;
......
......@@ -64,7 +64,7 @@ export default function AddLiveClassInfoWorkWX(props) {
// setBeginDate(moment().startOf('day').valueOf())
// } else {
let _begindate = date.startOf('day').valueOf();
let _begintime = moment(beginTime)
let _begintime = beginTime === 0 ? moment().add(5,'minutes') : moment(beginTime)
let datetime = _begindate+(_begintime.hour()*60+_begintime.minute())*60*1000
setBeginTime(datetime)
props.onChange("beginTime",datetime)
......@@ -229,7 +229,7 @@ export default function AddLiveClassInfoWorkWX(props) {
</div>
</div>
<div className="duration-time item">
<div className="duration-time item" id="odqboqwdq">
{
cusTime || props.type === "edit" ? (
<>
......@@ -246,7 +246,7 @@ export default function AddLiveClassInfoWorkWX(props) {
style={{width:"180px"}}
/>
<TimePicker
value={endTime === 0?undefined:moment(endTime)}
value={endTime === 0?moment().add(5,'minutes'):moment(endTime)}
onChange={onEndTimeChange}
onOk={onEndTimeOK}
allowClear={false}
......@@ -258,7 +258,7 @@ export default function AddLiveClassInfoWorkWX(props) {
) : (
<>
<span className="label"><span className="require">*</span>时长:</span>
<Select onChange={onDurationChange} defaultValue={60} style={{width:"140px"}}>
<Select onChange={onDurationChange} defaultValue={60} style={{width:"140px"}} getPopupContainer={()=> document.getElementById("odqboqwdq")}>
<Option value={30}>0.5小时</Option>
<Option value={60}>1.0小时</Option>
<Option value={120}>2.0小时</Option>
......@@ -270,16 +270,17 @@ export default function AddLiveClassInfoWorkWX(props) {
}
</div>
<div className="teacher item">
<div className="teacher item" id="ieouwowerwe">
<span className="label"><span className="require">*</span>讲师:</span>
<div id="teacherId" style={_.find(props.exItems,(item)=>{return item === "teacherId"})?{border:"1px solid red",display:"inline-block"}:{display:"inline-block"}}>
<Select
value={teacherId}
onChange={onTeacherChange}
style={{width:"240px"}}
style={_.find(props.exItems,(item)=>{return item === "teacherId"})?{width:"240px",border:"1px solid red"}:{width:"240px"}}
placeholder="请选择讲师"
disabled={!props.isEdit ? true: false}
filterOption={(input, option) => option}
getPopupContainer={()=> document.getElementById("ieouwowerwe")}
showSearch
allowClear
onPopupScroll={handleScrollTeacherList}
......@@ -314,10 +315,14 @@ export default function AddLiveClassInfoWorkWX(props) {
}
</Select>
</div>
</div>
<div className="remind-time item">
<div className="remind-time item" id="jfjfiemc">
<span className="label"><span className="require">*</span>提醒时间:</span>
<Select onChange={onRemindChange} placeholder={"15分钟前"} style={{width:"130px"}}>
<Select
onChange={onRemindChange}
placeholder={"15分钟前"}
style={{width:"130px"}}
getPopupContainer={()=> document.getElementById("jfjfiemc")}
>
<Option value={0}></Option>
<Option value={300}>5分钟前</Option>
<Option value={900}>15分钟前</Option>
......
.AddLiveClassInfoWorkWX {
margin-left: 16px;
margin-bottom: 98px;
.remind-time {
.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder {
color: #333333;
}
}
.item {
margin: 24px 0;
.label {
......@@ -14,4 +21,7 @@
.introduce {
display: flex;
}
// .ant-select:not(.ant-select-disabled):hover .ant-select-selector{
// border: none;
// }
}
\ No newline at end of file
......@@ -195,7 +195,7 @@ function CreateWorkWXCourse() {
break;
case 'teacherId':
classinfo.teacherId = value.teacherId
classInfo.teacherName = value.teacherName
classinfo.teacherName = value.teacherName
setClassInfo(classinfo)
break;
case 'remindTime':
......
......@@ -10,7 +10,7 @@
color: #333;
font-weight: 500;
line-height: 22px;
margin-bottom:8px;
margin-bottom:25px;
}
.add-live__class-info {
margin-left: 14px;
......
......@@ -11,7 +11,7 @@ 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 { isWorkWx, isMac } 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';
......@@ -771,14 +771,35 @@ class LiveCourseList extends React.Component {
})
return
}
if (isMac()) {
Modal.warning({
title:"提示",
content:"请使用windows客户端打开"
})
return
}
CourseService.getWorkWXLiveCourseDetail({
liveCourseId: item.liveCourseId,
}).then((res) => {
const {
courseState
} = res.result;
if (courseState === "FINISH") {
Modal.warning({
title:"刷新页面",
content:"该课程已结束,请查看回放"
})
} else {
WechatApi.enterLiveRoom(item.livingId).then((res)=> {
console.log("进入企微直播间",res)
console.log(res)
}).catch((err)=> {
Modal.warning({
title:"提示",
content: err
})
})
}
})
return
}
if (item.startTime - Date.now() > 1800000) {
......
......@@ -63,15 +63,16 @@ class LiveCourseOpt extends React.Component {
// 下载直播客户端
handleDownloadClient = () => {
const { isMac } = this.state;
const BRAND = process.env.BRAND;
// 判断学员系统
let platform;
if(!isMac){
if (!isMac) {
platform = 1
} else {
platform = 4
}
BaseService
.getLastedVersion({ model: 5, platform})
.getLastedVersion({ model: 5, platform })
.then((res) => {
const a = document.createElement("a");
document.body.appendChild(a);
......@@ -79,6 +80,7 @@ class LiveCourseOpt extends React.Component {
a.click();
document.body.removeChild(a);
})
}
render() {
const userRole = User.getUserRole();
......@@ -87,7 +89,7 @@ class LiveCourseOpt extends React.Component {
<div className="live-course-opt">
<LiveModeSelect onClose={this.onModeSelectClose} onSelected={this.onModeSelected} isShow={this.state.showModeSelect}/>
<div className="opt__left">
{ userRole !== "CloudLecturer" &&
{userRole !== "CloudLecturer" &&
<Button type="primary" onClick={this.handleCreateLiveCouese}>新建直播课</Button>
}
{/* <Button type="primary" onClick={this.handleCreateQWCouese}>新建企微直播课</Button> */}
......
......@@ -115,8 +115,10 @@ class PreviewCourseModal extends React.Component {
let liveDateStr, startTimeStr, endTimeStr;
if (this.props.bizType === "qiwei") {
startTimeStr = moment(startTime === 0?moment().valueOf():startTime).format("YYYY-MM-DD HH:mm")
endTimeStr = moment(endTime === 0?moment(startTime+Number(duration)*1000).valueOf():endTime).format("HH:mm")
let _startTime = startTime === 0 ? moment().valueOf():startTime
startTimeStr = moment(_startTime).format("YYYY-MM-DD HH:mm")
endTimeStr = moment(endTime === 0?moment(_startTime+Number(duration)*1000).valueOf():endTime).format("HH:mm")
console.log(duration)
} else {
if (type === "add") {
const _liveDate = moment(calendarTime[0]).format("YYYY-MM-DD");
......
......@@ -366,11 +366,11 @@ class AddVideoCourse extends React.Component {
//过期判断
if (User.getExpirationTime() && moment().valueOf() > Number(User.getExpirationTime())) {
Modal.warning({
title: '服务已到期',
content: '当前企业购买的小麦企学院服务已到期,如需继续使用学院功能,请尽快续费购买',
okText: '我知道了',
});
return;
title:"服务已到期",
content:`当前企业购买的${window.brandName}服务已到期,如需继续使用学院功能,请尽快续费购买`,
okText: "我知道了"
})
return
}
const {
......
......@@ -341,7 +341,7 @@ function Header(props) {
<div
className='url-link'
onClick={() => {
window.open(`${LIVE_SHARE}store/index?id=${window.currentStoreUserInfo.storeId||User.getStoreId()}&userId=${window.currentStoreUserInfo.userId||User.getUserId()}&enterpriseId=${window.currentStoreUserInfo.enterpriseId||User.getEnterpriseId()}&from=admin&avatar=${avatar}`);
window.open(`${LIVE_SHARE}store/index?id=${window.currentStoreUserInfo.storeId || User.getStoreId()}&userId=${window.currentStoreUserInfo.userId || User.getUserId()}&enterpriseId=${window.currentStoreUserInfo.enterpriseId || User.getEnterpriseId()}&from=admin&avatar=${avatar}`);
}}>
{'立即前往 >'}
</div>
......@@ -359,12 +359,15 @@ function Header(props) {
<span className='text'>分享学院</span>
</span>
</div>
<div className='help'>
{
process.env.BRAND == 'xiaomai' && <div className='help'>
<a href={helpCenterUrl} target='_blank' className='help-btn'>
<span className='icon iconfont tool-tip-right'>&#xe8ed;</span>
<span className='text'>帮助中心</span>
</a>
</div>
}
</div>
<Dropdown overlay={userMenu()} arrow>
<div className='user'>
......
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