update
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace app\controller;
|
namespace app\controller;
|
||||||
|
|
||||||
use EasyWeChat\Factory;
|
use EasyWeChat\Factory;
|
||||||
|
use GuzzleHttp\Client;
|
||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
|
|
||||||
class Check
|
class Check
|
||||||
@@ -11,10 +12,16 @@ class Check
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$url = $GLOBALS['data']['data']['url'];
|
$url = $GLOBALS['data']['data']['url'];
|
||||||
|
$call = 'https://mp.weixinbridge.com/mp/wapredirect?url='.$url;
|
||||||
|
|
||||||
$app = Factory::officialAccount(Config::get('wechat'));
|
$client = new Client();
|
||||||
|
$response = $client->request('GET', urlencode($call));
|
||||||
|
|
||||||
dump($app->url->shorten($url));
|
dump($response);
|
||||||
|
//weixin110.qq.com
|
||||||
|
dump($response->getReasonPhrase());
|
||||||
|
dump($response->getBody());
|
||||||
|
dump($response->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,8 @@
|
|||||||
"alibabacloud/client": "^1.5",
|
"alibabacloud/client": "^1.5",
|
||||||
"aliyuncs/oss-sdk-php": "^2.6",
|
"aliyuncs/oss-sdk-php": "^2.6",
|
||||||
"topthink/think-view": "^1.0",
|
"topthink/think-view": "^1.0",
|
||||||
"overtrue/wechat": "~5.0"
|
"overtrue/wechat": "~5.0",
|
||||||
|
"guzzlehttp/guzzle": "^7.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": "^4.2",
|
"symfony/var-dumper": "^4.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user