no message

This commit is contained in:
hellcat 2026-03-11 17:15:03 +08:00
parent b233037210
commit deca843139

View File

@ -181,7 +181,7 @@ class Arma extends Base {
$oArticleSchema = ModelArticleSchema::where("id", $iId)->first();
$aSchema = json_decode($oArticleSchema->schema, true);
$i = 0;
foreach ($aSchema["data"] as $aSchemaDataRow) {
if ($aSchemaDataRow["type"] == "photo") {
@ -191,10 +191,23 @@ class Arma extends Base {
}
}
}
$aSchemaPro = json_decode($oArticleSchema->schema_pro, true);
$ii = 0;
foreach ($aSchemaPro as $aSchemaProRow) {
if ($aSchemaProRow["type"] == "photo") {
foreach ($aSchemaProRow["data"] as $sSchemaProRowData) {
$sFilePath = env("dir_base")."public/".$sSchemaProRowData;
$sImgA = $this->imgPathByUrl($sFilePath);
$ii += $this->imgDelByPath($sImgA);
}
}
}
$oArticleSchema->delete();
$sMsg = "ok同时删除了{$i}张图片。";
$sMsg = "ok同时删除了{$i}原始图片,和{$ii}张pro图片。";
return $sMsg;
}