Skip to content

Let's use AI to Earn!

fix: 修复了好友数据不现实的bug

gaoSir12f135b00260
diff --git a/src/index.css b/src/index.css
index 107237d5..89c03e38 100644
--- a/src/index.css
+++ b/src/index.css
@@ -7,6 +7,10 @@ body {
color: #222;
}
+.ant-tabs-dropdown {
+ z-index: 10000000;
+}
+
/* 确保根元素和 body 占满整个视口高度 */
html, body, #root {
@apply h-full w-full m-0 p-0;
diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/useDebounceFetcher.ts b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/useDebounceFetcher.ts
index c7a5f02e..cd5f4d7b 100644
--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/useDebounceFetcher.ts
+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/useDebounceFetcher.ts
@@ -21,6 +21,7 @@ export default function useDebounceFetcher<T>(
return;
}
+ console.log(newOptions);
setOptions(newOptions);
setFetching(false);
});
diff --git a/src/views/publish/components/CommonComponents/CommonUserSelect.tsx b/src/views/publish/components/CommonComponents/CommonUserSelect.tsx
index e2a49002..df188108 100644
--- a/src/views/publish/components/CommonComponents/CommonUserSelect.tsx
+++ b/src/views/publish/components/CommonComponents/CommonUserSelect.tsx
@@ -38,8 +38,7 @@ export default function CommonUserSelect({
keyword: keywords || '',
account: account!,
});
- const data = await accountFailureDispose(res, account!, onAccountChange);
- setOptions(data);
+ return await accountFailureDispose(res, account!, onAccountChange);
};
useEffect(() => {
diff --git a/src/views/publish/components/CommonComponents/DouyinCommonComponents.tsx b/src/views/publish/components/CommonComponents/DouyinCommonComponents.tsx
index 2b7d989f..ad0fb340 100644
--- a/src/views/publish/components/CommonComponents/DouyinCommonComponents.tsx
+++ b/src/views/publish/components/CommonComponents/DouyinCommonComponents.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useRef, useState } from 'react';
+import React, { useEffect, useMemo, useRef, useState } from 'react';
import {
DouyinActivity,
DouyinActivityDetailResponse,
@@ -15,15 +15,15 @@ import {
} from '../../../../icp/publish';
import {
Button,
- Checkbox,
+ Checkbox, Empty,
message,
Modal,
Select,
SelectProps,
Spin,
Tabs,
- Tooltip,
-} from 'antd';
+ Tooltip
+} from "antd";
import { QuestionCircleOutlined } from '@ant-design/icons';
import styles from './commonComponents.module.scss';
import { describeNumber } from '../../../../utils';
@@ -177,6 +177,11 @@ export const CommonActivitySelect = ({
setValue(props.value || []);
};
+ // 选择标签筛选后的数据
+ const tagActivityData = useMemo(() => {
+ return options?.filter((v) => v.query_tag === +activityTag);
+ }, [activityTag, options]);
+
return (
<>
<Modal
@@ -265,9 +270,8 @@ export const CommonActivitySelect = ({
};
})}
/>
- {options
- ?.filter((v) => v.query_tag === +activityTag)
- .map((data) => {
+ {tagActivityData && tagActivityData.length !== 0 ? (
+ tagActivityData?.map((data) => {
return (
<div
className={styles.activitySelect}
@@ -321,7 +325,10 @@ export const CommonActivitySelect = ({
</div>
</div>
);
- })}
+ })
+ ) : (
+ <Empty />
+ )}
</Modal>
<h1>