<?php

namespace App\Http\Controllers\API\H5;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use JWT;

class LoginController extends Controller
{
    public function wxGetOpenid(){
        $result=array();
        $openid='openid777777777777777';
        $accessTimeout = JWT::GetGetSecretTimeOut();
        $refreshTimeout = JWT::GetRefreshTokenTimeOut();
        $access_token = JWT::BuildJWT('yz','access',$openid,'mH5user',$accessTimeout);
        $refresh_token = JWT::BuildJWT('yz','refresh',$openid,'',$refreshTimeout);
        $result['token']=$access_token;
        $result['refresh_token']=$refresh_token;
        return \Yz::Return(true,'登录成功',$result);
    }
}
