Skip to content

Commit e02ba31

Browse files
committedApr 10, 2021
增加openid返回
1 parent c3f9e8f commit e02ba31

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎api/modules/v1/forms/MiniProgramLoginForm.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,16 @@ public function getOpenid()
7979
{
8080
return $this->openid;
8181
}
82-
82+
8383
/**
8484
* @return array
8585
* @throws \EasyWeChat\Kernel\Exceptions\DecryptException
8686
*/
8787
public function getUser()
8888
{
89-
return Yii::$app->wechat->miniProgram->encryptor->decryptData($this->auth['session_key'], $this->iv, $this->encryptedData);
89+
$user = Yii::$app->wechat->miniProgram->encryptor->decryptData($this->auth['session_key'], $this->iv, $this->encryptedData);
90+
$user['openId'] = $this->openid;
91+
92+
return $user;
9093
}
9194
}

0 commit comments

Comments
 (0)
Please sign in to comment.