<?php
namespace MpSmi\Controller;

use Think\Controller;

header("Content-Type:text/html;CharSet=utf-8");
class BaseController extends Controller
{
    public function __construct()
    {
        parent::__construct();
        if (!session('?store')) {
            $last_visit = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
            cookie('last_visit', $last_visit, 7200);
            $this->redirect('Login/login');die;
        }
        $this->assign("admin", session("store"));
    }
}