Commit 522a961c by zhangleyuan

feat:联调创建课程页面的接口

parent 40ddb88c
......@@ -253,28 +253,7 @@ class AddLive extends React.Component {
// });
// })
}
getCourseCatalogList = ()=>{
StoreService.getCourseCatalogList({current:1,size:1000}).then((res) => {
// let resultData = this.handleCatalogListData(res.result.records)
// setCourseCatalogList(resultData);
// setTotal(res.result.total);
});
}
handleCatalogListData = (listData)=>{
// listData.map((item:any,index:any) => {
// item.type = "parent"
// item.key = item.id;
// if(item.sonCategoryList){
// item.sonCategoryList.map((_item:any,_index:any) =>{
// _item.type = "child";
// _item.key=_item.id
// return _item
// });
// }
// return item
// })
// return listData
}
// 修改基本信息
handleChangeBasicInfo = (field, value, _coverUrl) => {
const { coverUrl } = this.state.addLiveBasicInfo;
......
......@@ -21,16 +21,34 @@ class AddLiveBasic extends React.Component {
constructor(props) {
super(props);
this.state = {
xhr: null,
imageFile: null,
showCutModal: false
showCutModal: false,
courseCatalogList:[]
}
}
componentWillUnmount() {
const { xhr } = this.state;
xhr && xhr.abort();
this.getCourseCatalogList()
}
getCourseCatalogList = ()=>{
// StoreService.getCourseCatalogList({current:1,size:1000}).then((res) => {
// });
}
handleCatalogListData = (listData)=>{
// listData.map((item,index) => {
// item.key = item.id;
// 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) => {
const imageFile = event.target.files[0];
......
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