view->assign('cfg', $cfg); return $this->view->fetch(); } /** * 保存充值配置 */ public function save() { if ($this->request->isPost()) { $params = $this->request->post('row/a', []); if (empty($params)) { $this->error('未获取到需要保存的配置参数'); } try { FinanceConfigService::saveConfigs($params); $this->success('充值配置已成功保存并即时生效'); } catch (\InvalidArgumentException $e) { $this->error($e->getMessage()); } catch (\Throwable $e) { \think\Log::error('[RechargeConfig::save] ' . $e->getMessage()); $this->error('保存配置失败:' . $e->getMessage()); } } $this->error('非法请求'); } }