require_once EXTEND_PATH.'phpqrcode/phpqrcode.php';
//保存为图片
$file_path = '/qr/'.md5(uniqid().'xxxxx').'.png';
$file = ROOT_PATH.'public/'.$file_path;
\QRcode::png(request()->domain().'/xxxxx/'.'xxxx' ,$file,QR_ECLEVEL_H,20,1);
$file_path = request()->domain().$file_path;
//获取二维码内容
ob_start();
\QRcode::png('xxxxx', false, QR_ECLEVEL_L, 5, 2);
$imageString = ob_get_contents();
ob_end_clean();
$base64 = 'data:image/png;base64,'.base64_encode($imageString);