public function wxOauth()
{
var_dump($_SERVER["HTTP_REFERER"]);die();
if(isset($_GET['code'])){
$token=$this->weObj->getOauthAccessToken();
$userinfo=$this->weObj->getOauthUserinfo($token['access_token'],$token['openid']); // 根据openid 查询用户名的id 如果有id 没有存储 拿到id
// $_SERVER['HTTP_REFERER']
echo $this->rurl; //header('location:'.$this->rurl);
}else{ //$_SERVER['REQUEST_URI']
$this->rurl=$_SERVER['HTTP_REFERER'];
$host='http://'.$_SERVER['HTTP_HOST'].__SELF__;
$url=$this->weObj->getOauthRedirect($host);
header('location:'.$url);
}
}