【触客宝】内容管理代码优化
This commit is contained in:
@@ -370,18 +370,17 @@ class MomentsController extends BaseController
|
|||||||
// 处理数据
|
// 处理数据
|
||||||
$data = [];
|
$data = [];
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
$sendData = json_encode($item->sendData,true);
|
$sendData = json_decode($item->sendData,true);
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'id' => $item->id,
|
'id' => $item->id,
|
||||||
'text' => $sendData['text'] ?? '',
|
'content' => $sendData['text'] ?? '',
|
||||||
'momentContentType' => $sendData['momentContentType'] ?? 1,
|
'momentContentType' => $sendData['momentContentType'] ?? 1,
|
||||||
'picUrlList' => $sendData['picUrlList'] ?? [],
|
'picUrlList' => $sendData['picUrlList'] ?? [],
|
||||||
'videoUrl' => $sendData['videoUrl'] ?? '',
|
'videoUrl' => $sendData['videoUrl'] ?? '',
|
||||||
'link' => $sendData['link'] ?? [],
|
'link' => $sendData['link'] ?? [],
|
||||||
'publicMode' => $sendData['publicMode'] ?? 2,
|
'publicMode' => $sendData['publicMode'] ?? 2,
|
||||||
'isSend' => $item->isSend,
|
'isSend' => $item->isSend,
|
||||||
'createTime' => $item->createTime,
|
'sendTime' => date('Y-m-d H:i:s',$item->sendTime),
|
||||||
'sendTime' => $item->sendTime,
|
|
||||||
'accountCount' => count($sendData['jobPublishWechatMomentsItems'] ?? [])
|
'accountCount' => count($sendData['jobPublishWechatMomentsItems'] ?? [])
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user