Files
kiri-wchat/wx/Account.php
T

35 lines
486 B
PHP
Raw Normal View History

2018-07-19 12:10:22 +08:00
<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/19 0019
* Time: 16:12
*/
2019-07-12 19:25:47 +08:00
2018-07-19 12:10:22 +08:00
namespace wchat;
class Account extends Base
{
2019-07-12 19:25:47 +08:00
2018-07-19 12:10:22 +08:00
/**
* @param $code
* @return Result
*/
public function login($code)
{
2019-07-12 19:25:47 +08:00
$param = [
'sns/jscode2session',
[
'appid' => $this->appid,
'secret' => $this->appsecret,
'js_code' => $code,
'grant_type' => 'authorization_code'
],
null,
['Content-Type' => 'text/xml']
];
return WxClient::get(...$param);
2018-07-19 12:10:22 +08:00
}
2019-07-12 19:25:47 +08:00
2019-07-12 18:51:12 +08:00
}