no message
This commit is contained in:
parent
b8bbedd7dc
commit
764733d76e
@ -93,6 +93,7 @@ private function cmdSaveArticle(): string
|
|||||||
// 番号匹配
|
// 番号匹配
|
||||||
$aResults = match ($this->sGroupCode) {
|
$aResults = match ($this->sGroupCode) {
|
||||||
'tg_xiuren_a' => $this->groupXiurenHandler($aArticle),
|
'tg_xiuren_a' => $this->groupXiurenHandler($aArticle),
|
||||||
|
'tg_image' => $this->groupImageHandler($aArticle),
|
||||||
default => throw new Exception("番号 {$this->sGroupCode} 未在编制内"),
|
default => throw new Exception("番号 {$this->sGroupCode} 未在编制内"),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -121,6 +122,25 @@ private function groupXiurenHandler(array $aArticle): array
|
|||||||
return $aStatus;
|
return $aStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function groupImageHandler(array $aArticle): array
|
||||||
|
{
|
||||||
|
$aStatus = [];
|
||||||
|
|
||||||
|
foreach ($aArticle as $aRow) {
|
||||||
|
$sRowType = $aRow["type"] ?? '';
|
||||||
|
$aRowData = $aRow["data"] ?? [];
|
||||||
|
|
||||||
|
if (empty($aRowData)) continue;
|
||||||
|
|
||||||
|
// 类型匹配
|
||||||
|
$aStatus[] = match ($sRowType) {
|
||||||
|
'photo' => $this->typePhotoHandler($aRowData),
|
||||||
|
default => "跳过未知类型: {$sRowType}",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return $aStatus;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【类型级】图片处理处置官
|
* 【类型级】图片处理处置官
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user