From 616302da03ec18da825b02b847e1fb4bb28f80eb Mon Sep 17 00:00:00 2001 From: win10 Date: Wed, 2 Sep 2020 14:03:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/kaohao/controller/Index.php | 8 +++++--- config/shangma.php | 2 +- database/seeds/Rule.php | 6 ------ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/kaohao/controller/Index.php b/app/kaohao/controller/Index.php index aeeb26d9..3809ff15 100644 --- a/app/kaohao/controller/Index.php +++ b/app/kaohao/controller/Index.php @@ -244,11 +244,13 @@ class Index extends AdminBase $id = request()->delete('id'); $id = explode(',', $id); - foreach ($id as $key => $value) { - // 判断考试结束时间是否已过 - $ksid = KH::where('id', $value)->value('kaoshi_id'); + if(isset($id[0])) + { + $ksid = KH::where('id', $id[0])->value('kaoshi_id'); event('kslu', $ksid); $data = KH::destroy($id); + }else{ + $data = false; } // 根据更新结果设置返回提示信息 diff --git a/config/shangma.php b/config/shangma.php index b8411d70..7f6ce916 100644 --- a/config/shangma.php +++ b/config/shangma.php @@ -10,6 +10,6 @@ return [ 'webtitle' => '码蚁成绩管理系统', 'version' => 'v1.3.5', 'weihu' => false, - 'shijian' => '2020-9-2 11:54', + 'shijian' => '2020-9-2 12:47', 'shichang' => '1', ]; diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php index 6db293f7..37becc50 100644 --- a/database/seeds/Rule.php +++ b/database/seeds/Rule.php @@ -168,12 +168,6 @@ class Rule extends Seeder ,'paixu' => 1 ,'pid' => 30201 ], - ['id' => 302010101 - ,'title' => '考试设置' - ,'name' => 'kaoshi/kaoshiset/index' - ,'paixu' => 1 - ,'pid' => 3020101 - ], ['id' => 302010102 ,'title' => '新建' ,'name' => 'kaoshi/kaoshiset/create'