diff --git a/app/Services/Tg/Hook/Mod/Arma.php b/app/Services/Tg/Hook/Mod/Arma.php index 6c1784e6..80a6b5ea 100755 --- a/app/Services/Tg/Hook/Mod/Arma.php +++ b/app/Services/Tg/Hook/Mod/Arma.php @@ -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; }