删除|合并不再使用|类似的系统配置&修复用户关闭工单错误的问题

This commit is contained in:
兔姬桑
2021-01-28 00:15:55 -05:00
parent c68087c54b
commit f83602333f
10 changed files with 81 additions and 118 deletions

View File

@@ -54,17 +54,7 @@ class SystemController extends Controller
private function getCaptcha()
{
if (sysConfig('geetest_id') && sysConfig('geetest_key')) {
$captcha[] = '2';
}
if (sysConfig('google_captcha_secret') && sysConfig('google_captcha_sitekey')) {
$captcha[] = '3';
}
if (sysConfig('hcaptcha_secret') && sysConfig('hcaptcha_sitekey')) {
$captcha[] = '4';
}
return $captcha ?? [];
return sysConfig('captcha_secret') && sysConfig('captcha_key');
}
public function setExtend(Request $request): RedirectResponse // 设置系统扩展信息,例如客服、统计代码
@@ -113,6 +103,10 @@ class SystemController extends Controller
return Response::json(['status' => 'fail', 'message' => '请先完善该支付渠道的必要参数!']);
}
if ($value > 1 && $name === 'is_captcha' && ! $this->getCaptcha()) {
return Response::json(['status' => 'fail', 'message' => '请先完善验证码的必要参数!']);
}
// 演示环境禁止修改特定配置项
if (config('app.demo')) {
$denyConfig = [