Commit b977699d by renmanyi

feat:移除4.0逻辑

parent 5d30eee1
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: 上课记录 * @Description: 上课记录
* @Author: zhangyi * @Author: zhangyi
* @Date: 2020-05-12 09:43:48 * @Date: 2020-05-12 09:43:48
* @LastEditors: zhangleyuan * @LastEditors: renmanyi
* @LastEditTime: 2021-02-01 14:00:19 * @LastEditTime: 2023-07-10 14:26:11
*/ */
import college from '@/common/lottie/college'; import college from '@/common/lottie/college';
...@@ -178,27 +178,6 @@ class ClassRecordModal extends React.Component { ...@@ -178,27 +178,6 @@ class ClassRecordModal extends React.Component {
}); });
}; };
// 4.0导出
handleExport = () => {
const { liveItem, type } = this.props;
const { liveCourseId } = liveItem;
const url = !type ? 'api-b/b/lesson/exportLargeClassLiveAsync' : 'api-b/b/lesson/exportClassInteractionLiveSync';
window.axios
.post(url, {
liveCourseId,
exportLiveType: 1,
})
.then((res) => {
Bus.trigger('get_download_count');
Modal.success({
title: '导出任务提交成功',
content: '请前往右上角的“导出中心”进行下载',
okText: '我知道了',
});
});
};
render() { render() {
const { type } = this.props; const { type } = this.props;
const { query, total, teacherData, classList } = this.state; const { query, total, teacherData, classList } = this.state;
...@@ -316,11 +295,7 @@ class ClassRecordModal extends React.Component { ...@@ -316,11 +295,7 @@ class ClassRecordModal extends React.Component {
message.warning('暂无数据可导出'); message.warning('暂无数据可导出');
return; return;
} }
if (window.NewVersion) {
this.handleExportV5(); this.handleExportV5();
} else {
this.handleExport();
}
}, },
500, 500,
true true
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: 回放记录 * @Description: 回放记录
* @Author: zhangyi * @Author: zhangyi
* @Date: 2020-05-12 09:43:48 * @Date: 2020-05-12 09:43:48
* @LastEditors: zhangleyuan * @LastEditors: renmanyi
* @LastEditTime: 2021-02-01 14:00:36 * @LastEditTime: 2023-07-10 14:24:14
*/ */
import college from '@/common/lottie/college'; import college from '@/common/lottie/college';
...@@ -79,26 +79,6 @@ class PlayBackRecordModal extends React.Component { ...@@ -79,26 +79,6 @@ class PlayBackRecordModal extends React.Component {
return hours + '小时' + mins + '分'; return hours + '小时' + mins + '分';
}; };
// 导出
handleExport = () => {
const { liveItem, type } = this.props;
const { liveCourseId } = liveItem;
const url = !type ? 'api-b/b/lesson/exportLargeClassLiveAsync' : 'api-b/b/lesson/exportClassInteractionLiveSync';
window.axios
.post(url, {
liveCourseId,
exportLiveType: 0,
})
.then((res) => {
Bus.trigger('get_download_count');
Modal.success({
title: '导出任务提交成功',
content: '请前往右上角的“导出中心”进行下载',
okText: '我知道了',
});
});
};
handleExportV5 = () => { handleExportV5 = () => {
const { liveItem, type } = this.props; const { liveItem, type } = this.props;
const { liveCourseId } = liveItem; const { liveCourseId } = liveItem;
...@@ -181,11 +161,7 @@ class PlayBackRecordModal extends React.Component { ...@@ -181,11 +161,7 @@ class PlayBackRecordModal extends React.Component {
message.warning('暂无数据可导出'); message.warning('暂无数据可导出');
return; return;
} }
if (window.NewVersion) {
this.handleExportV5(); this.handleExportV5();
} else {
this.handleExport();
}
}, },
500, 500,
true true
......
...@@ -16,12 +16,7 @@ class TeacherTip extends React.Component { ...@@ -16,12 +16,7 @@ class TeacherTip extends React.Component {
} }
} }
goclick = () => { goclick = () => {
if (window.NewVersion) {
window.open("https://b.xiaomai5.com/#/login", "_blank"); window.open("https://b.xiaomai5.com/#/login", "_blank");
} else {
window.open("https://b.xiaomai5.com/teacher.html", "_blank");
}
}; };
render() { render() {
...@@ -30,7 +25,6 @@ class TeacherTip extends React.Component { ...@@ -30,7 +25,6 @@ class TeacherTip extends React.Component {
<div className="teacher__container"> <div className="teacher__container">
<div className="teacher__container__child teacher"> <div className="teacher__container__child teacher">
<div className="teacher__child__title"> <span>上课老师如何直播?</span></div> <div className="teacher__child__title"> <span>上课老师如何直播?</span></div>
{window.NewVersion ?
<div className="teacher__child__box"> <div className="teacher__child__box">
<div className="teacher__child__box__item"> <div className="teacher__child__box__item">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/pFbfzS5TEnrMCPTGTG6JifJ67SW7EajfXatWrSWY8HKkTPWs1581060346720" className="teacher__img" /> <img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/pFbfzS5TEnrMCPTGTG6JifJ67SW7EajfXatWrSWY8HKkTPWs1581060346720" className="teacher__img" />
...@@ -49,25 +43,6 @@ class TeacherTip extends React.Component { ...@@ -49,25 +43,6 @@ class TeacherTip extends React.Component {
<div className="teacher__child__box__item__text">上课老师账号点击“开始上课”,唤起直播客户端进入直播间授课</div> <div className="teacher__child__box__item__text">上课老师账号点击“开始上课”,唤起直播客户端进入直播间授课</div>
</div> </div>
</div> </div>
:<div className="teacher__child__box">
<div className="teacher__child__box__item">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/JXA6WzYWABrkMtT2SzNPFAQR2tMNfMhD7rr4PQJGmad8w7s81581060291294" className="teacher__img" />
<p>课前准备</p>
<div className="teacher__child__box__item__text">准备PPT等课件、下载直播客户端、发送学员上课通知</div>
</div>
<div className="teacher__child__box__item ml10">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/pFbfzS5TEnrMCPTGTG6JifJ67SW7EajfXatWrSWY8HKkTPWs1581060346720" className="teacher__img" />
<p>登录电脑端</p>
<div className="teacher__child__box__item__text">直播课表<span style={{color:'#FF7519',fontSize:'14px',cursor:'pointer'}} onClick={() => {this.goclick()}}>{window.NewVersion ? 'https://b.xiaomai5.com/#/login':'https://b.xiaomai5.com/teacher.html'}</span></div>
</div>
<div className="teacher__child__box__item ml10">
<img src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/5CwYmctQdCdeQaMBJHeawhDNfd35jRCQ4MzQNnZDR5WtbbDf1581060318175" className="teacher__img" />
<p>进入直播课表</p>
<div className="teacher__child__box__item__text">通过微信家长端“服务”页面,点击“直播课”,进入直播课表</div>
</div>
</div>
}
</div> </div>
<div className="teacher__container__child student"> <div className="teacher__container__child student">
<div className="teacher__child__title"><span>学员如何观看直播?</span></div> <div className="teacher__child__title"><span>学员如何观看直播?</span></div>
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-07 16:28:49 * @Date: 2020-08-07 16:28:49
* @LastEditors: wufan * @LastEditors: renmanyi
* @LastEditTime: 2020-12-11 17:49:17 * @LastEditTime: 2023-07-10 14:32:19
* @Description: 选择学员-学员列表组件 * @Description: 选择学员-学员列表组件
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -17,9 +17,6 @@ let resourceData = {}; ...@@ -17,9 +17,6 @@ let resourceData = {};
_.map(window.RESOURCE, (item) => { _.map(window.RESOURCE, (item) => {
resourceData[item.code] = item.name; resourceData[item.code] = item.name;
}); });
const isNewVersion = window.NewVersion;
class StudentList extends React.Component { class StudentList extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -440,8 +437,6 @@ class StudentList extends React.Component { ...@@ -440,8 +437,6 @@ class StudentList extends React.Component {
scroll={{ y: 350 }} scroll={{ y: 350 }}
pagination={false} pagination={false}
/> />
{isNewVersion ? (
<PageControl <PageControl
size='small' size='small'
current={current - 1} current={current - 1}
...@@ -456,21 +451,6 @@ class StudentList extends React.Component { ...@@ -456,21 +451,6 @@ class StudentList extends React.Component {
this.props.onChange('size', size); this.props.onChange('size', size);
}} }}
/> />
) : (
<PageControl
size='small'
current={pageNo}
pageSize={pageSize}
total={totalCount}
showSizeChanger={true}
toPage={(page) => {
this.props.onChange('pageNo', page);
}}
onShowSizeChange={(pageNo, pageSize) => {
this.props.onChange('pageNo', pageSize);
}}
/>
)}
</div> </div>
); );
} }
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-07 16:23:27 * @Date: 2020-08-07 16:23:27
* @LastEditors: wufan * @LastEditors: renmanyi
* @LastEditTime: 2020-12-22 20:31:52 * @LastEditTime: 2023-07-10 14:28:06
* @Description: 选择学员组件 * @Description: 选择学员组件
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -18,7 +18,6 @@ import StudentList from './StudentList'; ...@@ -18,7 +18,6 @@ import StudentList from './StudentList';
import './index.less'; import './index.less';
const isNewVersion = window.NewVersion;
const DEFAULT_NEW_QUERY = { const DEFAULT_NEW_QUERY = {
size: 10, size: 10,
...@@ -31,19 +30,6 @@ const DEFAULT_NEW_DEDUCTION_QUERY = { ...@@ -31,19 +30,6 @@ const DEFAULT_NEW_DEDUCTION_QUERY = {
current: 1, current: 1,
status: 'NORMAL', // 学员类型, 默认显示在读学员 status: 'NORMAL', // 学员类型, 默认显示在读学员
} }
const DEFAULT_OLD_QUERY = {
pageNo: 0,
pageSize: 10,
status: 1,
}
const OLD_URL = {
1: 'api-b/b/student/list',
2: 'api-b/b/potential/list',
4: 'api-b/b/student/history/list'
}
class SelectStudent extends React.Component { class SelectStudent extends React.Component {
constructor(props) { constructor(props) {
...@@ -64,7 +50,6 @@ class SelectStudent extends React.Component { ...@@ -64,7 +50,6 @@ class SelectStudent extends React.Component {
this.state = { this.state = {
newQuery: { ...DEFAULT_NEW_QUERY }, newQuery: { ...DEFAULT_NEW_QUERY },
oldQuery: { ...DEFAULT_OLD_QUERY } ,
newDeductionQuery: { ...DEFAULT_NEW_DEDUCTION_QUERY }, newDeductionQuery: { ...DEFAULT_NEW_DEDUCTION_QUERY },
totalCount: 0, totalCount: 0,
allstudentList: [], // 学员列表 allstudentList: [], // 学员列表
...@@ -81,7 +66,6 @@ class SelectStudent extends React.Component { ...@@ -81,7 +66,6 @@ class SelectStudent extends React.Component {
// 获取学员列表 // 获取学员列表
handleFetchStudentList = () => { handleFetchStudentList = () => {
// 5.0和4.0请求学员列表的接口不一样 // 5.0和4.0请求学员列表的接口不一样
if (isNewVersion) {
const { studentType } = this.props; const { studentType } = this.props;
// 扣课时学员 // 扣课时学员
if (studentType === 'DEDUCTION') { if (studentType === 'DEDUCTION') {
...@@ -90,9 +74,6 @@ class SelectStudent extends React.Component { ...@@ -90,9 +74,6 @@ class SelectStudent extends React.Component {
// 不扣课时学员 // 不扣课时学员
this.handleFetchNewStudentList(); this.handleFetchNewStudentList();
} }
} else {
this.handleFetchOldStudentList();
}
} }
// 获取不扣课时学员列表 // 获取不扣课时学员列表
...@@ -187,51 +168,6 @@ class SelectStudent extends React.Component { ...@@ -187,51 +168,6 @@ class SelectStudent extends React.Component {
}); });
} }
handleFetchOldStudentList = () => {
const { oldQuery } = this.state;
const { studentType } = this.props;
const {
pageNo, pageSize, courseId, saleId, status,
classId, teacherId, nameOrPhone, resourceType
} = oldQuery;
const _query = {
pageNo,
pageSize,
saleId,
courseId,
classId,
teacherId,
nameOrPhone,
resourceType,
}
window.axios.post(OLD_URL[status], _query)
.then((res) => {
let studentVOList = [];
let totalCount = 0;
if (status !== 4) {
const { data = {} } = res || {};
studentVOList = data.studentVOList;
totalCount = data.totalCount;
} else {
studentVOList = res.data;
totalCount = res.totalCount;
}
const allstudentList = _.map(studentVOList, item => ({
...item,
key: item.studentId,
studentId: item.studentId
}));
this.setState({
totalCount,
allstudentList,
})
})
}
// 修改学员类型,清空搜索条件 // 修改学员类型,清空搜索条件
handleChangeStatus = (e) => { handleChangeStatus = (e) => {
const { value } = e.target; const { value } = e.target;
...@@ -310,10 +246,6 @@ class SelectStudent extends React.Component { ...@@ -310,10 +246,6 @@ class SelectStudent extends React.Component {
...DEFAULT_NEW_QUERY, ...DEFAULT_NEW_QUERY,
status: newQuery.status status: newQuery.status
}, },
oldQuery: {
...DEFAULT_OLD_QUERY,
status: oldQuery.status
},
newDeductionQuery: { newDeductionQuery: {
...DEFAULT_NEW_DEDUCTION_QUERY ...DEFAULT_NEW_DEDUCTION_QUERY
} }
...@@ -365,10 +297,8 @@ class SelectStudent extends React.Component { ...@@ -365,10 +297,8 @@ class SelectStudent extends React.Component {
} = this.state; } = this.state;
const { status: newStatus } = newQuery; const { status: newStatus } = newQuery;
const { status: oldStatus } = oldQuery const status = newStatus;
const status = isNewVersion ? newStatus : oldStatus; const query = studentType === 'DEDUCTION' ? newDeductionQuery : newQuery ;
const query = isNewVersion ? studentType === 'DEDUCTION' ? newDeductionQuery : newQuery : oldQuery;
return ( return (
<Modal <Modal
...@@ -388,9 +318,9 @@ class SelectStudent extends React.Component { ...@@ -388,9 +318,9 @@ class SelectStudent extends React.Component {
onChange={this.handleChangeStatus} onChange={this.handleChangeStatus}
value={status} value={status}
> >
<Radio.Button value={isNewVersion ? 'POTENTIAL' : 2}>潜在学员</Radio.Button> <Radio.Button value='POTENTIAL'>潜在学员</Radio.Button>
<Radio.Button value={isNewVersion ? 'NORMAL' : 1}>在读学员</Radio.Button> <Radio.Button value='NORMAL'>在读学员</Radio.Button>
<Radio.Button value={isNewVersion ? 'HISTORY' : 4}>历史学员</Radio.Button> <Radio.Button value='HISTORY'>历史学员</Radio.Button>
</Radio.Group> </Radio.Group>
} }
......
...@@ -36,7 +36,7 @@ function DiskList(props) { ...@@ -36,7 +36,7 @@ function DiskList(props) {
<a <a
className='guide-href' className='guide-href'
href={window.NewVersion ? 'https://mp.weixin.qq.com/s/s0XN0Gk4Xul192SmTd6znw' : 'https://mp.weixin.qq.com/s/2EMWaaa3LQwkJd59bmy8pA'} href='https://mp.weixin.qq.com/s/s0XN0Gk4Xul192SmTd6znw'
target='_blank'> target='_blank'>
进一步了解素材库 进一步了解素材库
</a> </a>
......
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