Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
fix: 账号过滤不支持的三个平台:视频号、小红书、抖音
gaoSird39a09d7e912
diff --git a/.env.development b/.env.developmentindex 2a778e42..ed099162 100644--- a/.env.development+++ b/.env.development@@ -1,5 +1,7 @@NEXT_PUBLIC_EVN=dev-NEXT_PUBLIC_API_URL=http://localhost:7000/api/+#NEXT_PUBLIC_API_URL=http://localhost:7000/api/-# NEXT_PUBLIC_API_URL=https://dev.aitoearn.ai/api/\ No newline at end of file+# NEXT_PUBLIC_API_URL=https://dev.aitoearn.ai/api/++NEXT_PUBLIC_API_URL=https://apitest.aiearn.ai/api/diff --git a/.idea/workspace.xml b/.idea/workspace.xmlindex 6a6b7aa6..fb12919f 100644--- a/.idea/workspace.xml+++ b/.idea/workspace.xml@@ -5,9 +5,10 @@</component><component name="ChangeListManager"><list default="true" id="8ce961ad-7c9e-494c-bc53-9ecde4358af8" name="更改" comment="fix(日历):发布时间格式修复">- <change afterPath="$PROJECT_DIR$/.dockerignore" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/.env.development" beforeDir="false" afterPath="$PROJECT_DIR$/.env.development" afterDir="false" /><change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/src/app/config/platConfig.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/config/platConfig.ts" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/src/store/account.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/store/account.ts" afterDir="false" /></list><option name="SHOW_DIALOG" value="false" /><option name="HIGHLIGHT_CONFLICTS" value="true" />@@ -28,20 +29,25 @@</component><component name="Git.Settings"><option name="PUSH_AUTO_UPDATE" value="true" />+ <option name="RECENT_BRANCH_BY_REPOSITORY">+ <map>+ <entry key="$PROJECT_DIR$" value="master" />+ </map>+ </option><option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /></component>- <component name="GitHubPullRequestSearchHistory"><![CDATA[{- "lastFilter": {- "state": "OPEN",- "assignee": "gaozhenqiang"+ <component name="GitHubPullRequestSearchHistory">{+ "lastFilter": {+ "state": "OPEN",+ "assignee": "gaozhenqiang"}-}]]></component>- <component name="GithubPullRequestsUISettings"><![CDATA[{- "selectedUrlAndAccountId": {- "url": "https://github.com/yikart/aitoearn-web.git",- "accountId": "f5430140-317f-4240-bde4-97758a52e360"+}</component>+ <component name="GithubPullRequestsUISettings">{+ "selectedUrlAndAccountId": {+ "url": "https://github.com/yikart/aitoearn-web.git",+ "accountId": "f5430140-317f-4240-bde4-97758a52e360"}-}]]></component>+}</component><component name="ProblemsViewState"><option name="selectedTabId" value="ProjectErrors" /></component>@@ -56,46 +62,46 @@<option name="hideEmptyMiddlePackages" value="true" /><option name="showLibraryContents" value="true" /></component>- <component name="PropertiesComponent">{- "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": "master",- "ignore.virus.scanning.warn.message": "true",- "kotlin-language-version-configured": "true",- "last_opened_file_path": "E:/project-dev/web/艺咖/aitoearn-web/src/components",- "node.js.detected.package.eslint": "true",- "node.js.detected.package.tslint": "true",- "node.js.selected.package.eslint": "(autodetect)",- "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 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/components",+ "node.js.detected.package.eslint": "true",+ "node.js.detected.package.tslint": "true",+ "node.js.selected.package.eslint": "(autodetect)",+ "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>diff --git a/src/app/config/platConfig.ts b/src/app/config/platConfig.tsindex 468750d0..2425d3cb 100644--- a/src/app/config/platConfig.ts+++ b/src/app/config/platConfig.ts@@ -65,7 +65,7 @@ export interface IAccountPlatInfo {}// 各个平台的信息-export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([+export const AccountPlatInfoMap = new Map<PlatType, IAccountPlatInfo>([[PlatType.Douyin,{diff --git a/src/store/account.ts b/src/store/account.tsindex 8e79ea0d..c451673d 100644--- a/src/store/account.ts+++ b/src/store/account.ts@@ -3,6 +3,7 @@ import { combine } from "zustand/middleware";import lodash from "lodash";import { AccountGroupItem, SocialAccount } from "@/api/types/account.type";import { getAccountGroupApi, getAccountListApi } from "@/api/account";+import { PlatType } from "@/app/config/platConfig";export interface AccountGroup extends AccountGroupItem {children: SocialAccount[];@@ -69,14 +70,22 @@ export const useAccountStore = create(const result = await getAccountListApi();if (result?.code !== 0) return;+ const accountList: SocialAccount[] = [];for (const item of result.data) {+ if (+ item.type === PlatType.Xhs ||+ item.type === PlatType.Douyin ||+ item.type === PlatType.WxSph+ )+ continue;accountMap.set(item.id, item);accountAccountMap.set(item.account, item);+ accountList.push(item);}set({- accountList: result.data,+ accountList,accountMap,accountAccountMap,});