diff --git a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/AccountListModal.tsx b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/AccountListModal.tsx index c792f143..e51958b4 100644 --- a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/AccountListModal.tsx +++ b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/AccountListModal.tsx @@ -37,7 +37,19 @@ const AccountListModal: React.FC = ({ try { const detailRes = await fetchDistributionRuleDetail(ruleId); const accountData = detailRes?.config?.accountGroupsOptions || []; - setAccounts(accountData); + + // 映射数据字段 + const formattedAccounts = accountData.map((account: any) => ({ + id: account.id, + nickname: account.nickname || account.realName || account.userName || "", + wechatId: account.userName || account.wechatId || "", + avatar: account.avatar || "", + status: account.status || "normal", + realName: account.realName || "", + memo: account.memo || "", + })); + + setAccounts(formattedAccounts); } catch (error) { console.error("获取账号详情失败:", error); message.error("获取账号详情失败"); @@ -127,12 +139,18 @@ const AccountListModal: React.FC = ({
{account.nickname || + (account as any).realName || account.wechatId || `账号${account.id}`}
{account.wechatId || "未绑定微信号"}
+ {(account as any).memo && ( +
+ {(account as any).memo} +
+ )}
= ({ setLoading(true); try { const detailRes = await fetchDistributionRuleDetail(ruleId); - const poolData = detailRes?.config?.pools || []; + const poolData = detailRes?.config?.poolGroupsOptions || []; - const formattedPools = poolData.map((pool: any) => ({ - id: pool.id || pool.poolId, - name: pool.name || pool.poolName || `流量池${pool.id}`, - description: pool.description || pool.desc || "", - userCount: pool.userCount || pool.count || 0, - tags: pool.tags || [], - createdAt: pool.createdAt || pool.createTime || "", - deviceIds: pool.deviceIds || [], - })); + const formattedPools = poolData.map((pool: any) => { + // 处理创建时间:如果是时间戳,转换为日期字符串 + let createdAt = ""; + if (pool.createTime) { + if (typeof pool.createTime === "number") { + createdAt = new Date(pool.createTime * 1000).toLocaleString("zh-CN"); + } else { + createdAt = pool.createTime; + } + } + + return { + id: pool.id || pool.poolId, + name: pool.name || pool.poolName || `流量池${pool.id}`, + description: pool.description || pool.desc || "", + userCount: pool.num || pool.userCount || pool.count || 0, + tags: pool.tags || [], + createdAt: createdAt, + deviceIds: pool.deviceIds || [], + }; + }); setPools(formattedPools); } catch (error) { diff --git a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx index e0d5548b..2bc8d2d3 100644 --- a/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx +++ b/Cunkebao/src/pages/mobile/workspace/traffic-distribution/list/components/SendRcrodModal.tsx @@ -14,6 +14,10 @@ interface SendRecordItem { isRecycle?: number; sendTime?: string; sendCount?: number; + account?: string; + username?: string; + createTime?: string; + recycleTime?: string; } interface SendRcrodModalProps { @@ -227,6 +231,12 @@ const SendRcrodModal: React.FC = ({
{record.wechatId || "未绑定微信号"}
+ {record.account && ( +
+ 所属账号:{record.account} + {record.username && `(${record.username})`} +
+ )}
where('workbenchId', $workbench->id) - ->where('status', 'in', [self::STATUS_SUCCESS, self::STATUS_ADMIN_FRIEND_ADDED]) + ->where('status', 'in', [self::STATUS_SUCCESS, self::STATUS_ADMIN_FRIEND_ADDED, self::STATUS_CREATING]) ->whereIn('wechatId', $poolItem) ->group('wechatId') ->column('wechatId');