Skip to content

Let's use AI to Earn!

youtube

I5bijibne3ce6b1f24df0
diff --git a/src/components/PublishDialog/compoents/PlatParamsSetting/plats/YouTubeParams.tsx b/src/components/PublishDialog/compoents/PlatParamsSetting/plats/YouTubeParams.tsx
index 7aa4cd9e..dec50ba1 100644
--- a/src/components/PublishDialog/compoents/PlatParamsSetting/plats/YouTubeParams.tsx
+++ b/src/components/PublishDialog/compoents/PlatParamsSetting/plats/YouTubeParams.tsx
@@ -136,7 +136,10 @@ const YouTubeParams = memo(
<div className="platParamsSetting-label">{t("form.category")}</div>
<Select
style={{ width: "100%" }}
- options={youTubeCategories}
+ options={youTubeCategories.map((item) => ({
+ label: item.snippet.title,
+ value: item.id,
+ }))}
value={pubItem.params.option.youtube?.categoryId}
onChange={(value) => {
const option = pubItem.params.option;
@@ -154,10 +157,6 @@ const YouTubeParams = memo(
showSearch={true}
placeholder={pubItem.params.option.youtube?.regionCode ? t("form.categoryPlaceholder") : t("form.categoryPlaceholderDisabled")}
disabled={!pubItem.params.option.youtube?.regionCode}
- fieldNames={{
- label: "etag",
- value: "etag",
- }}
/>
</div>
</>
diff --git a/src/components/PublishDialog/publishDialog.type.ts b/src/components/PublishDialog/publishDialog.type.ts
index 056416d2..147933c8 100644
--- a/src/components/PublishDialog/publishDialog.type.ts
+++ b/src/components/PublishDialog/publishDialog.type.ts
@@ -99,6 +99,8 @@ export interface BiblPartItem {
// YouTube视频分类 item
export interface YouTubeCategoryItem {
id: string;
- name: string;
- description?: string;
+ snippet: {
+ title: string;
+ description?: string;
+ };
}