Commit 49debeec by chenshu

feat:初始化

parent 62f7ae6b
...@@ -301,7 +301,6 @@ class AddGraphicsCourse extends React.Component { ...@@ -301,7 +301,6 @@ class AddGraphicsCourse extends React.Component {
//上传图片 //上传图片
uploadCoverImage = (imageFile) => { uploadCoverImage = (imageFile) => {
debugger
const { folderName } = imageFile; const { folderName } = imageFile;
const fileName = window.random_string(16) + folderName.slice(folderName.lastIndexOf(".")); const fileName = window.random_string(16) + folderName.slice(folderName.lastIndexOf("."));
const self = this; const self = this;
......
...@@ -301,7 +301,6 @@ class AddOfflineCourse extends React.Component { ...@@ -301,7 +301,6 @@ class AddOfflineCourse extends React.Component {
//上传图片 //上传图片
uploadCoverImage = (imageFile) => { uploadCoverImage = (imageFile) => {
debugger
const { folderName } = imageFile; const { folderName } = imageFile;
const fileName = window.random_string(16) + folderName.slice(folderName.lastIndexOf(".")); const fileName = window.random_string(16) + folderName.slice(folderName.lastIndexOf("."));
const self = this; const self = this;
...@@ -504,6 +503,16 @@ class AddOfflineCourse extends React.Component { ...@@ -504,6 +503,16 @@ class AddOfflineCourse extends React.Component {
}); });
} }
// 使用默认封面图
handleResetCoverUrl = () => {
const { coverUrl } = this.state;
const isDefaultCover = coverUrl === defaultCoverUrl;
// 如果已经是默认图的话,不做任何任何处理
if (isDefaultCover) return;
message.success('已替换为默认图');
this.setState({ coverUrl: defaultCoverUrl });
}
render() { render() {
const { const {
id, id,
...@@ -573,7 +582,7 @@ class AddOfflineCourse extends React.Component { ...@@ -573,7 +582,7 @@ class AddOfflineCourse extends React.Component {
<div className="opt-btns"> <div className="opt-btns">
<Button onClick={() => { <Button onClick={() => {
this.setState({ this.setState({
showSelectFileModal: true showSelectCoverModal: true
}) })
}}>上传图片</Button> }}>上传图片</Button>
<span <span
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-06-09 09:47:44 * @Date: 2020-06-09 09:47:44
* @Last Modified by: 吴文洁 * @Last Modified by: chenshu
* @Last Modified time: 2020-07-16 17:53:33 * @Last Modified time: 2021-05-08 10:46:44
* @Description: 文件夹管理 * @Description: 文件夹管理
*/ */
...@@ -113,7 +113,6 @@ class FolderManage extends React.Component { ...@@ -113,7 +113,6 @@ class FolderManage extends React.Component {
// 判断是否继承了父级文件权限 // 判断是否继承了父级文件权限
if (records.length > 0 && !records[0].rights) { if (records.length > 0 && !records[0].rights) {
// debugger
records.map((item,index) => { records.map((item,index) => {
item.rights = parentRights; item.rights = parentRights;
_records.push(item); _records.push(item);
...@@ -149,7 +148,6 @@ class FolderManage extends React.Component { ...@@ -149,7 +148,6 @@ class FolderManage extends React.Component {
// 判断是否继承了父级文件权限 // 判断是否继承了父级文件权限
if (records.length > 0 && !records[0].rights) { if (records.length > 0 && !records[0].rights) {
// debugger
records.map((item,index) => { records.map((item,index) => {
item.rights = _parentRights; item.rights = _parentRights;
_records.push(item); _records.push(item);
......
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