mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 05:39:38 +08:00
资源分类
This commit is contained in:
@@ -18,7 +18,7 @@ export const CreateResourceCategory = (props: PropInterface) => {
|
||||
return;
|
||||
}
|
||||
resourceCategory
|
||||
.storeResourceCategory(props.type, name, 0)
|
||||
.storeResourceCategory(name, 0, 0)
|
||||
.then(() => {
|
||||
setName("");
|
||||
message.success("分类添加成功");
|
||||
|
||||
@@ -26,6 +26,7 @@ const items = [
|
||||
"3",
|
||||
<MailOutlined />,
|
||||
[
|
||||
getItem("资源分类", "/resource-category", null, null, null),
|
||||
getItem("视频", "/videos", null, null, null),
|
||||
getItem("图片", "/images", null, null, null),
|
||||
],
|
||||
|
||||
@@ -60,7 +60,7 @@ export const UploadImageButton = (props: PropsInterface) => {
|
||||
|
||||
// 获取图片资源的分类
|
||||
const getCategories = () => {
|
||||
resourceCategory.resourceCategoryList("IMAGE").then((res: any) => {
|
||||
resourceCategory.resourceCategoryList().then((res: any) => {
|
||||
let data = res.data.data;
|
||||
if (data.length > 0) {
|
||||
setCategories([...categories, ...res.data.data]);
|
||||
|
||||
Reference in New Issue
Block a user