QrcodeController.php
468 字节
<?php
/**
* Created by PhpStorm.
* User: 29925
* Date: 2018/7/23
* Time: 14:32
*/
namespace api\portal\controller;
use cmf\controller\HomeBaseController;
class QrcodeController extends HomeBaseController
{
// 微信支付二维码
public function qrcode() {
$data = $this->request->param('data');
require_once VENDOR_PATH.'WxpayAPI/example/phpqrcode/phpqrcode.php';
$url = urldecode($data);
\QRcode::png($url);
}
}