function h5() {
$wx = new Wx('appId', 'appSecret');
// \dump($wx->getAccessToken());
$url = 'https://api.weixin.qq.com/wxa/generatescheme?' . \http_build_query([
'access_token' => $wx->getAccessToken(),
]);
$res = \jsonDecode(\post($url, \jsonEncode([
'jump_wxa' => [
'path' => '首页路径',
],
'expire_type' => 1,
'expire_interval' => 30,
])));
// \dump($res);
header('location:' . $res['openlink']);
}
标签:浏览器,dump,url,微信,程序,wxa,https,res,wx
From: https://www.cnblogs.com/sunr/p/16984574.html