forked from alibaba/phpwind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/** | ||
* 登录 | ||
* | ||
* @author shangyuanchun <[email protected]> | ||
* @copyright ©2003-2015 phpwind.com | ||
* @license http://www.phpwind.com | ||
* @version $Id: PwThirdLoginService.php 24383 2015-06-13 14:10:47Z ideal $ | ||
* @package products.u.service | ||
*/ | ||
class PwThirdLoginService | ||
{ | ||
public static $supportedPlatforms = array( | ||
'qq' => array( | ||
'img' => 'http://qzonestyle.gtimg.cn/qzone/vas/opensns/res/img/bt_blue_76X24.png', | ||
), | ||
'weibo' => array( | ||
'img' => '', | ||
), | ||
); | ||
|
||
public function getPlatforms() | ||
{ | ||
$platforms = array(); | ||
|
||
// 网站的第三方appid和移动app的不一样 | ||
$thirdPlatforms = Wekit::C('webThirdLogin'); | ||
foreach (self::$supportedPlatforms as $p => $c) { | ||
if (!isset($thirdPlatforms[$p.'.status']) || !$thirdPlatforms[$p.'.status']) { | ||
continue; | ||
} | ||
$c['url'] = '/index.php?m=u&c=login&a=thirdLogin&platform='.$p; | ||
$platforms[] = $c; | ||
} | ||
|
||
return $platforms; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters