参考了许多代码,重点是这篇:http://www.php.cn/xiaochengxu-353601.html
/**
* 微信小程序二维码-商家详情*/
public function appletCode(Request $request)
{
$store_id = $request->input('id','');
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx2f90faa515ff788a&secret=c6aad1dd72129264618a8f50c258a463";
$url = "https://api.weixin.qq.com/cgi-bin/token";
// $url = "https://cli.api.qesion.com/routine/activity/storeDetail";
$params = ['grant_type'=>'client_credential','appid'=>'wx2f90faa515ff788a','secret'=>'c6aad1dd72129264618a8f50c258a463'];
$access_token = Lcurl::curl($url,$params,'GET',TRUE);
$access_token = json_decode($access_token,true)['access_token'];
$path="pages/s