更新功能

This commit is contained in:
2019-06-29 21:14:58 +08:00
parent d3eef9c5fd
commit 6bfc2db94a
23 changed files with 1046 additions and 955 deletions

View File

@@ -0,0 +1,28 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\middleware;
use think\facade\View;
use think\facade\Session;
/**
* @title 后台中间件
*/
class AdminAuth {
public function handle($request, \Closure $next) {
$user = Session::get('user');
if (Session::has('user') && $user['uid']) {
return $next($request);
}else{
return redirect(url('admin.index/login'))->remember();
}
}
}