Qrcode.php 944 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace app\event;
  11. use app\model\system\Qrcode as QrcodeModel;
  12. /**
  13. * 生成二维码
  14. * @author Administrator
  15. *
  16. */
  17. class Qrcode
  18. {
  19. public function handle($param)
  20. {
  21. if (in_array($param[ "app_type" ], [ 'pc', 'h5', 'all', 'wechat', 'app' ])) {
  22. if ($param[ "app_type" ] == 'pc') {
  23. $param[ "app_type" ] = 'pc';
  24. } else {
  25. $param[ "app_type" ] = 'h5';
  26. }
  27. $qrcode = new QrcodeModel();
  28. $res = $qrcode->createQrcode($param);
  29. return $res;
  30. }
  31. }
  32. }