no message
This commit is contained in:
parent
b8bbedd7dc
commit
764733d76e
@ -93,6 +93,7 @@ private function cmdSaveArticle(): string
|
||||
// 番号匹配
|
||||
$aResults = match ($this->sGroupCode) {
|
||||
'tg_xiuren_a' => $this->groupXiurenHandler($aArticle),
|
||||
'tg_image' => $this->groupImageHandler($aArticle),
|
||||
default => throw new Exception("番号 {$this->sGroupCode} 未在编制内"),
|
||||
};
|
||||
|
||||
@ -120,6 +121,25 @@ private function groupXiurenHandler(array $aArticle): array
|
||||
}
|
||||
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