zhanglinxin 1 year ago
parent
commit
8abf19adc5
1 changed files with 8 additions and 7 deletions
  1. 8 7
      application/extend/Dingtalk/Sample.php

+ 8 - 7
application/extend/Dingtalk/Sample.php

@@ -39,14 +39,14 @@ class Sample
         }
 
         $client = self::createClient();
-        $getAccessTokenRequest = new GetAccessTokenRequest([
-            "appKey" => "dingekepwoyycxfbtyvg",
-            "appSecret" => "EjM9WohvKHo3eNqZGGbQHhbjM80QzapdC_f_reYiOCyEFOtaG1qoG2KzEfpSoLWe",
-        ]);
 //        $getAccessTokenRequest = new GetAccessTokenRequest([
-//            "appKey" => "'dingilnkljzq3a4chjrw",
-//            "appSecret" => "Dt-nHAw4G-dniS7P9VmbnQRIKHQfGIQNIVHVNVHOZMtLPcsIv4KJYk_AjBCRsaH4"
+//            "appKey" => "dingekepwoyycxfbtyvg",
+//            "appSecret" => "EjM9WohvKHo3eNqZGGbQHhbjM80QzapdC_f_reYiOCyEFOtaG1qoG2KzEfpSoLWe",
 //        ]);
+        $getAccessTokenRequest = new GetAccessTokenRequest([
+            "appKey" => "'dingilnkljzq3a4chjrw",
+            "appSecret" => "Dt-nHAw4G-dniS7P9VmbnQRIKHQfGIQNIVHVNVHOZMtLPcsIv4KJYk_AjBCRsaH4"
+        ]);
         try {
             $res = $client->getAccessToken($getAccessTokenRequest);
         } catch (Exception $err) {
@@ -56,7 +56,8 @@ class Sample
             if (!Utils::empty_($err->code) && !Utils::empty_($err->message)) {
                 // err 中含有 code 和 message 属性,可帮助开发定位问题
             }
-            p($err->getMessage(), $err->getCode());exit;
+            p($err->getMessage(), $err->getCode());
+            exit;
         }
 
         if ($res->body) {