<?php
namespace Home\Controller;
vendor('tencentsdk.TCloudAutoLoader');

use Think\Controller;
use SignedCookie;
use Zhida\OAuthHelperV3;
use Think\Upload\Driver\Qiniu\QiniuStorage;

use Think\Log;

class IndexController extends Controller
{
    private $auth_type = OAuthHelperV3::SCOPE_USERINFO;
    private $cookie_uid_key = 'skp-rotor-v1';
    private $debug = 1;
    private $today;
    use ControllerTrait;
    
    public function index()
    {
      $this->display();
    }

    public function wxconfig()
    {
      $data  = $this->http_get_data('http://dos-demo2.dev.izhida.cn/config.php');
      $this->ajaxReturn(array(
        'status' => 1,
        'config' => $data,
        'step' => 0
    ));
    }
    public function http_get_data($url) {  
      
      $ch = curl_init ();  
      curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );  
      curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false );  
      curl_setopt ( $ch, CURLOPT_URL, $url );  
      ob_start ();  
      curl_exec ( $ch );  
      $return_content = ob_get_contents ();  
      ob_end_clean ();  
        
      $return_code = curl_getinfo ( $ch, CURLINFO_HTTP_CODE );  
      return $return_content;  
    }  
}