mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-07 04:59:36 +00:00
fixed 网站运行时修改支付方式后,未修改内置在线支付总开关的缓存问题
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Models\Config;
|
||||
use Arr;
|
||||
use Cache;
|
||||
|
||||
class ConfigObserver
|
||||
@@ -12,6 +13,12 @@ class ConfigObserver
|
||||
{
|
||||
// 更新系统参数缓存
|
||||
Cache::tags('sysConfig')->put($config->name, $config->value ?: 0);
|
||||
|
||||
// 如果在线支付方式出现变动,改变 在线支付 设置状态
|
||||
if (Arr::exists(['is_AliPay', 'is_QQPay', 'is_WeChatPay', 'is_otherPay'], $config->name)) {
|
||||
$value = !empty(array_filter(Cache::many(['is_AliPay', 'is_QQPay', 'is_WeChatPay', 'is_otherPay'])));
|
||||
Cache::tags('sysConfig')->put('is_onlinePay', $value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user