From 3a9f6e88b6e93268be6d4a5cf58d8cef4611c732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Tue, 4 Mar 2025 10:42:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=85=8D=E7=BD=AE=E5=8F=82=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-wechat/src/controller/Config.php | 11 +++++------ .../think-plugs-wechat/src/view/config/payment.html | 10 +++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/plugin/think-plugs-wechat/src/controller/Config.php b/plugin/think-plugs-wechat/src/controller/Config.php index 219d0f8b5..6e50aa7d7 100644 --- a/plugin/think-plugs-wechat/src/controller/Config.php +++ b/plugin/think-plugs-wechat/src/controller/Config.php @@ -18,7 +18,6 @@ declare (strict_types=1); namespace app\wechat\controller; -use app\wechat\service\PaymentService; use app\wechat\service\WechatService; use think\admin\Builder; use think\admin\Controller; @@ -147,11 +146,11 @@ class Config extends Controller if ($this->request->isGet()) { $this->title = '微信支付配置'; $local = LocalStorage::instance(); - $data = sysdata('plugin.wechat.payment'); - $this->mch_ssl_cer = $data['mch_ssl_cer'] ?? ''; - $this->mch_ssl_key = $data['mch_ssl_key'] ?? ''; - $this->mch_ssl_p12 = $data['mch_ssl_p12'] ?? ''; - $this->mch_ssl_pay = $data['mch_ssl_pay'] ?? ''; + $this->data = sysdata('plugin.wechat.payment'); + $this->mch_ssl_cer = $this->data['mch_ssl_cer'] ?? ''; + $this->mch_ssl_key = $this->data['mch_ssl_key'] ?? ''; + $this->mch_ssl_p12 = $this->data['mch_ssl_p12'] ?? ''; + $this->mch_ssl_pay = $this->data['mch_ssl_pay'] ?? ''; if (!$local->has($this->mch_ssl_cer, true)) $this->mch_ssl_cer = ''; if (!$local->has($this->mch_ssl_key, true)) $this->mch_ssl_key = ''; if (!$local->has($this->mch_ssl_p12, true)) $this->mch_ssl_p12 = ''; diff --git a/plugin/think-plugs-wechat/src/view/config/payment.html b/plugin/think-plugs-wechat/src/view/config/payment.html index e600781ba..f274acb8b 100644 --- a/plugin/think-plugs-wechat/src/view/config/payment.html +++ b/plugin/think-plugs-wechat/src/view/config/payment.html @@ -17,19 +17,19 @@ @@ -37,7 +37,7 @@ @@ -117,6 +117,6 @@ function apply(data) { return $('[data-mch-type="' + data.value + '"]').show().siblings('[data-mch-type]').hide(); } - })("{:sysconf('wechat.mch_ssl_type')}" || 'pem'); + })("{$data.mch_ssl_type|default='pem'}"); {/block}