初始化项目:添加后端代码、ThinkPHP框架、前端资源

This commit is contained in:
amb
2026-09-03 12:42:39 +08:00
commit 482bece22e
3726 changed files with 416708 additions and 0 deletions
@@ -0,0 +1,40 @@
<?php
/*
* This file is part of the overtrue/wechat.
*
* (c) overtrue <i@overtrue.me>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace TuzhiEasyWeChat\BasicService\Url;
use TuzhiEasyWeChat\Kernel\BaseClient;
/**
* Class Client.
*
* @author overtrue <i@overtrue.me>
*/
class Client extends BaseClient
{
/**
* Shorten the url.
*
* @return \Psr\Http\Message\ResponseInterface|\TuzhiEasyWeChat\Kernel\Support\Collection|array|object|string
*
* @throws \TuzhiEasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function shorten(string $url)
{
$params = [
'action' => 'long2short',
'long_url' => $url,
];
return $this->httpPostJson('cgi-bin/shorturl', $params);
}
}