modified 完成字段功能移植

This commit is contained in:
zhaoxiang 2020-10-13 00:32:09 +08:00
parent b363957b52
commit 9beef9477b

View File

@ -191,7 +191,8 @@ class Fields extends Base {
$addArr = array_diff($newArr, $oldArr);
$delArr = array_diff($oldArr, $newArr);
if ($delArr) {
AdminFields::destroy(['show_name' => ['in', $delArr]]);
$delArr = array_values($delArr);
(new AdminFields())->whereIn('show_name', $delArr)->delete();
}
if ($addArr) {
$addData = [];