Fix #132 & 减少系统存储

This commit is contained in:
兔姬桑
2021-01-25 17:12:58 -05:00
parent a49828e3bf
commit c36761ad68
2 changed files with 6 additions and 2 deletions

View File

@@ -104,6 +104,10 @@ class SystemController extends Controller
$name = $request->input('name');
$value = $request->input('value');
if (empty($value)) { // 关闭 或 空值 自动设NULL减少系统设置存储
$value = null;
}
// 支付设置判断
if ($value !== null && in_array($name, ['is_AliPay', 'is_QQPay', 'is_WeChatPay', 'is_otherPay'], true) && ! in_array($value, $this->getPayment(), true)) {
return Response::json(['status' => 'fail', 'message' => '请先完善该支付渠道的必要参数!']);

View File

@@ -434,9 +434,9 @@
<input type="number" class="form-control" id="user_invite_days" value="{{$user_invite_days}}"/>
<div class="input-group-append">
<span class="input-group-text"></span>
<button class="btn btn-primary" type="button"
onchange="updateFromOther('user_invite_days','1',false)">{{trans('common.update')}}</button>
</div>
<button class="btn btn-primary" type="button"
onclick="updateFromInput('user_invite_days','1',false)">{{trans('common.update')}}</button>
</div>
<span class="text-help"> 用户自行生成邀请的有效期 </span>
</div>