链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
888 B

  1. <?php
  2. namespace App\Admin\Common;
  3. use Dcat\Admin\Controllers\AdminController;
  4. use EasyWeChat\Factory;
  5. class WeChatQrCode extends AdminController
  6. {
  7. protected $images;
  8. public function __construct()
  9. {
  10. $this->images = new Images();
  11. }
  12. /**
  13. * 服务站专员评价小程序码
  14. */
  15. public function getServicePersonnel($id)
  16. {
  17. $param = "page=details&id={$id}";
  18. $path = "zh_cjdianc/pages/Liar/loginindex";
  19. $codeImg = $this->images->createQrCode($param,$path);
  20. $imgPath = 'public/upload/qrcode/'.date('Y') . '/' . date('m-d') . '/' . date('His').md5(time()).'.png';/* 生成唯一文件名 */
  21. $res = $this->images->uploadOss($codeImg,$imgPath);
  22. if($res){
  23. return ['status' => true ,'path' => $imgPath];
  24. }else{
  25. return ['status' => false ,'path' => ''];
  26. }
  27. }
  28. }