Browse Source

fix: 修改小程序配置

Gosowong 2 years ago
parent
commit
c7131979da

+ 1 - 1
crmeb/crmeb/services/app/MiniProgramService.php

@@ -93,7 +93,7 @@ class MiniProgramService
      */
     public static function options()
     {
-        $wechat = SystemConfigService::more(['wechat_app_appsecret', 'wechat_app_appid', 'site_url', 'routine_appId', 'routine_appsecret']);
+        $wechat = SystemConfigService::more(['wechat_app_appsecret', 'wechat_app_appid', 'site_url', 'routine_appId', 'routine_appsecret', 'wechat_token', 'wechat_encodingaeskey']);
         $payment = SystemConfigService::more(['pay_weixin_mchid', 'pay_weixin_key', 'pay_weixin_client_cert', 'pay_weixin_client_key', 'pay_weixin_open', 'pay_new_weixin_open', 'pay_new_weixin_mchid']);
         $config = [];
         if (request()->isApp()) {

+ 3 - 1
crmeb/crmeb/services/easywechat/orderShipping/MiniOrderService.php

@@ -22,8 +22,10 @@ class MiniOrderService
      */
     protected static function options(array $config = [])
     {
-        $payment = SystemConfigService::more(['routine_appId', 'routine_appsecret', 'pay_weixin_mchid', 'pay_new_weixin_open', 'pay_new_weixin_mchid']);
+        $payment = SystemConfigService::more(['routine_appId', 'routine_appsecret', 'pay_weixin_mchid', 'pay_new_weixin_open', 'pay_new_weixin_mchid', 'wechat_token', 'wechat_encodingaeskey']);
         return [
+            'token' => isset($payment['wechat_token']) ? trim($payment['wechat_token']) : '',
+            'aes_key' => isset($payment['wechat_encodingaeskey']) ? trim($payment['wechat_encodingaeskey']) : '',
             'mini_program' => [
                 'app_id' => $payment['routine_appId'] ?? '',
                 'secret' => $payment['routine_appsecret'] ?? '',