no message
This commit is contained in:
parent
b233037210
commit
deca843139
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user