私域操盘手 - 调整微信号详情页部分页面数据,使用跳转时传递的列表数据而不是接口数据

This commit is contained in:
柳清爽
2025-05-10 12:02:19 +08:00
parent 6d9d56008d
commit 2bb3f3de5d
4 changed files with 216 additions and 6 deletions

View File

@@ -256,7 +256,17 @@ export default function WechatAccountsPage() {
<Card
key={account.id}
className="p-4 hover:shadow-lg transition-all cursor-pointer overflow-hidden"
onClick={() => router.push(`/wechat-accounts/${account.id}`)}
onClick={() => {
// 将需要的数据编码为 URL 安全的字符串
const accountData = encodeURIComponent(JSON.stringify({
avatar: account.avatar,
nickname: account.nickname,
status: account.status,
wechatId: account.wechatId,
deviceName: account.deviceName,
}));
router.push(`/wechat-accounts/${account.id}?data=${accountData}`);
}}
>
<div className="flex items-start space-x-4">
<Avatar className="h-12 w-12 ring-2 ring-offset-2 ring-blue-500/20">