<?php
/**
 * 阿里云呼叫中心测试
 * @Copyright (C) 2018 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author xiaogg <xiaogg@sina.cn>
 */
namespace Home\Controller;
class AliyuncallController extends BaseController {

    public function index(){
        $call= new \Common\Vendor\Aliyuncall;
        //$url=$call->get_authorization_url();
       // echo '<a href="'.$url.'" target="_blank">'.$url.'</a>';
       //$code='Y82c6Tw323zyihhT6w0MGid9DHLTIc4m';
       //$auth=$call->getTokenBycode($code);
       //print_r($auth);
       $token=$call->getToken();print_r($token);
    }
    public function geturl(){
        $call= new \Common\Vendor\Aliyuncall;
        $url=$call->get_authorization_url();
        echo '<a href="'.$url.'" target="_blank">'.$url.'</a>';
    }
}