<?php

namespace app\api\controller;

use app\api\model\BrowserVerify;

class Verify
{
    /**
     * @description: 验证浏览器指纹 判断是否允许访问
     * @param {*}
     * @return {*}
     */
    public function index()
    {
        $browser_code = json_decode(file_get_contents("php://input"), true)['code'];
        $verify = new BrowserVerify;
        if ($verify->getOne(['code' => $browser_code])) {
            result([], '', 30000);
        } else {
            result([], 'false', 30000);
        }
    }
}
