From 0f7070bce9e976fda3254efe7b0eeb1726efcaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E5=AE=9D=E4=B9=A6=E8=AE=B0?= Date: Sat, 29 May 2021 21:32:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8F=AD=E7=BA=A7ID=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=A2=9E=E5=8A=A0=E8=AE=BE=E7=BD=AE=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/teach/model/Banji.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/teach/model/Banji.php b/app/teach/model/Banji.php index 099f6898..e7412cd9 100755 --- a/app/teach/model/Banji.php +++ b/app/teach/model/Banji.php @@ -156,7 +156,7 @@ class Banji extends BaseModel { $alias = \app\facade\System::sysClass(); - if($alias->classalias) + if($alias->classalias === 1) { $title = $this->alias; if($title == '') @@ -268,12 +268,14 @@ class Banji extends BaseModel } } + $alias = \app\facade\System::sysClass(); + if(($nj > 0 && $bj > 0) ||($nj > 0 && $bj == -1)) { // 查询班级id $banji = new \app\teach\model\Banji; $id = $banji->where('ruxuenian', $nj) - ->when($bj == -1, function ($query) use($str) { + ->when($alias->classalias === 1, function ($query) use($str) { $query ->where('alias', substr_replace($str, '', strlen($str) - 3)); }, function ($query) use($bj) {