Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
修复爆款标题更换平台数据未刷新bug
zhangweie9d59c75402d
diff --git a/src/views/trending/index.tsx b/src/views/trending/index.tsxindex d3cfad7b..8a6eec0f 100644--- a/src/views/trending/index.tsx+++ b/src/views/trending/index.tsx@@ -639,6 +639,10 @@ const Trending: React.FC = () => {// 处理爆款标题平台选择const handleViralPlatformSelect = (platform: Platform, timeType: string) => {setSelectedViralPlatform(platform);+ // 清空原有数据并显示加载动画+ setSelectedViralCategory("全部");+ setShowSingleCategory(false);+ setViralTitleData([]);fetchViralTitleCategories(platform.id);fetchViralTitleTimeTypes(); // 获取时间类型fetchViralTitleContents(platform.id, timeType);@@ -1373,7 +1377,7 @@ const Trending: React.FC = () => {onClick={() =>handleViralPlatformSelect(platform,- selectedViralTimeRange,+ selectedViralTimeType,)}>