...
|
...
|
@@ -133,20 +133,16 @@ class AutosignController extends WebAction |
|
|
|
|
|
$refer = $this->getCookie('refer');
|
|
|
if (empty($refer)) {
|
|
|
$refer = SITE_MAIN . '/?go=1';
|
|
|
$refer = SITE_MAIN;
|
|
|
}
|
|
|
else {
|
|
|
$refer = rawurldecode($refer);
|
|
|
}
|
|
|
|
|
|
//判定是否需要绑定手机号
|
|
|
if (isset($result['data']['mobile']) && $result['data']['mobile'] == '') {
|
|
|
$token = Helpers::makeToken($result['data']['uid']);
|
|
|
$this->setSession('_TOKEN', $token);
|
|
|
$this->setSession('_LOGIN_UID', $result['data']['uid']);
|
|
|
$this->setCookie('_TOKEN', $token);
|
|
|
$fillHerf = rawurlencode(Helpers::url('/passport/autouserinfo/userinfo', array('openId' => $access['openid'], 'sourceType' => 'qq', 'nickname' => $partnerInfo['nickname'])));
|
|
|
$this->go(Helpers::syncUserSession($result['data']['uid'], $fillHerf));
|
|
|
if (isset($result['data']['is_bind']) && $result['data']['is_bind'] == 'N') {
|
|
|
$fillHerf = Helpers::url('/passport/thirdlogin/index', array('openId' => $access['openid'], 'sourceType' => 'qq', 'nickname' => $partnerInfo['nickname']));
|
|
|
$this->go($fillHerf);
|
|
|
}
|
|
|
|
|
|
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
|
...
|
...
|
@@ -273,7 +269,7 @@ class AutosignController extends WebAction |
|
|
$this->setSession('_TOKEN', $token);
|
|
|
$this->setSession('_LOGIN_UID', $result['data']['uid']);
|
|
|
$this->setCookie('_TOKEN', $token);
|
|
|
$fillHerf =rawurlencode(Helpers::url('/passport/autouserinfo/userinfo', array('openId' => $access['douban_user_id'], 'sourceType' => 'douban', 'nickname' => $partnerInfo['name'])));
|
|
|
$fillHerf = rawurlencode(Helpers::url('/passport/autouserinfo/userinfo', array('openId' => $access['douban_user_id'], 'sourceType' => 'douban', 'nickname' => $partnerInfo['name'])));
|
|
|
$this->go(Helpers::syncUserSession($result['data']['uid'], $fillHerf));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -311,7 +307,7 @@ class AutosignController extends WebAction |
|
|
$result = array();
|
|
|
if ($partnerInfo && is_array($partnerInfo)) {
|
|
|
$shoppingKey = Helpers::getShoppingKeyByCookie();
|
|
|
$result = LoginData::signinByOpenID($partnerInfo['nickname'],$partnerInfo['openid'], 'wechat', $shoppingKey,$partnerInfo['openid']);
|
|
|
$result = LoginData::signinByOpenID($partnerInfo['nickname'], $partnerInfo['openid'], 'wechat', $shoppingKey, $partnerInfo['openid']);
|
|
|
}
|
|
|
|
|
|
//判定是否需要绑定手机号
|
...
|
...
|
@@ -320,7 +316,7 @@ class AutosignController extends WebAction |
|
|
$this->setSession('_TOKEN', $token);
|
|
|
$this->setSession('_LOGIN_UID', $result['data']['uid']);
|
|
|
$this->setCookie('_TOKEN', $token);
|
|
|
$fillHerf =rawurlencode(Helpers::url('/passport/autouserinfo/userinfo', array('openId' => $partnerInfo['openid'], 'sourceType' => 'wechat', 'nickname' => $partnerInfo['nickname'])));
|
|
|
$fillHerf = rawurlencode(Helpers::url('/passport/autouserinfo/userinfo', array('openId' => $partnerInfo['openid'], 'sourceType' => 'wechat', 'nickname' => $partnerInfo['nickname'])));
|
|
|
$this->go(Helpers::syncUserSession($result['data']['uid'], $fillHerf));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -343,4 +339,5 @@ class AutosignController extends WebAction |
|
|
$this->go($refer);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|