去除一些注释

This commit is contained in:
wucongxing 2023-10-24 17:29:10 +08:00
parent 9c4136e917
commit 202db1a621
2 changed files with 33 additions and 29 deletions

View File

@ -462,27 +462,40 @@ class TestController extends AbstractController
} }
public function test_17(){ public function test_17(){
$weChat = new Wechat(1);
$env_version = "release"; $re = \Hyperf\Context\ApplicationContext::getContainer()->get(CacheInterface::class);
$app_env = \Hyperf\Support\env("APP_ENV",'dev'); $a = $re->set("wucongxing","1",100);
if ($app_env == "dev"){ dump($a);
$env_version = "trial"; $b = $re->get("wucongxing");
} dump($b);
$options = [ $redis = \Hyperf\Context\ApplicationContext::getContainer()->get(Redis::class);
"scene" => "?doctor_id=516900370252341248",// query 参数 $c = $redis->get("wucongxing");
"page" => "pages/expertDetail/expertDetail", dump($c);
"check_path" => false,
"env_version" => $env_version,
];
$img_buffer = $weChat->getUnlimitedQRCode($options);
$oss = new Oss(); //
// $weChat = new Wechat(1);
$filename = "applet/doctor/card/516900370252341248.jpg"; //
// $env_version = "release";
$oss->putObject($filename, $img_buffer); // $app_env = \Hyperf\Support\env("APP_ENV",'dev');
// if ($app_env == "dev"){
// $env_version = "trial";
// }
//
// $options = [
// "scene" => "?doctor_id=516900370252341248",// query 参数
// "page" => "pages/expertDetail/expertDetail",
// "check_path" => false,
// "env_version" => $env_version,
// ];
//
// $img_buffer = $weChat->getUnlimitedQRCode($options);
//
// $oss = new Oss();
//
// $filename = "applet/doctor/card/516900370252341248.jpg";
//
// $oss->putObject($filename, $img_buffer);
} }
} }

View File

@ -22,6 +22,8 @@ use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface; use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Hyperf\Context\ApplicationContext; use Hyperf\Context\ApplicationContext;
use Hyperf\Guzzle\CoroutineHandler;
/** /**
* 微信类 * 微信类
@ -70,17 +72,6 @@ class Wechat
// 'base_uri' => 'https://api.weixin.qq.com/', // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri // 'base_uri' => 'https://api.weixin.qq.com/', // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
'retry' => true, // 使用默认重试配置 'retry' => true, // 使用默认重试配置
// 'retry' => [
// // 仅以下状态码重试
// 'http_codes' => [429, 500]
// // 最大重试次数
// 'max_retries' => 3,
// // 请求间隔 (毫秒)
// 'delay' => 1000,
// // 如果设置,每次重试的等待时间都会增加这个系数
// // (例如. 首次:1000ms; 第二次: 3 * 1000ms; etc.)
// 'multiplier' => 3
// ],
] ]
); );