mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 03:21:06 +08:00
线上课列表渲染优化
This commit is contained in:
@@ -43,8 +43,6 @@ export const ResourceImagesPage = () => {
|
||||
const [hoverArr, setHoverArr] = useState<any>([]);
|
||||
const [selLabel, setLabel] = useState<string>("全部图片");
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [categoryCount, setCategoryCount] = useState<any>({});
|
||||
const [pureTotal, setPureTotal] = useState(0);
|
||||
|
||||
// 删除图片
|
||||
const removeResource = () => {
|
||||
@@ -89,8 +87,6 @@ export const ResourceImagesPage = () => {
|
||||
}
|
||||
setVisibleArr(arr);
|
||||
setHoverArr(arr);
|
||||
setCategoryCount(res.data.category_count);
|
||||
setPureTotal(res.data.pure_total);
|
||||
setLoading(false);
|
||||
})
|
||||
.catch((err: any) => {
|
||||
@@ -156,8 +152,6 @@ export const ResourceImagesPage = () => {
|
||||
<TreeCategory
|
||||
type="no-cate"
|
||||
text={"图片"}
|
||||
categoryCount={categoryCount}
|
||||
resourceTotal={pureTotal}
|
||||
onUpdate={(keys: any, title: any) => {
|
||||
setCategoryIds(keys);
|
||||
if (typeof title == "string") {
|
||||
|
||||
@@ -29,8 +29,6 @@ export const ResourceVideosPage = () => {
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
const [category_ids, setCategoryIds] = useState<any>([]);
|
||||
const [selLabel, setLabel] = useState<string>("全部视频");
|
||||
const [categoryCount, setCategoryCount] = useState<any>({});
|
||||
const [pureTotal, setPureTotal] = useState(0);
|
||||
|
||||
const columns: ColumnsType<DataType> = [
|
||||
// {
|
||||
@@ -129,8 +127,6 @@ export const ResourceVideosPage = () => {
|
||||
setVideoList(res.data.result.data);
|
||||
setVideoExtra(res.data.videos_extra);
|
||||
setAdminUsers(res.data.admin_users);
|
||||
setCategoryCount(res.data.category_count);
|
||||
setPureTotal(res.data.pure_total);
|
||||
setLoading(false);
|
||||
})
|
||||
.catch((err: any) => {
|
||||
@@ -170,9 +166,7 @@ export const ResourceVideosPage = () => {
|
||||
<div className="left-box">
|
||||
<TreeCategory
|
||||
type="no-cate"
|
||||
resourceTotal={pureTotal}
|
||||
text={"视频"}
|
||||
categoryCount={categoryCount}
|
||||
onUpdate={(keys: any, title: any) => {
|
||||
setCategoryIds(keys);
|
||||
if (typeof title == "string") {
|
||||
|
||||
Reference in New Issue
Block a user