Skip to content

Commit

Permalink
微信接口
Browse files Browse the repository at this point in the history
  • Loading branch information
xutl committed Jun 29, 2018
1 parent 5ee766b commit 663aeb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Wechat.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ public function coreComponents()
return [
'accessToken' => ['class' => 'xutl\wechat\AccessToken'],
'oauth' => ['class' => 'xutl\wechat\oauth\OAuth'],
'openOAuth' => ['class' => 'xutl\wechat\oauth\OAuth'],
'openOAuth' => [
'class' => 'xutl\wechat\oauth\OAuth',
'defaultName' => 'wechat_open'
],
'miniProgram' => ['class' => 'xutl\wechat\oauth\MiniOAuth'],
'js' => ['class' => 'xutl\wechat\js\Js'],
'notice' => ['class' => 'xutl\wechat\notice\Notice'],
Expand Down
4 changes: 3 additions & 1 deletion src/oauth/OAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class OAuth extends WeChat
*/
public $useOpenId = true;

public $defaultName = 'wechat';

/**
* @inheritdoc
*/
Expand Down Expand Up @@ -78,7 +80,7 @@ protected function defaultNormalizeUserAttributeMap()
*/
protected function defaultName()
{
return 'wechat';
return $this->defaultName;
}

/**
Expand Down

0 comments on commit 663aeb5

Please sign in to comment.