<?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($w6bW5); public abstract function processLogin($w6bW5); public function processTryLogin($w6bW5) { goto BWWe5; QxX_5: $EnwK6 = $YSGKg['openid']; goto Utdho; iceke: return Response::generateSuccessData(array('memberUserId' => 0)); goto p4EYl; Utdho: $shbIl = MemberUtil::getIdByOauthAndCheck($this->name(), $EnwK6); goto p2am6; p2am6: if ($shbIl) { return Response::generateSuccessData(array('memberUserId' => $shbIl)); } goto iceke; BWWe5: $YSGKg = $w6bW5['userInfo']; goto QxX_5; p4EYl: } public function processBindToUser($w6bW5) { goto bDvJj; VgjWQ: $Yee6d = array(); goto BD1p4; i_9Va: return Response::generateSuccess(); goto qJYh3; dux42: MemberUtil::putOauth($shbIl, $this->name(), $YSGKg['openid'], $Yee6d); goto i_9Va; tu371: $gZ39D = MemberUtil::getIdByOauthAndCheck($this->name(), $YSGKg['openid']); goto Z2eXQ; ZnkfW: if (!empty($YSGKg['avatar'])) { $Yee6d['infoAvatar'] = $YSGKg['avatar']; } goto dux42; BD1p4: if (!empty($YSGKg['username'])) { $Yee6d['infoUsername'] = $YSGKg['username']; } goto ZnkfW; bDvJj: $shbIl = $w6bW5['memberUserId']; goto z_DsT; Z2eXQ: if ($gZ39D && $shbIl != $gZ39D) { MemberUtil::forgetOauth($this->name(), $YSGKg['openid']); } goto VgjWQ; z_DsT: $YSGKg = $w6bW5['userInfo']; goto tu371; qJYh3: } }