|
@@ -34,20 +34,14 @@ class wxauthor
|
|
|
$this->mErrcode = 0;
|
|
|
}
|
|
|
|
|
|
- public function enter($origin_url,$state_param=[])
|
|
|
+ public function enter($origin_url)
|
|
|
{
|
|
|
$back_url = 'https://passport.lrlz.com/mobile/wxauthor.php';
|
|
|
- $state = urlencode(BASE_SITE_URL);
|
|
|
- if(!empty($state_param)){
|
|
|
- $state_param = implode('_',$state_param);
|
|
|
- $state .= '_'.$state_param;
|
|
|
- }
|
|
|
$params = [ 'appid' => self::appid,
|
|
|
'redirect_uri' => $back_url,
|
|
|
'response_type' => 'code',
|
|
|
'scope' => 'snsapi_userinfo',
|
|
|
- 'state' => $state
|
|
|
- ];
|
|
|
+ 'state' => urlencode(BASE_SITE_URL)];
|
|
|
$ref_url = util::http_add_params(self::authorize_url,$params);
|
|
|
$ref_url .= '#wechat_redirect';
|
|
|
wechat_helper::set_origin_url($origin_url);
|