链街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

<?php
namespace App\Admin\Common;
use Dcat\Admin\Controllers\AdminController;
use EasyWeChat\Factory;
class WeChatQrCode extends AdminController
{
protected $images;
public function __construct()
{
$this->images = new Images();
}
/**
* 服务站专员评价小程序码
*/
public function getServicePersonnel($id)
{
$param = "page=details&id={$id}";
$path = "zh_cjdianc/pages/Liar/loginindex";
$codeImg = $this->images->createQrCode($param,$path);
$imgPath = 'public/upload/qrcode/'.date('Y') . '/' . date('m-d') . '/' . date('His').md5(time()).'.png';/* 生成唯一文件名 */
$res = $this->images->uploadOss($codeImg,$imgPath);
if($res){
return ['status' => true ,'path' => $imgPath];
}else{
return ['status' => false ,'path' => ''];
}
}
}