PHP小程序二维码生成
TP5(小程序二维码生成)代码示例:
//小程序二维码生成(已测试)
public function getQRcode($getData){
$this->projectName='zhihuiceping';//项目文件名称
$getData=json_decode($getData,true);
$userId=isset($getData['userId'])?$getData['userId']:'';
$productId=isset($getData['productId'])?$getData['productId']:'';
$type=$getData['type'];
$orderId=isset($getData['orderId'])?$getData['orderId']:'';
$adminId=isset($getData['adminId'])?$getData['adminId']:'';
switch ($type) {
case 'adminIdPoster':
//商品详情
$name=$this->projectName.'adminIdPoster'.$adminId;
$data = array(
'path'=>'pages/home/index?adminId='.$adminId,
'auto_color' => false,
'width' => 400,
// 'is_hyaline'=>true
);
break;
case 'product':
//商品详情
$name=$this->projectName.'product'.$userId.$productId;
$data = array(
'path'=>'pages/products/detail/index?id='.$productId.'&fid='.$userId,