<?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($EPwwc); public abstract function processLogin($EPwwc); public function processTryLogin($EPwwc) { goto ZDmoO; ME2pC: $d4RRw = MemberUtil::getIdByOauthAndCheck($this->name(), $d3gi_); goto mEHB5; mEHB5: if ($d4RRw) { return Response::generateSuccessData(array('memberUserId' => $d4RRw)); } goto qzgwF; ZDmoO: $v9Evc = $EPwwc['userInfo']; goto DVO2r; qzgwF: return Response::generateSuccessData(array('memberUserId' => 0)); goto Lw11a; DVO2r: $d3gi_ = $v9Evc['openid']; goto ME2pC; Lw11a: } public function processBindToUser($EPwwc) { goto G3Y6L; jCvhU: if ($M3rBS && $d4RRw != $M3rBS) { MemberUtil::forgetOauth($this->name(), $v9Evc['openid']); } goto cM700; nGrx5: $v9Evc = $EPwwc['userInfo']; goto pZkk8; KEe9L: return Response::generateSuccess(); goto C5BIe; cM700: $PbcSo = array(); goto VO_1d; pZkk8: $M3rBS = MemberUtil::getIdByOauthAndCheck($this->name(), $v9Evc['openid']); goto jCvhU; VO_1d: if (!empty($v9Evc['username'])) { $PbcSo['infoUsername'] = $v9Evc['username']; } goto tl45B; G3Y6L: $d4RRw = $EPwwc['memberUserId']; goto nGrx5; opwz1: MemberUtil::putOauth($d4RRw, $this->name(), $v9Evc['openid'], $PbcSo); goto KEe9L; tl45B: if (!empty($v9Evc['avatar'])) { $PbcSo['infoAvatar'] = $v9Evc['avatar']; } goto opwz1; C5BIe: } }