Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
threads, location_id
bulaienaofutuojiesenzhangc4ba16d95144
diff --git a/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsx b/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsxindex 9a2bca93..cb8a7a1d 100644--- a/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsx+++ b/src/components/PublishDialog/compoents/PlatParamsSetting/plats/ThreadsParams.tsx@@ -35,7 +35,6 @@ const ThreadsParams = memo(option: {...option,threads: {- location_id: null,},},},@@ -88,16 +87,27 @@ const ThreadsParams = memo(// 处理位置选择const handleLocationChange = (locationId: string) => {+const selectedLocation = locations.find(loc => loc.id === locationId);const option = pubItem.params.option;++ // 构建 threads 对象,如果没有选择位置则不包含 location_id+ const threadsOption = {+ ...option.threads,+ };++ if (selectedLocation?.id) {+ threadsOption.location_id = selectedLocation.id;+ } else {+ // 如果没有选择位置,删除 location_id 属性+ delete threadsOption.location_id;+ }+setOnePubParams({option: {...option,- threads: {- ...option.threads,- location_id: selectedLocation?.id || null,- },+ threads: threadsOption,},},pubItem.account.id,