dever 6 years ago
parent
commit
9b3e1d903c
2 changed files with 13 additions and 2 deletions
  1. 11 0
      journal/database/info.php
  2. 2 2
      main/src/Journal.php

+ 11 - 0
journal/database/info.php

@@ -593,6 +593,17 @@ $config = array
             'order' => array('reorder' => 'desc','id' => 'desc'),
             'order' => array('reorder' => 'desc','id' => 'desc'),
             'col' => '*,id as value|id',
             'col' => '*,id as value|id',
         ),
         ),
+
+        'getOne' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'id' => 'yes',
+                'state' => 1,
+            ),
+            'col' => $col,
+        ),
 	),
 	),
 );
 );
 
 

+ 2 - 2
main/src/Journal.php

@@ -58,7 +58,7 @@ class Journal extends Core
     {
     {
         $cate = $this->getCate();
         $cate = $this->getCate();
 
 
-        $this->data['push'] = Dever::db('journal/info')->one($cate['journal_id']);
+        $this->data['push'] = Dever::db('journal/info')->getOne($cate['journal_id']);
 
 
         # 小刊列表
         # 小刊列表
         $where = array();
         $where = array();
@@ -85,7 +85,7 @@ class Journal extends Core
 
 
         $cate = $this->getCate();
         $cate = $this->getCate();
 
 
-        $this->data['push'] = Dever::db('journal/info')->one($cate['journal_id']);
+        $this->data['push'] = Dever::db('journal/info')->getOne($cate['journal_id']);
 
 
         # 获取我的信息
         # 获取我的信息
         $this->data['user'] = Dever::load('passport/api')->info($this->data['uid']);
         $this->data['user'] = Dever::load('passport/api')->info($this->data['uid']);