feat(weibo): 拆分账号管理与个人工作台

This commit is contained in:
yml2213
2026-11-08 16:26:53 +08:00
parent 5d6325d74c
commit d566518478
13 changed files with 1307 additions and 93 deletions
+37
View File
@@ -4,6 +4,7 @@ import type {
PaginatedResponse,
WeiboAccountItem,
WeiboAccountCkResult,
WeiboBatchTagResult,
WeiboBindQrResult,
WeiboExchangeRecordsResult,
WeiboExchangeResult,
@@ -12,6 +13,7 @@ import type {
WeiboPointHistoryResult,
WeiboRechargeOrderResult,
WeiboImportResult,
WeiboWorkbenchMutationResult,
} from './types';
export const weiboApi = {
@@ -60,6 +62,41 @@ export const weiboApi = {
api.post<WeiboAccountCkResult, WeiboAccountCkResult>(
`/weibo/accounts/${accountId}/ck/copy`,
),
batchTagAccounts: (ids: number[], tag: string) =>
api.post<WeiboBatchTagResult, WeiboBatchTagResult>(
'/weibo/accounts/batch-tag',
{ ids, tag },
),
listWorkbenchAccounts: (params: {
search?: string;
bind_status?: string;
enabled?: boolean;
page: number;
page_size: number;
}) =>
api.get<PaginatedResponse<WeiboAccountItem>, PaginatedResponse<WeiboAccountItem>>(
'/weibo/workbench/accounts',
{ params },
),
listWorkbenchPool: (params: {
search?: string;
page: number;
page_size: number;
}) =>
api.get<PaginatedResponse<WeiboAccountItem>, PaginatedResponse<WeiboAccountItem>>(
'/weibo/workbench/pool',
{ params },
),
addWorkbenchAccounts: (accountIds: number[]) =>
api.post<WeiboWorkbenchMutationResult, WeiboWorkbenchMutationResult>(
'/weibo/workbench/accounts',
{ account_ids: accountIds },
),
removeWorkbenchAccounts: (accountIds: number[]) =>
api.post<WeiboWorkbenchMutationResult, WeiboWorkbenchMutationResult>(
'/weibo/workbench/accounts/remove',
{ account_ids: accountIds },
),
bindQrcodes: (accountId: number, channel: 'wx' | 'qq') =>
api.post<WeiboBindQrResult, WeiboBindQrResult>(
`/weibo/accounts/${accountId}/bind-qrcodes`,