QrcodeService.php 795 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. *
  4. * @author: xaboy<365615158@qq.com>
  5. * @day: 2017/10/24
  6. */
  7. namespace service;
  8. use app\admin\model\wechat\WechatQrcode as QrcodeModel;
  9. class QrcodeService
  10. {
  11. /**
  12. * 获取临时二维码 单个
  13. * */
  14. public static function getTemporaryQrcode($type,$id){
  15. return QrcodeModel::getTemporaryQrcode($type,$id)->toArray();
  16. }/**
  17. * 获取永久二维码 单个
  18. * */
  19. public static function getForeverQrcode($type,$id){
  20. return QrcodeModel::getForeverQrcode($type,$id)->toArray();
  21. }
  22. public static function getQrcode($id,$type = 'id')
  23. {
  24. return QrcodeModel::getQrcode($id,$type);
  25. }
  26. public static function scanQrcode($id,$type = 'id')
  27. {
  28. return QrcodeModel::scanQrcode($id,$type);
  29. }
  30. }