Files
kiri-wchat/wx/Account.php
T
as2252258@163.com 70eae1dc01 add clear
2019-07-12 19:25:47 +08:00

35 lines
486 B
PHP

<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/19 0019
* Time: 16:12
*/
namespace wchat;
class Account extends Base
{
/**
* @param $code
* @return Result
*/
public function login($code)
{
$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);
}
}