From 5221cbc325cea003976b8327e1ddd232f74a7e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=AB=E9=97=AE=E6=88=91=E6=98=AF=E8=B0=81?= Date: Tue, 30 Mar 2021 13:46:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9gradeName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/teach/model/Banji.php | 8 ++++---- public/.htaccess | 11 ++++++----- public/nginx.htaccess | 7 ------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/app/teach/model/Banji.php b/app/teach/model/Banji.php index 4dea6b29..6b4bee64 100755 --- a/app/teach/model/Banji.php +++ b/app/teach/model/Banji.php @@ -22,7 +22,7 @@ class Banji extends BaseModel $src['ruxuenian'] = strToarray($src['ruxuenian']); if(count($src['ruxuenian']) == 0) { - $njname = $this->gradeName('num', time()); # 年级名对应表 + $njname = $this->gradeName(time(),'num'); # 年级名对应表 $src['ruxuenian'] = array_values($njname); } @@ -120,7 +120,7 @@ class Banji extends BaseModel public function getNumTitleAttr() { // 获取基础信息 - $njname = $this->gradeName('str', time()); # 年级名对应表 + $njname = $this->gradeName(time(), 'str'); # 年级名对应表 $nj = $this->getAttr('ruxuenian'); $bj = $this->getAttr('paixu'); $numnj = array_flip(array_keys($njname)); @@ -244,7 +244,7 @@ class Banji extends BaseModel public function srcBanJiID($str, $school_id) { // 获取年级、班级列表 - $njlist = $this->gradeName('str', time()); + $njlist = $this->gradeName(time(),'str'); $bjlist = $this->className(); $len = strlen($str); @@ -297,7 +297,7 @@ class Banji extends BaseModel public function fClassTitle($grade = 1950, $jiedian = 0, $paixu = 1, $category = true) { //获取班级、年级列表 - $njlist = $this->gradeName('str', $jiedian); + $njlist = $this->gradeName($jiedian,'str'); $title = ''; if( isset($njlist[$grade]) ) { diff --git a/public/.htaccess b/public/.htaccess index f6e5c25c..3916a08b 100755 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,7 +1,8 @@ - Options +FollowSymlinks -Multiviews - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] +Options +FollowSymlinks -Multiviews +RewriteEngine On + +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] \ No newline at end of file diff --git a/public/nginx.htaccess b/public/nginx.htaccess index 9fa9c48c..e69de29b 100755 --- a/public/nginx.htaccess +++ b/public/nginx.htaccess @@ -1,7 +0,0 @@ - - Options +FollowSymlinks -Multiviews - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] - \ No newline at end of file