From df42093d9b0cab13faedd689427e890f6071ae49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Wed, 20 Sep 2023 10:17:21 +0800 Subject: [PATCH] Update client.md --- docs/src/4.x/client.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/4.x/client.md b/docs/src/4.x/client.md index 8c486d0d5..78dc58638 100644 --- a/docs/src/4.x/client.md +++ b/docs/src/4.x/client.md @@ -3,10 +3,10 @@ 该方法将 API 交由开发者自行调用,微信有部分新的接口4.x并未全部兼容支持,可以使用该方案去自行封装接口: 例如URL Link接口 + ```php -$api = $app->getClient(); -$response = $api->httpPostJson('wxa/generate_urllink',[ +$response = $app->httpPostJson('wxa/generate_urllink',[ 'path' => 'pages/index/index', 'is_expire' => true, 'expire_type' => 1, @@ -26,7 +26,7 @@ httpPostJson(string $uri, array $data = [], array $query = []) ### GET ```php -$response = $api->httpGet('/cgi-bin/user/list', [ +$response = $app->httpGet('/cgi-bin/user/list', [ 'next_openid' => 'OPENID1', ]); ``` @@ -34,7 +34,7 @@ $response = $api->httpGet('/cgi-bin/user/list', [ ### POST ```php -$response = $api->httpPostJson('/cgi-bin/user/info/updateremark', [ +$response = $app->httpPostJson('/cgi-bin/user/info/updateremark', [ "openid" => "oDF3iY9ffA-hqb2vVvbr7qxf6A0Q", "remark" => "pangzi" ]);