diff --git a/app/student/controller/Index.php b/app/student/controller/Index.php index 74f7c562..5ae4b0dd 100755 --- a/app/student/controller/Index.php +++ b/app/student/controller/Index.php @@ -71,6 +71,10 @@ class Index extends AdminBase $list['webtitle'] = '毕业学生'; $list['dataurl'] = '/student/index/databy'; + $njlist = nianJiNameList('str', time()); + $njlistCnt = count($njlist); + $list['thistime'] = strtotime("-" . $njlistCnt ." year"); + // 模板赋值 $this->view->assign('list', $list); diff --git a/app/student/view/index/by_list.html b/app/student/view/index/by_list.html index 3ad72a5f..df26620c 100755 --- a/app/student/view/index/by_list.html +++ b/app/student/view/index/by_list.html @@ -33,8 +33,7 @@
{php} - $thisTime = strtotime("-6 year"); - $njlist = nianJiNameList('str', $thisTime); + $njlist = nianJiNameList('str', $list['thistime']); {/php} {volist name="njlist" id="vo"} diff --git a/app/system/model/SystemBase.php b/app/system/model/SystemBase.php index 518009c9..b24d3e09 100755 --- a/app/system/model/SystemBase.php +++ b/app/system/model/SystemBase.php @@ -10,7 +10,7 @@ class SystemBase extends BaseModel static function sysInfo() { $info = self::order(['id' => 'desc']) - ->field('id, keywords, description, sys_title, thinks, danwei') + ->field('id, keywords, description, sys_title, thinks, danwei, gradelist') ->find(); return $info; }