From bbd71f2a4773c86ec21c4fac1bac909bfb1a0f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Thu, 10 Sep 2020 19:39:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=AF=BC=E5=85=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/teach/model/Banji.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/teach/model/Banji.php b/app/teach/model/Banji.php index 293d3f1f..a8b66c9b 100644 --- a/app/teach/model/Banji.php +++ b/app/teach/model/Banji.php @@ -251,8 +251,9 @@ class Banji extends BaseModel $njlist = $this->gradeName('str', time()); $bjlist = $this->className(); - $nj = substr($str, 0, 9); - $bj = substr($str, 9, strlen($str) - 9); + $find = strpos($str,"级") + 3; + $nj = substr($str, 0, $find); + $bj = substr($str, $find, strlen($str) - $find); $nj = array_search($nj, $njlist); $bj = array_search($bj, $bjlist);