diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index c0823f1d..7ed0cc9f 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -286,8 +286,6 @@ class Index extends Base // 返回信息 return json($data); - - } } diff --git a/application/chengji/controller/Index.php b/application/chengji/controller/Index.php index 377f1b3a..36eac5fb 100644 --- a/application/chengji/controller/Index.php +++ b/application/chengji/controller/Index.php @@ -13,6 +13,8 @@ use app\teach\model\Subject; use app\system\model\Fields; // 引用phpspreadsheet类 use app\renshi\controller\Myexcel; +// 引用考试类 +use app\kaoshi\model\Kaoshi; class Index extends Base { @@ -27,6 +29,7 @@ class Index extends Base { // 获取表单数据 $list = request()->only(['id','ziduan','defen'],'post'); + // 声明学科数组 $subject = array('1'=>'yuwen','2'=>'shuxue','3'=>'waiyu'); $zd = $subject[$list['ziduan']]; diff --git a/application/chengji/model/Chengji.php b/application/chengji/model/Chengji.php index 80f0716a..330efb91 100644 --- a/application/chengji/model/Chengji.php +++ b/application/chengji/model/Chengji.php @@ -188,6 +188,7 @@ class Chengji extends Base ->when(!empty($schoolid),function($query) use($schoolid){ $query->where('school',$schoolid); }) + ->where('status',1) ->field('id,kaoshi,banji,yuwen,shuxue,waiyu') // ->cache('key',180) ->select(); diff --git a/application/kaoshi/view/index/create.html b/application/kaoshi/view/index/create.html index 7f8a41ca..a5c6df73 100644 --- a/application/kaoshi/view/index/create.html +++ b/application/kaoshi/view/index/create.html @@ -27,7 +27,7 @@