0
点赞
收藏
分享

微信扫一扫

微信开发 预请求会刷新token的情况


thinkphp5过滤下就好了

if ($this->request->isGet()){
//回调地址会传回一个code,则我们根据code去获取openid和授权获取到的access_token
$code = $_GET['code'];

}

 

通过测试发现微信开发者工具是模拟的手机options请求

thinkphp5打印方法


// 是否为手机访问
if (Request::instance()->isMobile()) echo "当前为手机访问";
// 是否为 OPTIONS 请求
if (Request::instance()->isOptions()) echo "当前为 OPTIONS 请求";

举报

相关推荐

0 条评论