Commit e3fdcc84 by yuananting

fix:解决合并代码的冲突

parents f213070b 831c59da
......@@ -2,15 +2,14 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditTime: 2021-07-18 16:54:33
* @LastEditTime: 2021-07-23 14:26:26
* @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import React from 'react'
import { Button, Input, message, Modal, Tooltip, Form, Popconfirm, Menu, Dropdown, Cascader } from 'antd'
import { Button, Input, message, Modal, Cascader, Tooltip, Form, Popconfirm, Menu, Dropdown } from 'antd'
import { FileTypeIcon } from '@/common/constants/academic/lessonEnum'
import { CourseCatalogSelect } from '@/modules/common/'
import ShowTips from '@/components/ShowTips'
import Breadcrumbs from '@/components/Breadcrumbs'
import moment from 'moment'
......@@ -122,8 +121,19 @@ class AddVideoCourse extends React.Component {
}
catalogChange = (value, _categoryName) => {
console.log(value, _categoryName)
this.setState({ categoryId: value, categoryName: _categoryName[0] })
const categoryName = _.pluck(_categoryName, 'categoryName').join('-')
const changeValueLength = value.length
switch (changeValueLength) {
case 1:
this.setState({ categoryId: value[0], categoryName })
break
case 2:
this.setState({ categoryId: value[1], categoryName })
break
default:
this.setState({ categoryId: null })
break
}
}
// 获取线上课详情
handleFetchScheudleDetail = (courseId) => {
......@@ -712,7 +722,6 @@ class AddVideoCourse extends React.Component {
imageFile,
selectTypeList,
accept,
categoryId,
} = this.state
const defaultCover = 'https://image.xiaomaiketang.com/xm/TwtGPQGE4K.png'
const isDefaultCover = coverUrl === defaultCover || coverUrl == null
......@@ -907,7 +916,6 @@ class AddVideoCourse extends React.Component {
}
/>
)}
{/* <CourseCatalogSelect courseCatalogList={courseCatalogList} value={categoryId} onChange={this.catalogChange} /> */}
</div>
<div className='intro-info mt16'>
<AddVideoIntro
......
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