Update Upgrade.php

This commit is contained in:
全栈小学生 2025-03-10 15:38:46 +08:00
parent 837057ace6
commit 6ee13de48e

View File

@ -391,6 +391,7 @@ class Upgrade
$addon_theme = $this->getVipcardTheme();
}
if (!empty($addon_theme)) {
foreach ($addon_theme[ 'theme_color' ] as $k => $v) {
$data[] = [
'type' => 'app',
@ -423,6 +424,8 @@ class Upgrade
}
}
}
}
if (!empty($data)) {
$diy_theme_model = new DiyTheme();
foreach ($data as $k => &$v) {
$theme_count = $diy_theme_model->where([
@ -435,7 +438,6 @@ class Upgrade
unset($data[ $k ]);
}
}
if (!empty($data)) {
$diy_theme_model->insertAll($data);
}
return true;