From 621a71caed3f9f2ffe1f172aa5b14c05cbefe2a6 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Sat, 18 Feb 2023 10:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4PC=E4=B8=8B=E5=8D=95=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E4=B8=8D=E9=85=8D=E7=BD=AE=E5=BE=AE=E4=BF=A1=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7appid=E4=BD=BF=E7=94=A8pc=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=9A=84appid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/app/WechatService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crmeb/crmeb/services/app/WechatService.php b/crmeb/crmeb/services/app/WechatService.php index 79386c373..dc76c5a2b 100644 --- a/crmeb/crmeb/services/app/WechatService.php +++ b/crmeb/crmeb/services/app/WechatService.php @@ -60,7 +60,13 @@ class WechatService $appId = isset($wechat['wechat_app_appid']) ? trim($wechat['wechat_app_appid']) : ''; $appsecret = isset($wechat['wechat_app_appsecret']) ? trim($wechat['wechat_app_appsecret']) : ''; } else { - $appId = isset($wechat['wechat_appid']) ? trim($wechat['wechat_appid']) : ''; + $appId = null; + if (request()->isPc()) { + $appId = sys_config('wechat_open_app_id'); + } + if (!$appId) { + $appId = isset($wechat['wechat_appid']) ? trim($wechat['wechat_appid']) : ''; + } $appsecret = isset($wechat['wechat_appsecret']) ? trim($wechat['wechat_appsecret']) : ''; } $config = [