GoodsCategoryLogic.php 903 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\workerapi\logic;
  3. use app\common\logic\BaseLogic;
  4. use app\common\service\wechat\WeChatConfigService;
  5. use app\common\service\wechat\WeChatMnpService;
  6. use EasyWeChat\MiniApp\Application;
  7. /**
  8. * 服务商品逻辑处理
  9. * Class GoodsCategoryLogic
  10. * @package app\workerapi\logic
  11. */
  12. class GoodsCategoryLogic extends BaseLogic
  13. {
  14. /**
  15. * @return \EasyWeChat\Kernel\HttpClient\Response|false|\Symfony\Contracts\HttpClient\ResponseInterface
  16. */
  17. public static function getQRCode()
  18. {
  19. $config = WeChatConfigService::getMnpConfig();
  20. $app = new Application($config);
  21. $response = $app->getClient()->postJson('/wxa/getwxacodeunlimit', [
  22. 'scene' => '123',
  23. 'page' => 'pages/good/good',
  24. 'width' => 430,
  25. 'check_path' => false,
  26. 'env_vesion' => 'trial'
  27. ]);
  28. dd($response);
  29. }
  30. }