<?php

namespace Home\Controller;

use Think\Controller;

include '/var/www/html/jdxf/Public/vendor/WxJDK/JSSDK6.php';

class AutographController extends Controller
{
    public function getAutograph()
    {
        header("Access-Control-Allow-Origin:*");
        header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
        header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding");
        $Data = I();
        $turl = $Data['turl'];
        $appid = 'wx4eab2e3b5531d58b';
        $appSecret = '1026580a52dc89f564395113017c165b';
        $accessToken = GetAccess_Token();
//        print_r($accessToken);
        $wx = new \JSSDK6($appid, $appSecret, $accessToken, $turl);
        $info = $wx->getWxConfig();
//        print_r($info);
        echo json_encode($info);
    }
}