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