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
847 B
34 lines
847 B
<?php
|
|
|
|
namespace App\Admin\Common;
|
|
|
|
use Dcat\Admin\Controllers\AdminController;
|
|
use EasyWeChat\Factory;
|
|
|
|
class QRCode extends AdminController
|
|
{
|
|
protected $images;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->images = new Images();
|
|
}
|
|
|
|
/**
|
|
* 服务站专员评价小程序码
|
|
*/
|
|
public function getServicePersonnel($id, $path)
|
|
{
|
|
$param = "page=details&id={$id}";
|
|
$path = "zh_cjdianc/pages/Liar/loginindex";
|
|
$codeStore = $this->images->createQrCode($param,$path);
|
|
$storeImgPath = 'QR_code/code_service_personnel_img/personnel_'.$id.'.jpg';
|
|
$res = $this->images->uploadOss($codeStore,$storeImgPath);
|
|
if($res){
|
|
return ['status' => true ,'path' => $storeImgPath];
|
|
}else{
|
|
return ['status' => false ,'path' => ''];
|
|
}
|
|
}
|
|
|
|
}
|