Skip to content

Let's use AI to Earn!

fix: 账号过滤不支持的三个平台:视频号、小红书、抖音

gaoSird39a09d7e912
diff --git a/.env.development b/.env.development
index 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.xml
index 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">{
+ &quot;lastFilter&quot;: {
+ &quot;state&quot;: &quot;OPEN&quot;,
+ &quot;assignee&quot;: &quot;gaozhenqiang&quot;
}
-}]]></component>
- <component name="GithubPullRequestsUISettings"><![CDATA[{
- "selectedUrlAndAccountId": {
- "url": "https://github.com/yikart/aitoearn-web.git",
- "accountId": "f5430140-317f-4240-bde4-97758a52e360"
+}</component>
+ <component name="GithubPullRequestsUISettings">{
+ &quot;selectedUrlAndAccountId&quot;: {
+ &quot;url&quot;: &quot;https://github.com/yikart/aitoearn-web.git&quot;,
+ &quot;accountId&quot;: &quot;f5430140-317f-4240-bde4-97758a52e360&quot;
}
-}]]></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">{
- &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;master&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/components&quot;,
- &quot;node.js.detected.package.eslint&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.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/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.ts
index 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.ts
index 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,
});