<?php
/*
 * @Author: wang jun
 * @Date: 2022-01-18 10:57:14
 * @Last Modified by: wang jun
 * @Last Modified time: 2022-01-19 10:38:56
 * 微信类
 */
namespace app\app\controller;

use app\app\logic\webuserlogic;
use think\Controller;

class BaseController extends Controller
{
    /**
     * 校验用户token
     *
     * @param  [type] $token
     * @return void
     * @author wj
     * @date 2022-07-25
     */
    public function checktoken($param)
    {
        if (!isset($param['token']) || empty($param['token'])) {
            $this->error("请求错误");
        }
        $token = $param['token'];
        $l_w = new webuserlogic();
        $result = $l_w->checktoken($token);
        if (!$result) {
            $this->error("非合法用户");
        }
    }
}
