getConfig($this->request->defaultSiteId(), ConfigKeyDict::ADMIN_LOGIN)['value'] ?? []; return [ 'is_captcha' => $info['is_captcha'] ?? 0,//是否启用验证码 'is_site_captcha' => $info['is_site_captcha'] ?? 0,//是否启用站点验证码 'bg' => $info['bg'] ?? '',//平台登录端 背景 'site_bg' => $info['site_bg'] ?? '',//站点登录端 背景 ]; } /** * 注册与登录设置 * @param array $data * @return true */ public function setConfig(array $data) { $config = [ 'is_captcha' => $data['is_captcha'] ?? 0,//是否启用验证码 'is_site_captcha' => $data['is_site_captcha'] ?? 0,//是否启用站点验证码 'bg' => $data['bg'] ?? '',//平台登录端 背景 'site_bg' => $data['site_bg'] ?? '',//站点登录端 背景 ]; (new CoreConfigService())->setConfig($this->site_id, ConfigKeyDict::ADMIN_LOGIN, $config); return true; } }