|
|
@@ -18,21 +18,26 @@ class GoodsCategoryLogic extends BaseLogic
|
|
|
*/
|
|
|
public static function getQRCode()
|
|
|
{
|
|
|
- try {
|
|
|
- $config = WeChatConfigService::getMnpConfig();
|
|
|
- $app = new Application($config);
|
|
|
- $response = $app->getClient()->postJson('/wxa/getwxacodeunlimit', [
|
|
|
- 'scene' => 'type=2&id=19',
|
|
|
- 'page' => '/pages/good/good',
|
|
|
- 'width' => 430,
|
|
|
- 'check_path' => false,
|
|
|
- 'env_vesion' => 'trial'
|
|
|
- ]);
|
|
|
- dd($response);
|
|
|
- } catch (\Throwable $e) {
|
|
|
- // 失败
|
|
|
- echo $e->getMessage();
|
|
|
- }
|
|
|
+ $config = WeChatConfigService::getMnpConfig();
|
|
|
+
|
|
|
+ $app = new Application($config);
|
|
|
+ $response = $app->getClient()->postJson('/wxa/getwxacodeunlimit', [
|
|
|
+ 'scene' => '123',
|
|
|
+ 'page' => 'pages/index/index',
|
|
|
+ 'width' => 430,
|
|
|
+ 'check_path' => false,
|
|
|
+ ]);
|
|
|
+ $path = $response->saveAs('/tmp/wxacode-123.png');
|
|
|
+ dd($response);
|
|
|
+
|
|
|
+ $response = $app->getClient()->postJson('/wxa/getwxacodeunlimit', [
|
|
|
+ 'scene' => 'type=2&id=19',
|
|
|
+ 'page' => '/pages/good/good',
|
|
|
+ 'width' => 430,
|
|
|
+ 'check_path' => false,
|
|
|
+ 'env_vesion' => 'trial'
|
|
|
+ ]);
|
|
|
+ dd($response);
|
|
|
|
|
|
}
|
|
|
|