123456789101112131415161718192021222324 |
- <?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()
- {
- var_dump(config('mini_program')['app_id'],config('mini_program')['secret']);
- $res = http_curl('https://api.weixin.qq.com/cgi-bin/token?appid='.config('mini_program')['app_id'].'&secret='.config('mini_program')['secret'].'&grant_type=client_credential');
- return $res;
- }
- }
|