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

use Think\Controller;
use SignedCookie;
// use Zhida\OAuthHelperV3;
use Common\Common\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()
    {
      // $user = $this->get_user_info_from_cookie();
      // // 如果没有获取到用户信息，引导用户授权
      // if (!$user) {
      //     $this->request_auth($this->get_url());
      //     return;
      // }

      session_start();
      $_SESSION['joinTime'] = time();

      $this->display();
    }

    
    public function cookie()
    {
        SignedCookie::set_cookie($this->cookie_uid_key, 'oVsrlt0zUWMLvMx2-KPGVmY2I-Xc', C('cookie_sign'), 86400 * 60);
    }
}