...
|
...
|
@@ -400,7 +400,28 @@ class Seller extends Api |
|
|
*/
|
|
|
public function seller_code()
|
|
|
{
|
|
|
$param=$this->request->param();
|
|
|
$this->scerweima($url . '/' . $user_id['id']);
|
|
|
$param = $this->request->param();
|
|
|
$url = $param['url'];
|
|
|
$seller_id = $param['id'];
|
|
|
if (empty($url)) {
|
|
|
$this->error('参数不能为空!', '', '7');
|
|
|
}
|
|
|
function scerweima($url = '', $seller_id = '')
|
|
|
{
|
|
|
Vendor('phpqrcode.phpqrcode');
|
|
|
$errorCorrectionLevel = 'L'; //容错级别
|
|
|
$matrixPointSize = 10; //生成图片大小
|
|
|
//生成二维码图片
|
|
|
$path = "images2/";
|
|
|
$fileName = $path . 'seller_' . $seller_id . '.png';
|
|
|
$qr = new \QRcode();
|
|
|
$qr::png($url, $fileName, $errorCorrectionLevel, $matrixPointSize, 2);
|
|
|
}
|
|
|
|
|
|
scerweima($url . '/' . $seller_id, $seller_id);
|
|
|
$return = [
|
|
|
'url' => $url . '/' . 'images2/seller_' . $seller_id . '.png'
|
|
|
];
|
|
|
$this->success('成功', $return);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|