configName); $data = \app\common\model\app\Config::getConfig($this->configName); return $this->success("获取成功", $data); } /** * 保存配置 * @return mixed */ public function setConfig() { $row = $this->request->post("row/a", [], 'trim'); // 登录终端限制数:范围 1-50,非数字回退默认值 3 if (isset($row['login_terminal_limit'])) { $limit = trim((string)$row['login_terminal_limit']); if ($limit === '' || !is_numeric($limit)) { $row['login_terminal_limit'] = '3'; } else { $limit = intval($limit); if ($limit < 1) { $limit = 1; } if ($limit > 50) { $limit = 50; } $row['login_terminal_limit'] = (string)$limit; } } \app\common\model\fill\Handle::check('app_config', $this->configName); $data = \app\common\model\app\Config::setConfig($this->configName, $row); return $this->success("保存成功", $data); } }