$path, "width"=>$width, ); if ($is_hyaline==2 and $CodeType==1){ $send=array_merge($send, array("is_hyaline"=>true,)); } // var_dump($send);exit; $send = json_encode($send); $ch = curl_init();//初始化curl curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_URL, $ma_url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS,$send); $data_save = curl_exec($ch);//运行curl // var_dump($data_save);exit; curl_close($ch); header("content-type: image/jpeg"); echo $data_save; }elseif($dir == "shopList"){ $path = "pages/shopList/shopList?"; $can = $_POST[$dir]; $path .= $can; $width = $_POST["width"]; if ($CodeType==1){ $ma_url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=$access_token"; }else{ $ma_url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=$access_token"; } $send = array( "path"=>$path, "width"=>$width, ); if ($is_hyaline==2 and $CodeType==1){ $send=array_merge($send, array("is_hyaline"=>true,)); } $send = json_encode($send); $ch = curl_init();//初始化curl curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_URL, $ma_url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS,$send); $data_save = curl_exec($ch);//运行curl // var_dump($data_save);exit; curl_close($ch); header("content-type: image/jpeg"); echo $data_save; }elseif($dir == "define"){ $hand = $_POST["define"]; $width = $_POST["width"]; if ($CodeType==1){ $ma_url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=$access_token"; }else{ $ma_url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=$access_token"; } $send = array( "path"=>$hand, "width"=>$width //"is_hyaline"=>true, ); if ($is_hyaline==2 and $CodeType==1){ $send=array_merge($send, array("is_hyaline"=>true,)); } $send = json_encode($send); $ch = curl_init();//初始化curl curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_URL, $ma_url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS,$send); $data_save = curl_exec($ch);//运行curl // var_dump($data_save);exit; curl_close($ch); header("content-type: image/png"); echo $data_save; } } } ?>
生成二维码类型:
对应的小程序:
小程序指向:
参数:"/>自定义路径例子:pages/index/index
图片宽度:


966120微信小程序路径参考:
首页:pages/index/index
带来源参数的预约入口:pages/index/index?S=XXXX
我的订单:pages/order/list/list
订单详情/支付/评论:pages/order/detail/detail?ServiceOrdID=1016165355
个人中心:pages/my/my
发票申请列表:pages/order/list2/list2?OrdState=11
服务评价列表:pages/order/list2/list2?OrdState=10
H5网页:pages/h5/h5?src=https://api.966120.com.cn/
生成B模式码