web-view中嵌入了跳转获取微信公众号code的。显示redirect_ur

发布于 7 年前作者 tangxiulan18008 次浏览最后编辑 7 年前来自 ask

在小程序中用web-view中嵌入了一个网页。这个网页在微信浏览器中通过跳转获取code ,然后再获取openid

但在小程序中显示redirect_uri参数错误

$REDIRECT_URI=‘https://jqr.****.com/oa/pic.php?itemid=’.$itemid.‘&u=’.$u.‘’;

$url='https://open.weixin.qq.com/connect/oauth2/authorize?appid=‘.$appid.’&redirect_uri=‘.urlencode($REDIRECT_URI).’&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect’;

header(“Location:”.$url);

0 回复
暂无回复