封装CURL工具包
实现第三方登录
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
const GET_CODE_URL = 'https://open.weixin.qq.com/connect/qrconnect';
const GET_ACCESS_TOKEN_URL = 'https://api.weixin.qq.com/sns/oauth2/access_token';
const REFRESH_ACCESS_TOKEN_URL = 'https://api.weixin.qq.com/sns/oauth2/refresh_token';
const TEST_ACCESS_TOKEN_URL = 'https://api.weixin.qq.com/sns/auth';
const GET_USERINFO_URL = 'https://api.weixin.qq.com/sns/userinfo';
public $urlUtil;
public function __construct(){
parent::__construct();
$this->urlUtil = new UrlUtil;
}
/*
* 微信扫码页面<