Commit 463df389 by zhangleyuan

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

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