修改插件
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-21 13:14:55 +08:00
parent b05595e090
commit 55d4de847f

View File

@@ -32,7 +32,17 @@ class ThemeController extends PluginAdminBaseController
*/
public function save(): Response
{
// 兼容 application/json 与表单提交两种方式获取参数
$param = $this->request->param();
if (empty($param)) {
$raw = $this->request->getContent();
if ($raw) {
$json = json_decode($raw, true);
if (is_array($json)) {
$param = $json;
}
}
}
// 与前端 payload 结构保持一致,只取需要的字段入库
$payload = [