| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?php
- namespace app\extra\douyin;
- use yzh52521\EasyHttp\Http;
- class Client extends Base
- {
- /**
- * 设置小程序跳转path
- * @param string $account
- * @return array
- */
- public function setMiniPath(string $account = "",string $order = ""): array
- {
- $param = [
- "account_id" => $account,
- "bind_biz_type" => 0,
- "path_data_list" => [
- [
- "path" => "pages/order/detail",
- "path_type" => 1
- ],
- [
- "path" => "pages/order/detail",
- "path_type" => 2
- ],
- [
- "path" => "pages/order/detail",
- "path_type" => 3
- ]
- ]
- ];
- 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,
- "time_range" => [
- "start_time" => strtotime("-120 min"),
- "end_time" => strtotime("+120 min")
- ]
- ];
- return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/trade/v2/fulfillment/query_user_certificates/", $param)->array();
- }
- /**
- * 查询商家配置文案
- * @return array
- */
- public function getBtnText(): array
- {
- return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/query_text/", ["text_type" => 0])->array();
- }
- /**
- * 设置商家配置文案
- * @param string $account
- * @return array
- */
- public function setBtnText(string $account = ""): array
- {
- $param = [
- "account_id" => $account,
- "bind_biz_type" => 0,
- "delivery_app_info" => [
- "button_text_id" => "te7252216917182660619",
- "display_mode" => 2,
- "guidance_text_id"=>"te7249212519187791884"
- ]
- ];
- return Http::asJson()->withHeaders($this->header)->post($this->gateway."api/apps/trade/v2/toolkit/update_merchant_conf/", $param)->array();
- }
- }
|