1234567891011121314151617181920212223242526 |
- <?php
- namespace app\api\controller;
- use EasyWeChat\Factory;
- use EasyWeChat\MiniProgram\Application;
- use think\Controller;
- /**
- * 微信接口
- * Class WeChatPort
- * @package app\api\controller\WeChatPay
- */
- class WeChatPort extends Controller
- {
- // 获取微信小程序AccessToken
- public static function getAccessToken($code)
- {
- $res = http_curl('https://api.weixin.qq.com/cgi-bin/token?appid='.config('mini_program')['app_id'].'&secret='.config('mini_program')['secret'].'&code='.$code.'&grant_type=client_credential');
- return $res;
- }
- public static function getUserInfo($code)
- {
- }
- }
|