<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Oauth; use ModStart\Core\Input\Response; use Module\Member\Util\MemberUtil; abstract class AbstractOauth { public function hasRender() { return true; } public function isSupport() { return true; } public function color() { return null; } public function title() { return $this->name(); } public function oauthKey() { return $this->name(); } public abstract function name(); public abstract function render(); public function bindRender() { return null; } public abstract function processRedirect($qOrzw); public abstract function processLogin($qOrzw); public function processTryLogin($qOrzw) { goto pswGo; Bv2d5: $Fc5NO = $Uxocm['openid']; goto hMAzQ; pswGo: $Uxocm = $qOrzw['userInfo']; goto Bv2d5; c3a3C: if ($KJqKC) { return Response::generateSuccessData(array('memberUserId' => $KJqKC)); } goto uUtNh; uUtNh: return Response::generateSuccessData(array('memberUserId' => 0)); goto x69oz; hMAzQ: $KJqKC = MemberUtil::getIdByOauthAndCheck($this->name(), $Fc5NO); goto c3a3C; x69oz: } public function processBindToUser($qOrzw) { goto cAO6x; AK6qf: if (!empty($Uxocm['username'])) { $K1Wao['infoUsername'] = $Uxocm['username']; } goto n3lZz; n3lZz: if (!empty($Uxocm['avatar'])) { $K1Wao['infoAvatar'] = $Uxocm['avatar']; } goto GL8CG; SJ1bg: if ($ULYbu && $KJqKC != $ULYbu) { MemberUtil::forgetOauth($this->name(), $Uxocm['openid']); } goto SqaCl; pfMhS: return Response::generateSuccess(); goto ZOV0z; ez_LR: $Uxocm = $qOrzw['userInfo']; goto ncqcj; ncqcj: $ULYbu = MemberUtil::getIdByOauthAndCheck($this->name(), $Uxocm['openid']); goto SJ1bg; GL8CG: MemberUtil::putOauth($KJqKC, $this->name(), $Uxocm['openid'], $K1Wao); goto pfMhS; SqaCl: $K1Wao = array(); goto AK6qf; cAO6x: $KJqKC = $qOrzw['memberUserId']; goto ez_LR; ZOV0z: } }