Zory hai 1 semana
pai
achega
8a94044b73
Modificáronse 3 ficheiros con 19 adicións e 2 borrados
  1. 2 1
      app/controller/mini/Test.php
  2. 16 0
      app/extra/douyin/Client.php
  3. 1 1
      config/think-cache.php

+ 2 - 1
app/controller/mini/Test.php

@@ -21,7 +21,8 @@ class Test extends Base
         try {
             $uuid = ["228287898988984"];
 //            $resp = (new \app\extra\douyin\Account())->config($this->getDyConfig())->token()->setWhiteSetting("7513378475235919883",1,true);
-            $resp = (new Client)->config($this->getDyConfig())->token()->setMiniPath("7513378475235919883","1090105536412828984");
+            $resp = (new Client)->config($this->getDyConfig())->token()->setMiniPath("7513378475235919883","1090045011490588984");
+//            $resp = (new Client)->config($this->getDyConfig())->token()->queryOrder("7513378475235919883","_000SDaHqDYY9GGnyrpYfp4vIPHD8qs32XCx");
             print_r($resp);
             return success("ok");
         } catch (\Throwable $throwable) {

+ 16 - 0
app/extra/douyin/Client.php

@@ -36,4 +36,20 @@ class Client extends Base
         return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/update_merchant_path/", $param)->array();
     }
 
+    /**
+     * 查下用户订单
+     * @param string $account
+     * @param string $openId
+     * @return array
+     */
+    public function queryOrder(string $account = "",string $openId = ""): array
+    {
+        $param = [
+            "account_id"        => $account,
+            "open_id"           => $openId,
+            "biz_type"          => 1,
+        ];
+        return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/trade/v2/fulfillment/query_user_certificates/", $param)->array();
+    }
+
 }

+ 1 - 1
config/think-cache.php

@@ -1,7 +1,7 @@
 <?php
 return [
     // 默认缓存驱动
-    'default' => 'redis',
+    'default' => 'file',
     // 缓存连接方式配置
     'stores'  => [
         // redis缓存