WIN-2308041133\Administrator 1 month ago
parent
commit
853f9812e8
2 changed files with 5 additions and 2 deletions
  1. 2 1
      app/controller/api/Wechat.php
  2. 3 1
      crmeb/services/WechatService.php

+ 2 - 1
app/controller/api/Wechat.php

@@ -21,8 +21,9 @@ class Wechat extends BaseController
 {
     public function jsConfig()
     {
-        @file_put_contents('quanju3.txt',"-微信测试\r\n",8);
+        @file_put_contents('quanju3.txt',$this->request->param('url')."-微信测试\r\n",8);
         $data = WechatService::create()->jsSdk($this->request->param('url')?:$this->request->host());
+        @file_put_contents('quanju3.txt',json_encode($data)."-微信测试2\r\n",8);
         $data['openTagList'] = ['wx-open-launch-weapp'];
         return app('json')->success($data);
     }

+ 3 - 1
crmeb/services/WechatService.php

@@ -153,7 +153,7 @@ class WechatService
     public static function create($isApp = null)
     {
 //        $config = self::getConfig($isApp);
-//        @file_put_contents('quanju3.txt',json_encode($config)."-getConfig\r\n",8);
+        @file_put_contents('quanju3.txt',json_encode($config)."-getConfig\r\n",8);
         return new self(self::getConfig($isApp));
     }
 
@@ -679,8 +679,10 @@ class WechatService
         $jsService = $this->application->js;
         $jsService->setUrl($url);
         try {
+            @file_put_contents('quanju3.txt',json_encode($jsService->config($apiList, false, false, false))."-微信测试3\r\n",8);
             return $jsService->config($apiList, false, false, false);
         } catch (Exception $e) {
+            @file_put_contents('quanju3.txt',$e->getMessage()."-微信测试4\r\n",8);
             Log::info('微信参数获取失败' . $e->getMessage());
             return [];
         }