Skip to content

Commit 663aeb5

Browse files
committed
微信接口
1 parent 5ee766b commit 663aeb5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Wechat.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ public function coreComponents()
219219
return [
220220
'accessToken' => ['class' => 'xutl\wechat\AccessToken'],
221221
'oauth' => ['class' => 'xutl\wechat\oauth\OAuth'],
222-
'openOAuth' => ['class' => 'xutl\wechat\oauth\OAuth'],
222+
'openOAuth' => [
223+
'class' => 'xutl\wechat\oauth\OAuth',
224+
'defaultName' => 'wechat_open'
225+
],
223226
'miniProgram' => ['class' => 'xutl\wechat\oauth\MiniOAuth'],
224227
'js' => ['class' => 'xutl\wechat\js\Js'],
225228
'notice' => ['class' => 'xutl\wechat\notice\Notice'],

src/oauth/OAuth.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class OAuth extends WeChat
4545
*/
4646
public $useOpenId = true;
4747

48+
public $defaultName = 'wechat';
49+
4850
/**
4951
* @inheritdoc
5052
*/
@@ -78,7 +80,7 @@ protected function defaultNormalizeUserAttributeMap()
7880
*/
7981
protected function defaultName()
8082
{
81-
return 'wechat';
83+
return $this->defaultName;
8284
}
8385

8486
/**

0 commit comments

Comments
 (0)