【触客宝】内容管理代码优化

This commit is contained in:
wong
2025-10-21 11:05:57 +08:00
parent 52f4a2b1e1
commit 252d02e7b9

View File

@@ -370,18 +370,17 @@ class MomentsController extends BaseController
// 处理数据
$data = [];
foreach ($list as $item) {
$sendData = json_encode($item->sendData,true);
$sendData = json_decode($item->sendData,true);
$data[] = [
'id' => $item->id,
'text' => $sendData['text'] ?? '',
'content' => $sendData['text'] ?? '',
'momentContentType' => $sendData['momentContentType'] ?? 1,
'picUrlList' => $sendData['picUrlList'] ?? [],
'videoUrl' => $sendData['videoUrl'] ?? '',
'link' => $sendData['link'] ?? [],
'publicMode' => $sendData['publicMode'] ?? 2,
'isSend' => $item->isSend,
'createTime' => $item->createTime,
'sendTime' => $item->sendTime,
'sendTime' => date('Y-m-d H:i:s',$item->sendTime),
'accountCount' => count($sendData['jobPublishWechatMomentsItems'] ?? [])
];
}