Commit 471a280f by zhangleyuan

feat:联调创建直播页的接口

parent b777a34e
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
"@typescript-eslint/parser": "^2.10.0", "@typescript-eslint/parser": "^2.10.0",
"ali-oss": "^6.12.0", "ali-oss": "^6.12.0",
"antd": "^4.8.5", "antd": "^4.8.5",
"array-move": "^3.0.1",
"axios": "^0.20.0", "axios": "^0.20.0",
"babel-eslint": "10.1.0", "babel-eslint": "10.1.0",
"babel-jest": "^24.9.0", "babel-jest": "^24.9.0",
......
...@@ -8,14 +8,13 @@ ...@@ -8,14 +8,13 @@
import React from 'react'; import React from 'react';
import { Input, Button, message ,Cascader } from 'antd'; import { Input, Button, message ,Cascader } from 'antd';
import UploadOss from "@/core/upload"; import UploadOss from "@/core/upload";
import { ImgCutModalNew } from '@/components'; import { ImgCutModalNew } from '@/components';
import StoreService from "@/domains/store-domain/storeService";
import './AddLiveBasic.less'; import './AddLiveBasic.less';
const defaultCover = 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'; const defaultCover = 'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png';
const fieldNames = { label: 'categoryName', value: 'id', children: 'sonCategoryList' };
class AddLiveBasic extends React.Component { class AddLiveBasic extends React.Component {
constructor(props) { constructor(props) {
...@@ -27,28 +26,18 @@ class AddLiveBasic extends React.Component { ...@@ -27,28 +26,18 @@ class AddLiveBasic extends React.Component {
} }
} }
componentWillUnmount() { componentWillUnmount() {
this.getCourseCatalogList()
} }
getCourseCatalogList = ()=>{ componentDidMount(){
// StoreService.getCourseCatalogList({current:1,size:1000}).then((res) => { this.getCourseCatalogList();
// });
} }
handleCatalogListData = (listData)=>{ getCourseCatalogList = ()=>{
// listData.map((item,index) => { StoreService.getCourseCatalogList({current:1,size:1000}).then((res) => {
this.setState({
// item.key = item.id; courseCatalogList:res.result.records
// if(item.sonCategoryList){ })
// item.sonCategoryList.map((_item:any,_index:any) =>{ });
// _item.type = "child";
// _item.key=_item.id
// return _item
// });
// }
// return item
// })
// return listData
} }
// 上传封面图 // 上传封面图
handleShowImgCutModal = (event) => { handleShowImgCutModal = (event) => {
const imageFile = event.target.files[0]; const imageFile = event.target.files[0];
...@@ -87,9 +76,9 @@ class AddLiveBasic extends React.Component { ...@@ -87,9 +76,9 @@ class AddLiveBasic extends React.Component {
} }
} }
render() { render() {
const { showCutModal, imageFile } = this.state; const { showCutModal, imageFile,courseCatalogList} = this.state;
const { data, liveScene } = this.props; const { data, liveScene } = this.props;
const { courseName, coverUrl , courseCatalogOption} = data; const { courseName, coverUrl} = data;
const fileName = ''; const fileName = '';
// 当前是否使用的是默认图片 // 当前是否使用的是默认图片
...@@ -144,7 +133,7 @@ class AddLiveBasic extends React.Component { ...@@ -144,7 +133,7 @@ class AddLiveBasic extends React.Component {
</div> </div>
<div className="course-catalog"> <div className="course-catalog">
<span className="label"><span className="require">*</span>课程分类:</span> <span className="label"><span className="require">*</span>课程分类:</span>
<Cascader options={courseCatalogOption} displayRender={ label => label.join('-')} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" /> <Cascader options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" />
</div> </div>
<ImgCutModalNew <ImgCutModalNew
title="裁剪" title="裁剪"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import React from 'react'; import React from 'react';
import {TimePicker, Select, Spin, Tooltip } from 'antd'; import {TimePicker, Select, Spin, Tooltip } from 'antd';
import {InfoCircleFilled} from '@ant-design/icons'; import {InfoCircleFilled} from '@ant-design/icons';
import StoreService from "@/domains/store-domain/storeService";
// import TeacherSelectV5 from "@/modules/classManage_V5/classDetail/TeacherSelectV5"; // import TeacherSelectV5 from "@/modules/classManage_V5/classDetail/TeacherSelectV5";
...@@ -29,17 +29,44 @@ class AddLiveClass extends React.Component { ...@@ -29,17 +29,44 @@ class AddLiveClass extends React.Component {
this.state = { this.state = {
loading: false, loading: false,
hasNext: false, hasNext: false,
isUltimateEdition: false, // 是否是旗舰版 teacherQuery: defaultQuery,
query: defaultQuery, teacherList:[],
assistantList: [], // 助教老师列表 assistantList: [], // 助教老师列表
_assistantList: [],
addLiveType: props.addLiveType addLiveType: props.addLiveType
} }
} }
componentWillMount() { componentDidMount() {
this.getTeacherList();
this.getAssistantList(); this.getAssistantList();
} }
getTeacherList(current = 1, selectList){
const { teacherQuery,} = this.state;
const idList = selectList ? selectList : [];
const _query = {
...teacherQuery,
current,
idList,
size: idList.length <= 10 ? 10 : idList.length + 10
};
StoreService.getEmployeeList( _query).then((res) => {
// const { result = {} } = res;
// const { records = [], total = 0, hasNext } = result;
// const list = current > 1 ? assistantList.concat(records) : records;
// const _assistantList = _.uniq(
// selectedAssistant.concat(
// _.reject(list, (item) => item.id === teacherId)
// ),
// false,
// (item) => item.id
// );
// this.setState({
// hasNext,
// assistantList: list,
// _assistantList: _assistantList
// })
});
}
// 获取助教老师列表 // 获取助教老师列表
getAssistantList = (current = 1, selectList) => { getAssistantList = (current = 1, selectList) => {
// const { query, assistantList } = this.state; // const { query, assistantList } = this.state;
......
/* /*
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: wufan * @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-14 14:16:15 * @LastEditTime: 2020-12-14 18:24:09
* @Description: 员工管理页面 * @Description: 员工管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
......
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