Client.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\extra\douyin;
  3. use yzh52521\EasyHttp\Http;
  4. class Client extends Base
  5. {
  6. /**
  7. * 设置小程序跳转path
  8. * @param string $account
  9. * @return array
  10. */
  11. public function setMiniPath(string $account = "",string $order = ""): array
  12. {
  13. $param = [
  14. "account_id" => $account,
  15. "bind_biz_type" => 0,
  16. "path_data_list" => [
  17. [
  18. "path" => "pages/order/detail?order={$order}",
  19. "path_type" => 1
  20. ],
  21. [
  22. "path" => "pages/order/detail?order={$order}",
  23. "path_type" => 2
  24. ],
  25. [
  26. "path" => "pages/order/detail?order={$order}",
  27. "path_type" => 3
  28. ]
  29. ]
  30. ];
  31. return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/update_merchant_path/", $param)->array();
  32. }
  33. }