Skip to content

Let's use AI to Earn!

feat: 添加Ai工具排行榜

gaoSira51e2fd20cdb
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 2033faa8..f59bcc11 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,21 +4,24 @@
<option name="autoReloadType" value="NONE" />
</component>
<component name="ChangeListManager">
- <list default="true" id="8ce961ad-7c9e-494c-bc53-9ecde4358af8" name="更改" comment="feat(热门内容): 添加公众号逆向链接的代码">
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/echart/drawHotEventEchartLine.ts" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/hotEvent.module.scss" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/baidu.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/bibl.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/douyin.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/kwai.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/totiao.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/weibo.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/xhs.svg" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/svgs/zhihu.svg" afterDir="false" />
+ <list default="true" id="8ce961ad-7c9e-494c-bc53-9ecde4358af8" name="更改" comment="feat(热门内容): 添加小红书作者跳转">
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/aiRank.module.scss" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/aiRanking/aiRanking.module.scss" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/aiRanking/echarts-weekPie.ts" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/aiRanking/page.tsx" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/components/CycleSelects/cycleSelects.module.scss" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/components/CycleSelects/index.tsx" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/components/RankingTags/index.tsx" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/components/RankingTags/rankingTags.module.scss" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/images/bg-rank-index.png" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/layout.tsx" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/page.tsx" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/src/app/[lng]/aiRank/svgs/ranking.svg" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/api/hot.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/api/hot.ts" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/api/types/hotTopic.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/api/types/hotTopic.ts" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/hotContent/components/HotEvent/index.tsx" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/@types/resources.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/@types/resources.d.ts" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/app/i18n/locales/en/route.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/i18n/locales/en/route.json" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/app/i18n/locales/zh-CN/route.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/i18n/locales/zh-CN/route.json" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/app/layout/routerData.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/layout/routerData.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -74,48 +77,48 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
- <component name="PropertiesComponent">{
- &quot;keyToString&quot;: {
- &quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatOrder0&quot;: &quot;0&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatOrder1&quot;: &quot;1&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatOrder2&quot;: &quot;2&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatOrder3&quot;: &quot;3&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatWidth0&quot;: &quot;450&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatWidth1&quot;: &quot;450&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatWidth2&quot;: &quot;450&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_flatWidth3&quot;: &quot;449&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeOrder0&quot;: &quot;0&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeOrder1&quot;: &quot;1&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeOrder2&quot;: &quot;2&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeOrder3&quot;: &quot;3&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeWidth0&quot;: &quot;450&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeWidth1&quot;: &quot;450&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeWidth2&quot;: &quot;450&quot;,
- &quot;FileHistory.git4idea.history.GitHistoryProvider_treeWidth3&quot;: &quot;449&quot;,
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
- &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
- &quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
- &quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
- &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
- &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
- &quot;git-widget-placeholder&quot;: &quot;hot&quot;,
- &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
- &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
- &quot;last_opened_file_path&quot;: &quot;E:/project-dev/web/艺咖/aitoearn-web/src/app/[lng]/hotContent/components/HotEvent&quot;,
- &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
- &quot;node.js.detected.package.standard&quot;: &quot;true&quot;,
- &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
- &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
- &quot;node.js.selected.package.standard&quot;: &quot;&quot;,
- &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
- &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
- &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
- &quot;show.migrate.to.gradle.popup&quot;: &quot;false&quot;,
- &quot;ts.external.directory.path&quot;: &quot;E:\\project-dev\\web\\艺咖\\aitoearn-web\\node_modules\\typescript\\lib&quot;,
- &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
+ <component name="PropertiesComponent"><![CDATA[{
+ "keyToString": {
+ "ASKED_ADD_EXTERNAL_FILES": "true",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder0": "0",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder1": "1",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder2": "2",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder3": "3",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth0": "450",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth1": "450",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth2": "450",
+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth3": "449",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder0": "0",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder1": "1",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder2": "2",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder3": "3",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth0": "450",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth1": "450",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth2": "450",
+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth3": "449",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.cidr.known.project.marker": "true",
+ "RunOnceActivity.readMode.enableVisualFormatting": "true",
+ "cf.first.check.clang-format": "false",
+ "cidr.known.project.marker": "true",
+ "dart.analysis.tool.window.visible": "false",
+ "git-widget-placeholder": "main",
+ "ignore.virus.scanning.warn.message": "true",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "E:/project-dev/web/艺咖/aitoearn-web/src/app/[lng]/aiRank",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.standard": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.standard": "",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "preferences.pluginManager",
+ "show.migrate.to.gradle.popup": "false",
+ "ts.external.directory.path": "E:\\project-dev\\web\\艺咖\\aitoearn-web\\node_modules\\typescript\\lib",
+ "vue.rearranger.settings.migration": "true"
}
-}</component>
+}]]></component>
<component name="ReactBuddySettings">
<option name="extensionsIgnore" value="true" />
</component>
@@ -130,16 +133,18 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
+ <recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\aiRank" />
+ <recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\aiRank\svgs" />
+ <recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]" />
<recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\hotContent\components\HotEvent" />
<recent name="E:\project-dev\web\艺咖\aitoearn-web\src\assets\fonts" />
- <recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\i18n\locales\zh-CN" />
</key>
<key name="MoveFile.RECENT_KEYS">
+ <recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\aiRank" />
<recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\hotContent\components\HotEvent\svgs" />
<recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\hotContent\components\HotContent\svgs" />
<recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\hotContent\svgs" />
<recent name="E:\project-dev\web\艺咖\aitoearn-web\src\images" />
- <recent name="E:\project-dev\web\艺咖\aitoearn-web\src\app\[lng]\dataStatistics\echart" />
</key>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
@@ -227,70 +232,6 @@
<workItem from="1758007785895" duration="36707000" />
<workItem from="1758107883444" duration="5630000" />
</task>
- <task id="LOCAL-00021" summary="feat(发布):发布记录添加账户筛选API">
- <option name="closed" value="true" />
- <created>1752479070015</created>
- <option name="number" value="00021" />
- <option name="presentableId" value="LOCAL-00021" />
- <option name="project" value="LOCAL" />
- <updated>1752479070015</updated>
- </task>
- <task id="LOCAL-00022" summary="feat(发布):1. b站添加是否转载、选择分区参数。 2. 发布记录展示时间修复,将后端返回的时间转为当前时区给用户展示。 3. b站添加强制拦截,分区、转载不选择会强制拦截用户。">
- <option name="closed" value="true" />
- <created>1752488650807</created>
- <option name="number" value="00022" />
- <option name="presentableId" value="LOCAL-00022" />
- <option name="project" value="LOCAL" />
- <updated>1752488650807</updated>
- </task>
- <task id="LOCAL-00023" summary="fix(日历):修复了单元格没有预期时间但是发布记录还是不会填满单元格的问题。">
- <option name="closed" value="true" />
- <created>1752546046166</created>
- <option name="number" value="00023" />
- <option name="presentableId" value="LOCAL-00023" />
- <option name="project" value="LOCAL" />
- <updated>1752546046166</updated>
- </task>
- <task id="LOCAL-00024" summary="fix(发布弹框): 修复右侧预览不正常隐藏的问题">
- <option name="closed" value="true" />
- <created>1752551524945</created>
- <option name="number" value="00024" />
- <option name="presentableId" value="LOCAL-00024" />
- <option name="project" value="LOCAL" />
- <updated>1752551524945</updated>
- </task>
- <task id="LOCAL-00025" summary="feat(发布弹框): 立即发布接入API">
- <option name="closed" value="true" />
- <created>1752562558508</created>
- <option name="number" value="00025" />
- <option name="presentableId" value="LOCAL-00025" />
- <option name="project" value="LOCAL" />
- <updated>1752562558508</updated>
- </task>
- <task id="LOCAL-00026" summary="fix(日历): 删除最佳时间">
- <option name="closed" value="true" />
- <created>1752567697244</created>
- <option name="number" value="00026" />
- <option name="presentableId" value="LOCAL-00026" />
- <option name="project" value="LOCAL" />
- <updated>1752567697244</updated>
- </task>
- <task id="LOCAL-00027" summary="chore: 测试静态站点">
- <option name="closed" value="true" />
- <created>1752571476186</created>
- <option name="number" value="00027" />
- <option name="presentableId" value="LOCAL-00027" />
- <option name="project" value="LOCAL" />
- <updated>1752571476186</updated>
- </task>
- <task id="LOCAL-00028" summary="feat: 恢复选择账户弹框">
- <option name="closed" value="true" />
- <created>1752571839374</created>
- <option name="number" value="00028" />
- <option name="presentableId" value="LOCAL-00028" />
- <option name="project" value="LOCAL" />
- <updated>1752571839374</updated>
- </task>
<task id="LOCAL-00029" summary="feat: 尝试多语言SEO优化,添加静态站点配置">
<option name="closed" value="true" />
<created>1752575382612</created>
@@ -619,7 +560,71 @@
<option name="project" value="LOCAL" />
<updated>1758105572256</updated>
</task>
- <option name="localTasksCounter" value="70" />
+ <task id="LOCAL-00070" summary="feat(热点): 处理热门内容国际化:全部">
+ <option name="closed" value="true" />
+ <created>1758269543551</created>
+ <option name="number" value="00070" />
+ <option name="presentableId" value="LOCAL-00070" />
+ <option name="project" value="LOCAL" />
+ <updated>1758269543551</updated>
+ </task>
+ <task id="LOCAL-00071" summary="feat(热点): 热门内容国际化处理中">
+ <option name="closed" value="true" />
+ <created>1758270366506</created>
+ <option name="number" value="00071" />
+ <option name="presentableId" value="LOCAL-00071" />
+ <option name="project" value="LOCAL" />
+ <updated>1758270366506</updated>
+ </task>
+ <task id="LOCAL-00072" summary="feat(热点): 热点事件、侧边栏、标签组件国际化处理">
+ <option name="closed" value="true" />
+ <created>1758270721700</created>
+ <option name="number" value="00072" />
+ <option name="presentableId" value="LOCAL-00072" />
+ <option name="project" value="LOCAL" />
+ <updated>1758270721700</updated>
+ </task>
+ <task id="LOCAL-00073" summary="feat(热点): 热点事件折线图国际化处理">
+ <option name="closed" value="true" />
+ <created>1758270857904</created>
+ <option name="number" value="00073" />
+ <option name="presentableId" value="LOCAL-00073" />
+ <option name="project" value="LOCAL" />
+ <updated>1758270857904</updated>
+ </task>
+ <task id="LOCAL-00074" summary="feat(热点): 热门专题国际化处理">
+ <option name="closed" value="true" />
+ <created>1758271689870</created>
+ <option name="number" value="00074" />
+ <option name="presentableId" value="LOCAL-00074" />
+ <option name="project" value="LOCAL" />
+ <updated>1758271689870</updated>
+ </task>
+ <task id="LOCAL-00075" summary="feat(热点): 1. 处理爆款标题国际化。 2. 修复爆款标题label在“全部”切换日期不会刷新数据的bug">
+ <option name="closed" value="true" />
+ <created>1758272347434</created>
+ <option name="number" value="00075" />
+ <option name="presentableId" value="LOCAL-00075" />
+ <option name="project" value="LOCAL" />
+ <updated>1758272347434</updated>
+ </task>
+ <task id="LOCAL-00076" summary="feat: 国际化改回来">
+ <option name="closed" value="true" />
+ <created>1758273142974</created>
+ <option name="number" value="00076" />
+ <option name="presentableId" value="LOCAL-00076" />
+ <option name="project" value="LOCAL" />
+ <updated>1758273142974</updated>
+ </task>
+ <task id="LOCAL-00077" summary="feat(热门内容): 添加小红书作者跳转">
+ <option name="closed" value="true" />
+ <created>1758275776107</created>
+ <option name="number" value="00077" />
+ <option name="presentableId" value="LOCAL-00077" />
+ <option name="project" value="LOCAL" />
+ <updated>1758275776107</updated>
+ </task>
+ <option name="localTasksCounter" value="78" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -660,19 +665,7 @@
<map>
<entry key="MAIN">
<value>
- <State>
- <option name="FILTERS">
- <map>
- <entry key="branch">
- <value>
- <list>
- <option value="hot" />
- </list>
- </value>
- </entry>
- </map>
- </option>
- </State>
+ <State />
</value>
</entry>
</map>
@@ -682,14 +675,6 @@
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_NEW_TODO" value="false" />
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
- <MESSAGE value="feat: 创建数据统计页面" />
- <MESSAGE value="feat: 创建数据统计header" />
- <MESSAGE value="feat(数据统计): 顶部筛选完成" />
- <MESSAGE value="feat(数据统计): 1. 找不到空间的账号更改为默认账号的ID。 2. 完善swiper。 3. 添加过滤后的账号" />
- <MESSAGE value="feat(数据统计): 顶部账号完成" />
- <MESSAGE value="feat(数据统计): 数据明细完成" />
- <MESSAGE value="feat(数据统计): 接入数据API,并且分拣数据" />
- <MESSAGE value="feat(数据统计): 引入echarts" />
<MESSAGE value="feat(数据统计): echarts图接入API" />
<MESSAGE value="feat(数据统计): 数据大体完成" />
<MESSAGE value="feat(数据统计): 1. 添加账号搜索功能。 2. 添加账号离线状态和重新登录。" />
@@ -707,6 +692,14 @@
<MESSAGE value="fix(热门内容): 添加表格跳转到对于链接" />
<MESSAGE value="fix(热门内容): 热门内容完成" />
<MESSAGE value="feat(热门内容): 添加公众号逆向链接的代码" />
- <option name="LAST_COMMIT_MESSAGE" value="feat(热门内容): 添加公众号逆向链接的代码" />
+ <MESSAGE value="feat(热点): 处理热门内容国际化:全部" />
+ <MESSAGE value="feat(热点): 热门内容国际化处理中" />
+ <MESSAGE value="feat(热点): 热点事件、侧边栏、标签组件国际化处理" />
+ <MESSAGE value="feat(热点): 热点事件折线图国际化处理" />
+ <MESSAGE value="feat(热点): 热门专题国际化处理" />
+ <MESSAGE value="feat(热点): 1. 处理爆款标题国际化。 2. 修复爆款标题label在“全部”切换日期不会刷新数据的bug" />
+ <MESSAGE value="feat: 国际化改回来" />
+ <MESSAGE value="feat(热门内容): 添加小红书作者跳转" />
+ <option name="LAST_COMMIT_MESSAGE" value="feat(热门内容): 添加小红书作者跳转" />
</component>
</project>
\ No newline at end of file
diff --git a/@types/resources.d.ts b/@types/resources.d.ts
index c6d8bdd3..280e8d91 100644
--- a/@types/resources.d.ts
+++ b/@types/resources.d.ts
@@ -1920,7 +1920,8 @@ interface Resources {
"interactive": "作品互动",
"engagement": "互动数据",
"dataStatistics": "数据统计",
- "navigation": "导航"
+ "navigation": "导航",
+ "aiRank": "AI热榜"
},
"task": {
"title": "任务中心",
diff --git a/src/app/[lng]/aiRank/aiRank.module.scss b/src/app/[lng]/aiRank/aiRank.module.scss
new file mode 100644
index 00000000..d1d4f291
--- /dev/null
+++ b/src/app/[lng]/aiRank/aiRank.module.scss
@@ -0,0 +1,16 @@
+.aiRank {
+ height: 100%;
+ min-height: 0;
+ display: flex;
+ :global {
+ .ant-menu {
+ height: 100%;
+ box-sizing: border-box;
+ flex-shrink: 0;
+ padding-top: 20px;
+ svg {
+ font-size: 20px;
+ }
+ }
+ }
+}
diff --git a/src/app/[lng]/aiRank/aiRanking/aiRanking.module.scss b/src/app/[lng]/aiRank/aiRanking/aiRanking.module.scss
new file mode 100644
index 00000000..ff9566c4
--- /dev/null
+++ b/src/app/[lng]/aiRank/aiRanking/aiRanking.module.scss
@@ -0,0 +1,134 @@
+.aiRanking {
+ padding: 15px;
+ width: 100%;
+ min-width: 0;
+ height: 100%;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ font-size: 14px;
+ :global {
+ .aiRanking-rank {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 30px;
+ text-align: center;
+ line-height: 30px;
+ font-size: var(--fs-md);
+ .ant-tag {
+ margin-top: 6px;
+ }
+ &-up, &-down {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0;
+ height: 20px;
+ margin: 0;
+ min-width: 40px;
+ .anticon {
+ margin: 0 2px 0 0 !important;
+ }
+ }
+ &-up {
+ background: var(red);
+ }
+ &-down {
+ }
+ }
+ .ant-table-tbody {
+ .ant-table-row {
+ &:nth-child(odd) {
+ background: #f2f5f6;
+ }
+ td {
+ .anticon {
+ margin-left: 5px;
+ cursor: pointer;
+ }
+ }
+ }
+ }
+ .aiRanking-topthree {
+ width: 30px;
+ color: #fff;
+ background: url("../images/bg-rank-index.png") no-repeat center / cover;
+ }
+ .ant-table-thead {
+ th {
+ white-space: nowrap;
+ color: #9a9a9a !important;
+ padding-top: 10px !important;
+ padding-bottom: 10px !important;
+ font-weight: 400 !important;
+ .anticon {
+ margin-right: 3px;
+ }
+ }
+ }
+ .aiRanking-title {
+ margin-bottom: 20px;
+ font-weight: 900;
+ font-size: 24px;
+ }
+ .aiRanking-productName {
+ display: flex;
+ align-items: center;
+ overflow: hidden;
+ label {
+ font-size: var(--fs-md);
+ margin-bottom: 6px;
+ }
+ .ant-avatar {
+ white-space: nowrap;
+ flex-shrink: 0;
+ }
+ &-con {
+ overflow: hidden;
+ margin-left: 10px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ &-des {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 100%;
+ color: var(--grayColor8);
+ font-size: var(--fs-xs);
+ }
+ }
+ }
+ .aiRanking-head {
+ width: 100%;
+ margin-bottom: 10px;
+ background: var(--grayColor0);
+ border-radius: 6px;
+ padding: 15px;
+ box-sizing: border-box;
+ .aiRanking-head-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+ &:last-of-type {
+ margin-bottom: 0;
+ }
+ .aiRanking-head-title {
+ margin-right: 20px;
+ color: var(--grayColor7);
+ }
+ }
+ }
+
+ .aiRanking-content {
+ height: 100%;
+ min-width: 0;
+ display: flex;
+ min-height: 0;
+ @include table-flex-container-with-selectors;
+ }
+ }
+}
diff --git a/src/app/[lng]/aiRank/aiRanking/echarts-weekPie.ts b/src/app/[lng]/aiRank/aiRanking/echarts-weekPie.ts
new file mode 100644
index 00000000..c59721fd
--- /dev/null
+++ b/src/app/[lng]/aiRank/aiRanking/echarts-weekPie.ts
@@ -0,0 +1,43 @@
+import * as echarts from "echarts";
+
+type EChartsOption = echarts.EChartsOption;
+
+const initWeepPie = (
+ chartDom: HTMLDivElement,
+ data: {
+ value: number;
+ name: string;
+ }[],
+) => {
+ if (!chartDom) return;
+ const myChart = echarts.init(chartDom);
+
+ const option: EChartsOption = {
+ tooltip: {
+ trigger: "item",
+ formatter: (params: any) => {
+ const total = data.reduce((sum, item) => sum + item.value, 0);
+ const percent = (((params.value as number) / total) * 100).toFixed(2); // 计算百分比并保留两位小数
+ return `${params.name}: ${params.value} (${percent}%)`; // 格式化显示文本
+ },
+ },
+ series: [
+ {
+ type: "pie",
+ radius: "60%",
+ label: {
+ formatter: (params: any) => {
+ const total = data.reduce((sum, item) => sum + item.value, 0);
+ const percent = ((params.value / total) * 100).toFixed(0); // 百分比
+ return `${params.name} ${params.value}(${percent}%) `; // 自定义显示名称、数值和百分比
+ },
+ },
+ data,
+ },
+ ],
+ };
+
+ if (option) myChart.setOption(option);
+};
+
+export default initWeepPie;
diff --git a/src/app/[lng]/aiRank/aiRanking/page.tsx b/src/app/[lng]/aiRank/aiRanking/page.tsx
new file mode 100644
index 00000000..46d68257
--- /dev/null
+++ b/src/app/[lng]/aiRank/aiRanking/page.tsx
@@ -0,0 +1,344 @@
+"use client";
+
+import styles from "./aiRanking.module.scss";
+import RankingTags from "../components/RankingTags";
+import Cycleselects, { CycleTypeEnum } from "../components/CycleSelects";
+import { useEffect, useMemo, useRef, useState } from "react";
+import { Avatar, Popover, Table, TableProps, Tag, Tooltip } from "antd";
+import {
+ CaretDownOutlined,
+ CaretUpOutlined,
+ QuestionCircleOutlined,
+ SearchOutlined,
+} from "@ant-design/icons";
+import initWeepPie from "./echarts-weekPie";
+import {
+ AiToolsRankingItemType,
+ GetAiToolsRankingApiParams,
+} from "@/api/types/platform.type";
+import { platformApi } from "@/api/hot";
+
+const optionsTags = [
+ {
+ label: "总榜",
+ value: "1",
+ },
+ {
+ label: "国内榜",
+ value: "2",
+ },
+ {
+ label: "国外榜",
+ value: "3",
+ },
+];
+
+function parseChineseNumber(input: string): number {
+ if (!input) return 0;
+ const units: { [key: string]: number } = {
+ 千: 1000,
+ 万: 10000,
+ 亿: 100000000,
+ };
+
+ let result = 0;
+ let currentNumber = 0;
+ let decimalPart = 0;
+ let isDecimal = false;
+ let decimalScale = 0.1;
+
+ for (const char of input) {
+ if (char === ".") {
+ isDecimal = true; // 标记进入小数部分
+ continue;
+ }
+
+ if (char in units) {
+ if (isDecimal) {
+ result += (currentNumber + decimalPart) * units[char];
+ } else {
+ result += currentNumber * units[char];
+ }
+ currentNumber = 0;
+ decimalPart = 0;
+ isDecimal = false;
+ decimalScale = 0.1;
+ } else {
+ const num = parseInt(char, 10);
+ if (!isNaN(num)) {
+ if (isDecimal) {
+ decimalPart += num * decimalScale;
+ decimalScale *= 0.1;
+ } else {
+ currentNumber = currentNumber * 10 + num;
+ }
+ }
+ }
+ }
+
+ // 如果最后还有剩余的数字或小数部分,直接加到结果里
+ result += currentNumber + decimalPart;
+
+ return result;
+}
+
+export default function Page() {
+ const [params, setParams] = useState<GetAiToolsRankingApiParams>({
+ dateType: "",
+ startDate: "",
+ area: "1",
+ });
+ const [loading, setLoading] = useState(false);
+ const [data, setData] = useState<AiToolsRankingItemType[]>([]);
+ const aiRankingContentRef = useRef<HTMLDivElement>(null);
+
+ useEffect(() => {
+ if (params.dateType === "" || params.startDate === "") return;
+ if (loading) return;
+ setLoading(true);
+ platformApi
+ .getAiToolsRankingApi(params)
+ .then((res) => {
+ setLoading(false);
+ setData(res?.data.items ?? []);
+ document.querySelector(".ant-table-body")!.scrollTo(0, 0);
+ })
+ .catch(() => setLoading(false));
+ }, [params]);
+
+ const columns = useMemo(() => {
+ const columns: TableProps<AiToolsRankingItemType>["columns"] = [
+ {
+ title: () => <p style={{ textAlign: "center" }}>#</p>,
+ render: (text, prm, ind) => {
+ return (
+ <div className="aiRanking-rank">
+ {ind <= 2 ? (
+ <div className="aiRanking-topthree">{ind + 1}</div>
+ ) : (
+ <span>{ind + 1}</span>
+ )}
+ {prm.rankChange > 0 && (
+ <Tag className="aiRanking-rank-up" color="error">
+ <CaretUpOutlined />
+ {prm.rankChange}
+ </Tag>
+ )}
+ {prm.rankChange < 0 && (
+ <Tag className="aiRanking-rank-down" color="success">
+ <CaretDownOutlined />
+ {Math.abs(prm.rankChange)}
+ </Tag>
+ )}
+ </div>
+ );
+ },
+ width: "40px",
+ key: "序号",
+ },
+ {
+ title: "产品名",
+ render: (text, prm) => {
+ return (
+ <div className="aiRanking-productName">
+ <Avatar src={prm.cover} size="large" />
+ <div className="aiRanking-productName-con">
+ <label style={{ marginBottom: "4px", display: "inline-block" }}>
+ {prm.title}
+ </label>
+ <div
+ className="aiRanking-productName-con-des"
+ title={prm.description}
+ >
+ {prm.description}
+ </div>
+ </div>
+ </div>
+ );
+ },
+ width: 250,
+ key: "title",
+ },
+ {
+ title: "标签",
+ render: (text, prm) => {
+ return (
+ <div className="aiRanking-productName">
+ <div className="aiRanking-productName-con" title={prm.intro}>
+ {prm.intro}
+ </div>
+ </div>
+ );
+ },
+ width: 200,
+ key: "title",
+ },
+ {
+ title: "月访问量",
+ render: (text, prm) => {
+ return prm.stats.viewCount;
+ },
+ sorter: (a, b) =>
+ parseChineseNumber(b.stats.viewCount) -
+ parseChineseNumber(a.stats.viewCount),
+ width: 80,
+ key: "title",
+ },
+ {
+ title: "月下载量",
+ render: (text, prm) => {
+ return prm.downCount;
+ },
+ sorter: (a, b) =>
+ parseChineseNumber(b.downCount) - parseChineseNumber(a.downCount),
+ width: 80,
+ key: "月下载量",
+ },
+ {
+ title: () => {
+ return (
+ <>
+ <Tooltip title="统计AI工具排行榜的周提及作品数">
+ <QuestionCircleOutlined />
+ </Tooltip>
+ 周提及量
+ </>
+ );
+ },
+ sorter: (a, b) => b.referCount - a.referCount,
+ render: (text, prm, ind) => {
+ return (
+ <>
+ {prm.referCount}
+ <Popover
+ content={() => {
+ return (
+ <>
+ <div
+ className={`weekChat${ind}`}
+ style={{ width: "350px", height: "200px" }}
+ />
+ </>
+ );
+ }}
+ onOpenChange={() => {
+ setTimeout(() => {
+ initWeepPie(
+ document.querySelector(`.weekChat${ind}`)!,
+ Object.keys(prm.detail).map((key) => {
+ return {
+ name: key,
+ value: prm.detail[key as "抖音"],
+ };
+ }),
+ );
+ }, 10);
+ }}
+ >
+ <SearchOutlined />
+ </Popover>
+ </>
+ );
+ },
+ width: 90,
+ key: "referCount",
+ },
+ {
+ title: () => {
+ return (
+ <>
+ <Tooltip title="统计AI工具排行榜的提及作品、传播范围等多维度数据分析做出的综合评分">
+ <QuestionCircleOutlined />
+ </Tooltip>
+ 声望值
+ </>
+ );
+ },
+ sorter: (a, b) => b.volumeCount - a.volumeCount,
+ render: (text, prm) => {
+ return prm.volumeCount;
+ },
+ width: 80,
+ key: "volumeCount",
+ },
+ {
+ title: () => {
+ return (
+ <>
+ <Tooltip title="统计AI工具排行榜的用户使用情况等多维度数据分析做出的综合评分">
+ <QuestionCircleOutlined />
+ </Tooltip>
+ 综合评分
+ </>
+ );
+ },
+ sorter: (a, b) => b.exponentCount - a.exponentCount,
+ render: (text, prm) => {
+ return (
+ <span style={{ color: "var(--colorPrimary6)" }}>
+ {prm.exponentCount}
+ </span>
+ );
+ },
+ width: 90,
+ key: "exponentCount",
+ },
+ ];
+ return columns;
+ }, []);
+
+ return (
+ <div className={styles.aiRanking}>
+ <div className="aiRanking-title">
+ AI工具排行榜 · {optionsTags.find((v) => v.value === params.area)?.label}{" "}
+ ·{params.dateType === CycleTypeEnum.Week ? "周榜" : "月榜"}
+ </div>
+ <div className="aiRanking-head">
+ <div className="aiRanking-head-item">
+ <div className="aiRanking-head-title">类型</div>
+ <RankingTags
+ options={optionsTags}
+ defaultValue={optionsTags[0].value}
+ onChange={(val) => {
+ setParams((prevState) => {
+ const newState = { ...prevState };
+ newState.area = val;
+ return newState;
+ });
+ }}
+ />
+ </div>
+ <div className="aiRanking-head-item">
+ <div className="aiRanking-head-title">周期</div>
+ <div className="aiRanking-head-cycleselects">
+ <Cycleselects
+ defaultType={CycleTypeEnum.Week}
+ onChange={(v) => {
+ setParams((prevState) => {
+ const newState = { ...prevState };
+ newState.dateType = v.type;
+ newState.startDate = v.value;
+ return newState;
+ });
+ }}
+ />
+ </div>
+ </div>
+ </div>
+
+ <div className="aiRanking-content" ref={aiRankingContentRef}>
+ <Table<AiToolsRankingItemType>
+ columns={columns}
+ dataSource={data}
+ rowKey="id"
+ loading={loading}
+ pagination={false}
+ scroll={{
+ // 高度通过css flex设置为自适应
+ y: 0,
+ }}
+ />
+ </div>
+ </div>
+ );
+}
diff --git a/src/app/[lng]/aiRank/components/CycleSelects/cycleSelects.module.scss b/src/app/[lng]/aiRank/components/CycleSelects/cycleSelects.module.scss
new file mode 100644
index 00000000..f76f73fc
--- /dev/null
+++ b/src/app/[lng]/aiRank/components/CycleSelects/cycleSelects.module.scss
@@ -0,0 +1,24 @@
+.cycleSelects {
+ display: flex;
+ :global {
+ .cycleSelects-item {
+ display: flex;
+ align-items: center;
+ height: 32px;
+ margin-right: 30px;
+ &-label {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+ border-radius: 8px 0 0 8px;
+ background: var(--colorPrimary3);
+ color: var(--colorPrimary8);
+ }
+ .ant-select-selector {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/[lng]/aiRank/components/CycleSelects/index.tsx b/src/app/[lng]/aiRank/components/CycleSelects/index.tsx
new file mode 100644
index 00000000..fb1074f8
--- /dev/null
+++ b/src/app/[lng]/aiRank/components/CycleSelects/index.tsx
@@ -0,0 +1,195 @@
+import { ForwardedRef, forwardRef, memo, useEffect, useState } from "react";
+import styles from "./cycleSelects.module.scss";
+import { Button, Select } from "antd";
+import dayjs from "dayjs";
+import isoWeek from "dayjs/plugin/isoWeek";
+
+dayjs.extend(isoWeek);
+
+export enum CycleTypeEnum {
+ Week = "week",
+ Month = "month",
+}
+
+type CycleItemType = {
+ value: string;
+ label: string;
+};
+
+export interface ICycleselectsRef {}
+
+export interface ICycleselectsProps {
+ onChange: (params: { type: CycleTypeEnum; value: string }) => void;
+ defaultType: CycleTypeEnum;
+ disable?: boolean;
+}
+
+const CycleseCore = ({
+ title,
+ options,
+ onChange,
+ onActiveClick,
+ isActive,
+ value,
+}: {
+ onChange: (value: string) => void;
+ title: string;
+ options: CycleItemType[];
+ onActiveClick: () => void;
+ isActive: boolean;
+ value: string;
+}) => {
+ return (
+ <div className="cycleSelects-item">
+ {isActive}
+ {isActive ? (
+ <>
+ <div className="cycleSelects-item-label">{title}</div>
+ <Select options={options} value={value} onChange={onChange}></Select>
+ </>
+ ) : (
+ <Button onClick={onActiveClick}>{title}</Button>
+ )}
+ </div>
+ );
+};
+
+/**
+ * 获取指定数量的月份
+ * @param {number} skipMonths 跳过的月份数(当前月不算)
+ * @param {number} numberOfMonths 获取的月份数
+ */
+function getMonths(skipMonths: number, numberOfMonths: number) {
+ const currentMonth = dayjs().startOf("month"); // 当前月的开始时间
+ const months: CycleItemType[] = [];
+
+ for (let i = 0; i < numberOfMonths; i++) {
+ const month = currentMonth.subtract(skipMonths + i + 1, "month");
+ months.push({
+ label: month.format("YYYY年MM月"),
+ value: month.format("YYYY-MM-DD"),
+ });
+ }
+
+ return months;
+}
+
+/**
+ * 获取指定周范围的周
+ * @param {number} skipWeeks 跳过的周数(当前周不算)
+ * @param {number} numberOfWeeks 获取的周数
+ */
+function getWeekRanges(skipWeeks: number, numberOfWeeks: number) {
+ const currentWeekStart = dayjs().startOf("isoWeek"); // 当前周的开始时间(周一)
+ const ranges: CycleItemType[] = [];
+
+ for (let i = 0; i < numberOfWeeks; i++) {
+ const startOfWeek = currentWeekStart
+ .subtract(skipWeeks + i + 1, "week")
+ .startOf("isoWeek");
+ const endOfWeek = startOfWeek.endOf("isoWeek");
+ ranges.push({
+ label: `${startOfWeek.format("MM月DD日")} - ${endOfWeek.format("MM月DD日")}`,
+ value: startOfWeek.format("YYYY-MM-DD"),
+ });
+ }
+
+ return ranges;
+}
+
+/**
+ * 获取指定数量的日期
+ * @param {number} skipDays 跳过的天数(当前日不算)
+ * @param {number} numberOfDays 获取的天数
+ */
+function getDays(skipDays: number, numberOfDays: number) {
+ const currentDay = dayjs().startOf("day"); // 当前天的起始时间
+ const days: CycleItemType[] = [];
+
+ for (let i = 0; i < numberOfDays; i++) {
+ const day = currentDay.subtract(skipDays + i + 1, "day");
+ days.push({
+ value: day.format("YYYY年MM月DD日"),
+ label: day.format("YYYY-MM-DD"),
+ });
+ }
+
+ return days;
+}
+
+const Cycleselects = memo(
+ forwardRef(
+ (
+ { onChange, defaultType, disable }: ICycleselectsProps,
+ ref: ForwardedRef<ICycleselectsRef>,
+ ) => {
+ // 1周榜 2=月榜
+ const [active, setActive] = useState<CycleTypeEnum>(defaultType);
+ const [value, setValue] = useState("");
+ const [weekOptions, setWeekOptions] = useState<CycleItemType[]>([]);
+ const [monthsOptions, setMonthsOptions] = useState<CycleItemType[]>([]);
+
+ useEffect(() => {
+ const weekOptions = getWeekRanges(1, 3);
+ setWeekOptions(weekOptions);
+
+ const monthsOptions = getMonths(0, 3);
+ setMonthsOptions(monthsOptions);
+
+ if (defaultType === CycleTypeEnum.Week) {
+ setValue(weekOptions[0].value);
+ }
+ }, []);
+
+ useEffect(() => {
+ if (!value) return;
+ onChange({
+ type: active,
+ value,
+ });
+ }, [value]);
+
+ useEffect(() => {
+ if (active === CycleTypeEnum.Week) {
+ if (weekOptions[0]?.value) setValue(weekOptions[0]?.value);
+ return;
+ }
+ if (active === CycleTypeEnum.Month) {
+ if (monthsOptions[0]?.value) setValue(monthsOptions[0]?.value);
+ return;
+ }
+ }, [active]);
+
+ return (
+ <div className={styles.cycleSelects}>
+ <CycleseCore
+ value={value}
+ isActive={active === CycleTypeEnum.Week}
+ onActiveClick={() => {
+ if (disable) return;
+ setActive(CycleTypeEnum.Week);
+ }}
+ onChange={setValue}
+ title="周榜"
+ options={weekOptions}
+ />
+
+ <CycleseCore
+ value={value}
+ isActive={active === CycleTypeEnum.Month}
+ onActiveClick={() => {
+ if (disable) return;
+ setActive(CycleTypeEnum.Month);
+ }}
+ onChange={setValue}
+ title="月榜"
+ options={monthsOptions}
+ />
+ </div>
+ );
+ },
+ ),
+);
+Cycleselects.displayName = "Cycleselects";
+
+export default Cycleselects;
diff --git a/src/app/[lng]/aiRank/components/RankingTags/index.tsx b/src/app/[lng]/aiRank/components/RankingTags/index.tsx
new file mode 100644
index 00000000..882c9819
--- /dev/null
+++ b/src/app/[lng]/aiRank/components/RankingTags/index.tsx
@@ -0,0 +1,51 @@
+import { ForwardedRef, forwardRef, memo, useState } from "react";
+import styles from "./rankingTags.module.scss";
+
+export interface IRankingtagsRef {}
+
+export interface IRankingtagsProps {
+ options: {
+ label: string;
+ value: string;
+ }[];
+ defaultValue: string;
+ disable?: boolean;
+ onChange: (value: string) => void;
+}
+
+const Rankingtags = memo(
+ forwardRef(
+ (
+ { options, defaultValue, disable, onChange }: IRankingtagsProps,
+ ref: ForwardedRef<IRankingtagsRef>,
+ ) => {
+ const [activeValue, setActiveValue] = useState(defaultValue);
+
+ return (
+ <div className={styles.rankingTags}>
+ {options.map((v) => {
+ return (
+ <div
+ className={[
+ "rankingTags-tag",
+ activeValue === v.value ? "rankingTags-tag--active" : "",
+ ].join(" ")}
+ key={v.value}
+ onClick={() => {
+ if (disable) return;
+ onChange(v.value);
+ setActiveValue(v.value);
+ }}
+ >
+ {v.label}
+ </div>
+ );
+ })}
+ </div>
+ );
+ },
+ ),
+);
+Rankingtags.displayName = "Rankingtags";
+
+export default Rankingtags;
diff --git a/src/app/[lng]/aiRank/components/RankingTags/rankingTags.module.scss b/src/app/[lng]/aiRank/components/RankingTags/rankingTags.module.scss
new file mode 100644
index 00000000..2d22f8dc
--- /dev/null
+++ b/src/app/[lng]/aiRank/components/RankingTags/rankingTags.module.scss
@@ -0,0 +1,23 @@
+.rankingTags {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 4px;
+ :global {
+ .rankingTags-tag {
+ cursor: pointer;
+ font-size: var(--fs-sm);
+ border-radius: 3px;
+ padding: 2px 8px;
+ color: #333;
+ background: transparent;
+ transition: 0.3s;
+ &:hover {
+ color: var(--colorPrimary6);
+ }
+ &--active {
+ background: var(--colorPrimary6);
+ color: #fff !important;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/[lng]/aiRank/images/bg-rank-index.png b/src/app/[lng]/aiRank/images/bg-rank-index.png
new file mode 100644
index 00000000..ed4c7e69
Binary files /dev/null and b/src/app/[lng]/aiRank/images/bg-rank-index.png differ
diff --git a/src/app/[lng]/aiRank/layout.tsx b/src/app/[lng]/aiRank/layout.tsx
new file mode 100644
index 00000000..8ea3d6dd
--- /dev/null
+++ b/src/app/[lng]/aiRank/layout.tsx
@@ -0,0 +1,53 @@
+"use client";
+import { Menu, MenuProps } from "antd";
+import styles from "./aiRank.module.scss";
+import Ranking from "./svgs/ranking.svg";
+import Icon from "@ant-design/icons";
+import { usePathname, useRouter, useSearchParams } from "next/navigation";
+import { useEffect, useState } from "react";
+import { removeLocalePrefix } from "@/app/layout/layout.utils";
+
+type MenuItem = Required<MenuProps>["items"][number];
+
+const items: MenuItem[] = [
+ {
+ key: "/aiRank/aiRanking",
+ label: "AI工具排行榜",
+ icon: <Icon component={Ranking} />,
+ },
+].map((v) => {
+ // @ts-ignore
+ v.label = <span title={v.label}>{v.label}</span>;
+ return v;
+});
+
+export default function AiRankLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const router = useRouter();
+ const pathname = usePathname();
+ const searchParams = useSearchParams();
+ const [currChooseRoute, setCurrChooseRoute] = useState<string>();
+
+ useEffect(() => {
+ setCurrChooseRoute(removeLocalePrefix(pathname));
+ }, [pathname, searchParams]);
+
+ return (
+ <div className={styles.aiRank}>
+ <Menu
+ selectedKeys={[currChooseRoute || ""]}
+ style={{ width: 200 }}
+ inlineIndent={15}
+ mode="inline"
+ items={items}
+ onClick={(e) => {
+ router.push(e.key as string);
+ }}
+ />
+ {children}
+ </div>
+ );
+}
diff --git a/src/app/[lng]/aiRank/page.tsx b/src/app/[lng]/aiRank/page.tsx
new file mode 100644
index 00000000..1551ab49
--- /dev/null
+++ b/src/app/[lng]/aiRank/page.tsx
@@ -0,0 +1,16 @@
+"use client";
+
+import { useRouter } from "next/navigation";
+import { useEffect } from "react";
+
+const App = () => {
+ const router = useRouter();
+
+ useEffect(() => {
+ router.replace("/aiRank/aiRanking");
+ }, [router]);
+
+ return null;
+};
+
+export default App;
diff --git a/src/app/[lng]/aiRank/svgs/ranking.svg b/src/app/[lng]/aiRank/svgs/ranking.svg
new file mode 100644
index 00000000..3cbaf7e0
--- /dev/null
+++ b/src/app/[lng]/aiRank/svgs/ranking.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744720956242" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6046" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M924 467.1H768.2c-10.8 0-19.5 8.7-19.5 19.5s8.7 19.5 19.5 19.5h136.3v331.1H690.3V175c0-21.5-17.4-38.9-38.9-38.9H378.7c-21.5 0-38.9 17.4-38.9 38.9v662.1H125.6V408.7h136.3c10.8 0 19.5-8.7 19.5-19.5s-8.7-19.5-19.5-19.5H106.1c-10.8 0-19.5 8.7-19.5 19.5v467.4c0 10.8 8.7 19.5 19.5 19.5H924c10.8 0 19.5-8.7 19.5-19.5v-370c0-10.8-8.8-19.5-19.5-19.5z m-272.6 370H378.7V213.9c0-21.5 17.4-38.9 38.9-38.9h194.7c21.5 0 38.9 17.4 38.9 38.9v623.2zM456.6 311.3v19.5H515v97.4h39V252.9h-39l-58.4 58.4z" p-id="6047"></path></svg>
\ No newline at end of file
diff --git a/src/app/i18n/locales/en/route.json b/src/app/i18n/locales/en/route.json
index 90809046..bf2b813c 100644
--- a/src/app/i18n/locales/en/route.json
+++ b/src/app/i18n/locales/en/route.json
@@ -9,5 +9,6 @@
"interactive": "Interactive",
"engagement": "Engagement",
"dataStatistics": "Data Statistics",
- "navigation": "Navigation"
+ "navigation": "Navigation",
+ "aiRank": "AI Rank"
}
\ No newline at end of file
diff --git a/src/app/i18n/locales/zh-CN/route.json b/src/app/i18n/locales/zh-CN/route.json
index 15295ecf..268ca29f 100644
--- a/src/app/i18n/locales/zh-CN/route.json
+++ b/src/app/i18n/locales/zh-CN/route.json
@@ -9,5 +9,6 @@
"interactive": "作品互动",
"engagement": "互动数据",
"dataStatistics": "数据统计",
- "navigation": "导航"
+ "navigation": "导航",
+ "aiRank": "AI热榜"
}
\ No newline at end of file
diff --git a/src/app/layout/routerData.ts b/src/app/layout/routerData.ts
index 8e6ae099..d4bc75c1 100644
--- a/src/app/layout/routerData.ts
+++ b/src/app/layout/routerData.ts
@@ -75,7 +75,7 @@ export const homeHeaderRouterData = {
return [
{
href: "/",
- title: '',
+ title: "",
},
{
href: "/pricing",
@@ -97,6 +97,10 @@ export const homeHeaderRouterData = {
href: "/hotContent",
title: directTrans("route", "hotContent"),
},
+ {
+ href: "/aiRank",
+ title: directTrans("route", "aiRank"),
+ },
];
},
};