QrcodeService.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace service;
  12. use app\admin\model\wechat\WechatQrcode as QrcodeModel;
  13. class QrcodeService
  14. {
  15. /**
  16. * 获取临时二维码 单个
  17. * */
  18. public static function getTemporaryQrcode($type, $id)
  19. {
  20. return QrcodeModel::getTemporaryQrcode($type, $id)->toArray();
  21. }
  22. /**
  23. * 获取永久二维码 单个
  24. * */
  25. public static function getForeverQrcode($type, $id)
  26. {
  27. return QrcodeModel::getForeverQrcode($type, $id)->toArray();
  28. }
  29. public static function getQrcode($id, $type = 'id')
  30. {
  31. return QrcodeModel::getQrcode($id, $type);
  32. }
  33. public static function scanQrcode($id, $type = 'id')
  34. {
  35. return QrcodeModel::scanQrcode($id, $type);
  36. }
  37. }