Commit 463df389 by zhangleyuan

feat:联调视频课的相关接口

parent fdf7e07d
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-12-12 11:57:10
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-16 16:14:42
* @LastEditTime: 2020-12-25 17:48:50
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -48,4 +48,29 @@ export function turnOnOrOffLiveCloudCourse(params: object) {
}
export function delLiveCloudCourse(params: object) {
return Service.Hades("public/courseCloud/delLiveCloudCourse", params);
}
//视频课相关接口
export function changeVideoShelfState(params: object) {
return Service.Hades("public/hades/changeVideoShelfState", params);
}
export function createVideoSchedule(params: object) {
return Service.Hades("public/hades/createVideoSchedule", params);
}
export function delVideoSchedule(params: object) {
return Service.Hades("public/hades/delVideoSchedule", params);
}
export function editVideoSchedule(params: object) {
return Service.Hades("public/hades/editVideoSchedule", params);
}
export function userWatchInfo(params: object) {
return Service.Hades("public/hades/userWatchInfo", params);
}
export function videoScheduleDetail(params: object) {
return Service.Hades("public/hades/videoScheduleDetail", params);
}
export function videoSchedulePage(params: object) {
return Service.Hades("public/hades/videoSchedulePage", params);
}
export function videoWatchInfo(params: object) {
return Service.Hades("public/hades/videoWatchInfo", params);
}
\ No newline at end of file
/*
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2020-12-22 16:24:25
* @LastEditTime: 2020-12-25 18:27:55
* @LastEditors: zhangleyuan
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
......@@ -9,7 +9,7 @@
import { MapInterface } from '@/domains/basic-domain/interface'
// 默认是 dev 环境
const ENV: string = process.env.DEPLOY_ENV || 'dev';
const ENV: string = process.env.DEPLOY_ENV || 'dev1';
console.log("process.env.DEPLOY_ENV",process)
const BASIC_HOST_MAP: MapInterface = {
dev: 'https://dev-heimdall.xiaomai5.com/',
......
......@@ -2,11 +2,12 @@
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-16 16:15:15
* @LastEditTime: 2020-12-25 18:21:33
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import { fetchLecturerData, fetchUserData, exportStudentCourseData,exportPlayBackCourseData, fetchPlaybackList,createLiveCloudCourse,getLiveCloudCoursePage,getLiveCloudCourseDetail,updateLiveCloudCourse,turnOnOrOffLiveCloudCourse,delLiveCloudCourse} from '@/data-source/course/request-api';
import { fetchLecturerData, fetchUserData, exportStudentCourseData,exportPlayBackCourseData, fetchPlaybackList,createLiveCloudCourse,getLiveCloudCoursePage,
getLiveCloudCourseDetail,updateLiveCloudCourse,turnOnOrOffLiveCloudCourse,delLiveCloudCourse,changeVideoShelfState,createVideoSchedule,delVideoSchedule,editVideoSchedule,userWatchInfo,videoSchedulePage,videoScheduleDetail,videoWatchInfo} from '@/data-source/course/request-api';
export default class courseService {
// 获取讲师上课数据
......@@ -52,4 +53,28 @@ export default class courseService {
static delLiveCloudCourse(params: any) {
return delLiveCloudCourse(params);
}
static changeVideoShelfState(params: any) {
return changeVideoShelfState(params);
}
static createVideoSchedule(params: any) {
return createVideoSchedule(params);
}
static delVideoSchedule(params: any) {
return delVideoSchedule(params);
}
static editVideoSchedule(params: any) {
return editVideoSchedule(params);
}
static userWatchInfo(params: any) {
return userWatchInfo(params);
}
static videoSchedulePage(params: any) {
return videoSchedulePage(params);
}
static videoScheduleDetail(params: any) {
return videoScheduleDetail(params);
}
static videoWatchInfo(params: any) {
return videoWatchInfo(params);
}
}
\ No newline at end of file
/*
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @LastEditors: wufan
* @LastEditTime: 2020-12-12 11:18:53
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-25 18:27:16
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import { MapInterface } from '@/domains/basic-domain/interface'
const ENV: string = process.env.DEPLOY_ENV || 'dev';
const ENV: string = process.env.DEPLOY_ENV || 'dev1';
const appIdMap: MapInterface = {
dev: 'wx3ea60e78ddfa277e',
......
......@@ -2,18 +2,19 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:11:57
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-25 14:45:09
* @LastEditTime: 2020-12-25 17:37:58
* @Description: 视频课-搜索模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import React from 'react';
import { Row, Input, Select } from 'antd';
import { Row, Input, Select,Tooltip } from 'antd';
import RangePicker from "@/modules/common/DateRangePicker";
// import TeacherSelectV5 from '@/modules/classManage_V5/classDetail/TeacherSelectV5';
import './VideoCourseFilter.less';
import StoreService from "@/domains/store-domain/storeService";
const { Search } = Input;
const { Option } = Select;
......@@ -23,6 +24,12 @@ const DEFAULT_QUERY = {
teacherId: null, // 创建人
beginTime: null, // 开始日期
endTime: null, // 结束日期
shelfState:null,
}
const defaultTeacherQuery = {
size: 10,
current: 1,
nickName:null
}
class VideoCourseFilter extends React.Component {
......@@ -30,9 +37,41 @@ class VideoCourseFilter extends React.Component {
super(props);
this.state = {
query: { ...DEFAULT_QUERY }, // 使用扩展运算符,避免浅拷贝
teacherQuery: defaultTeacherQuery,
teacherList:[],
expandFilter:false
}
}
componentDidMount() {
this.getTeacherList();
}
getTeacherList(current = 1, selectList){
const { teacherQuery,teacherList} = this.state;
const _query = {
...teacherQuery,
current,
size:10
};
StoreService.getStoreUserBasicPage( _query).then((res) => {
const { result = {} } = res;
const { records = [], total = 0, hasNext } = result;
const list = current > 1 ? teacherList.concat(records) : records;
this.setState({
hasNext,
teacherList: list,
})
});
}
// 滑动加载更多讲师列表
handleScrollTeacherList = (e) => {
const { hasNext } = this.state;
const container = e.target;
const scrollToBottom = container && container.scrollHeight <= container.clientHeight + container.scrollTop;
if (scrollToBottom && hasNext) {
const { teacherQuery } = this.state;
this.getTeacherList(teacherQuery.current + 1);
}
}
// 改变搜索条件
handleChangeQuery = (field, value) => {
this.setState({
......@@ -74,7 +113,6 @@ class VideoCourseFilter extends React.Component {
}
render() {
const {
query: {
scheduleName,
......@@ -82,7 +120,11 @@ class VideoCourseFilter extends React.Component {
beginTime,
endTime,
teacherId,
}
shelfState
},
expandFilter,
teacherList,
teacherQuery
} = this.state;
return (
......@@ -90,18 +132,44 @@ class VideoCourseFilter extends React.Component {
<Row type="flex" justify="space-between" align="top">
<div className="search-condition">
<div className="search-condition__item">
<span className="search-name">视频课:</span>
<span className="search-name">视频课名称</span>
<Search
value={scheduleName}
placeholder="搜索视频课名称"
onChange={(e) => { this.handleChangeQuery('scheduleName', e.target.value)}}
onSearch={ () => { this.props.onChange(this.state.query) } }
style={{ width: "calc(100% - 70px)" }}
style={{ width: "calc(100% - 84px)" }}
/>
</div>
<div className="search-condition__item">
<span>创建人:</span>
<Select
placeholder="请选择创建人"
style={{width:"calc(100% - 70px)"}}
showSearch
allowClear
filterOption={(input, option) => option}
onPopupScroll={this.handleScrollTeacherList}
value={teacherId}
onChange={(value) => {
this.handleChangeQuery('teacherId', value)
}}
onSearch={(value) => {
teacherQuery.nickName = value
this.setState({
teacherQuery
}, () => {
this.getTeacherList()
})
}}
>
{_.map(teacherList, (item, index) => {
return (
<Select.Option value={item.userId} key={item.userId}>{item.nickName}</Select.Option>
);
})}
</Select>
{/* <TeacherSelectV5
ref="TeacherSelect"
showSearch={true}
......@@ -125,14 +193,28 @@ class VideoCourseFilter extends React.Component {
style={{ width: "calc(100% - 70px)" }}
/>
</div>
{ expandFilter &&
<div className="search-condition__item">
<span className="shelf-status">店铺展示:</span>
<Select
style={{ width: "calc(100% - 84px)" }}
placeholder="请选择"
allowClear={true}
value={shelfState}
onChange={(value) => { this.handleChangeQuery('shelfState', value) }}
>
<Option value="YES">开启</Option>
<Option value="NO">关闭</Option>
</Select>
</div>
}
</div>
<span
className="icon iconfont"
onClick={this.handleReset}
>
&#xe6a3;
</span>
<div className="reset-fold-area">
<Tooltip title="清空筛选"><span className="resetBtn iconfont icon" onClick={this.handleReset}>&#xe61b; </span></Tooltip>
<span style={{ cursor: 'pointer' }} className="fold-btn" onClick={() => {
this.setState({expandFilter:!expandFilter});
}}>{this.state.expandFilter ? <span><span>收起</span><span className="iconfont icon fold-icon" >&#xe82d; </span> </span> : <span>展开<span className="iconfont icon fold-icon" >&#xe835; </span></span>}</span>
</div>
</Row>
</div>
)
......
.video-course-filter {
position: relative;
.search-condition {
width: 100%;
width: calc(100% - 80px);
display: flex;
align-items: center;
flex-wrap: wrap;
&__item {
width: 30%;
margin-right: 3%;
margin-bottom: 12px;
.search-name{
vertical-align: middle;
}
.shelf-status{
width:84px;
display:inline-block;
text-align:right;
}
}
}
.iconfont {
.reset-fold-area {
position: absolute;
right: 12px;
cursor: pointer;
}
}
\ No newline at end of file
.resetBtn {
color: #999999;
font-size: 18px;
margin-right: 8px;
}
.fold-btn {
font-size: 14px;
color: #666666;
line-height: 20px;
.fold-icon {
font-size: 12px;
}
}
}
.data-icon {
cursor: pointer;
}
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-25 14:54:53
* @LastEditTime: 2020-12-25 18:27:35
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -17,7 +17,7 @@ import ShareLiveModal from '@/modules/course-manage/modal/ShareLiveModal';
import './VideoCourseList.less';
const ENV = process.env.DEPLOY_ENV || 'dev';
const ENV = process.env.DEPLOY_ENV || 'dev1';
class VideoCourseList extends React.Component {
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:08:06
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-25 15:06:21
* @LastEditTime: 2020-12-25 18:22:20
* @Description: 云课堂-视频课入口页面
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -12,7 +12,7 @@ import React from 'react';
import VideoCourseFilter from './components/VideoCourseFilter';
import VideoCourseOpt from './components/VieoCourseOpt';
import VideoCourseList from './components/VideoCourseList';
import CourseService from "@/domains/course-domain/CourseService";
class VideoCourse extends React.Component {
constructor(props) {
......@@ -45,14 +45,14 @@ class VideoCourse extends React.Component {
// 更新请求参数
this.setState({ query });
// window.axios.Apollo('public/apollo/lessonScheduleListPage', query).then((res) => {
// const { result = {} } = res || {};
// const { records = [], total = 0 } = result;
// this.setState({
// dataSource: records,
// totalCount: Number(total)
// });
// });
CourseService.videoSchedulePage(query).then((res) => {
const { result = {} } = res || {};
const { records = [], total = 0 } = result;
this.setState({
dataSource: records,
totalCount: Number(total)
});
});
}
render() {
......
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