From c1453e7a26f7f5bff4cc111f7616f8faa966c951 Mon Sep 17 00:00:00 2001 From: cxdbz Date: Wed, 1 Jan 2020 16:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E5=8F=82=E6=95=B0=E7=9A=84=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/renshi/controller/Student.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index 148cf147..ee286e49 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -46,6 +46,13 @@ class Student extends BaseController $ruxuenian = $src['ruxuenian']; $paixu = $src['paixu']; + if(count($ruxuenian)==0) + { + $njlist = nianjilist(); + $ruxuenian = array_keys($njlist); + } + + // 实例化班级数据模型 $banji = new \app\teach\model\Banji; $src['banji'] = $banji->where('status',1)