diff --git a/app/Http/Controllers/Admin/SystemController.php b/app/Http/Controllers/Admin/SystemController.php
index 5cd6ea81..956d8949 100644
--- a/app/Http/Controllers/Admin/SystemController.php
+++ b/app/Http/Controllers/Admin/SystemController.php
@@ -103,12 +103,12 @@ class SystemController extends Controller
$name = $request->input('name');
$value = $request->input('value');
- if (empty($value)) { // 关闭 或 空值 自动设NULL,减少系统设置存储
+ if (empty($value) || $value === 'NaN') { // 关闭 或 空值 自动设NULL,减少系统设置存储
$value = null;
}
// 支付设置判断
- if ($value !== null && in_array($name, ['is_AliPay', 'is_QQPay', 'is_WeChatPay', 'is_otherPay'], true) && ! in_array($value, $this->getPayment(), true)) {
+ if ($value !== null && in_array($name, ['is_AliPay', 'is_QQPay', 'is_WeChatPay'], true) && ! in_array($value, $this->getPayment(), true)) {
return Response::json(['status' => 'fail', 'message' => '请先完善该支付渠道的必要参数!']);
}
diff --git a/resources/views/admin/config/system.blade.php b/resources/views/admin/config/system.blade.php
index c4c93be6..6e640d97 100644
--- a/resources/views/admin/config/system.blade.php
+++ b/resources/views/admin/config/system.blade.php
@@ -110,14 +110,14 @@
-
+
-
+
@@ -186,11 +186,11 @@
:list="['邮箱' => 'mail', 'ServerChan' => 'serverChan', 'Telegram' => 'telegram', '微信企业' => 'weChat', 'TG酱' => 'tgChat', 'PushPlus'
=> 'pushPlus']"/>
+ help="提醒N次后自动下线节点,为0/留空时不限制,不超过12"/>
'mail', 'Bark' => 'bark', 'ServerChan' => 'serverChan', 'Telegram' => 'telegram', '微信企业' => 'weChat', 'TG酱' =>
'tgChat', 'PushPlus' => 'pushPlus']"/>
-
+
@@ -422,7 +422,7 @@
$('#is_AliPay').selectpicker('val', '{{$is_AliPay}}');
$('#is_QQPay').selectpicker('val', '{{$is_QQPay}}');
$('#is_WeChatPay').selectpicker('val', '{{$is_WeChatPay}}');
- $('#is_otherPay').selectpicker('val', '{{$is_otherPay}}');
+ $('#is_otherPay').selectpicker('val', {!! $is_otherPay !!});
$('#oauth_path').selectpicker('val', {!! $oauth_path !!});
$('#account_expire_notification').selectpicker('val', {!! $account_expire_notification !!});
$('#data_anomaly_notification').selectpicker('val', {!! $data_anomaly_notification !!});
diff --git a/resources/views/user/components/purchase.blade.php b/resources/views/user/components/purchase.blade.php
index 6f72afc5..59439ad1 100644
--- a/resources/views/user/components/purchase.blade.php
+++ b/resources/views/user/components/purchase.blade.php
@@ -13,16 +13,18 @@
@endif
-@if(sysConfig('is_otherPay') == 'bitpayx')
+@if(strpos(sysConfig('is_otherPay'), 'bitpayx') !== false)
-@elseif(sysConfig('is_otherPay') == 'paypal')
+@endif
+@if(strpos(sysConfig('is_otherPay'), 'paypal') !== false)
-@elseif(sysConfig('is_otherPay') == 'stripe')
+@endif
+@if(strpos(sysConfig('is_otherPay'), 'stripe') !== false)