修改中间件名称
This commit is contained in:
1 parent
335984deac
commit
41c2ea2f92
5 files changed
+27
-20
No files matched your search
@@ -329,3 +329,26 @@ function array_cover( $cover = array(), $covered = array() )
|
||||
}
|
||||
return $covered;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据考试ID值,判断考试是否已经结束
|
||||
* $kaoshiid 考试ID
|
||||
* 返回 $data
|
||||
* */
|
||||
function enddate($kaoshiid)
|
||||
{
|
||||
$ks = new app\kaoshi\model\Kaoshi;
|
||||
$enddate = $ks->where('id',$kaoshiid)->value('enddate');
|
||||
|
||||
$thistime = time();
|
||||
if($enddate<time())
|
||||
{
|
||||
$data = true;
|
||||
}else{
|
||||
$data = false;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class Base extends Controller
|
||||
|
||||
// 调用Auth中间件进行用户权限验证
|
||||
protected $middleware = [
|
||||
'YanZheng'=>[
|
||||
'OnLine'=>[
|
||||
'except'=>[
|
||||
'exit',
|
||||
],
|
||||
|
||||
@@ -8,7 +8,7 @@ use think\Controller;
|
||||
use \php4world\Auth;
|
||||
|
||||
|
||||
class YanZheng extends Controller
|
||||
class OnLine extends Controller
|
||||
{
|
||||
public function handle($request, \Closure $next)
|
||||
{
|
||||
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user