dever 5 vuotta sitten
vanhempi
commit
bf4945561d
2 muutettua tiedostoa jossa 49 lisäystä ja 3 poistoa
  1. 28 2
      content/database/page.php
  2. 21 1
      journal/database/cate.php

+ 28 - 2
content/database/page.php

@@ -1,6 +1,7 @@
 <?php
 
-return array
+
+$config = array
 (
     # 表名
     'name' => 'page',
@@ -44,7 +45,7 @@ return array
             'desc'      => '标识',
             'match'     => 'is_string',
             'update'    => 'text',
-            'search'    => 'fulltext',
+            //'search'    => 'fulltext',
             'list'      => true,
         ),
 
@@ -85,4 +86,29 @@ return array
     (
         
     ),
+
+    'request' => array
+    (
+        
+    )
 );
+# 获取小刊分类权限
+$auth = Dever::tops();
+
+if ($auth && $auth != 1) {
+    $config['request']['list'] = array
+    (
+        # 匹配的正则或函数 选填项
+        'option' => array
+        (
+            'name' => array('yes', 'like'),
+            'key' => array('_' . $auth, 'like'),
+        ),
+        'type' => 'all',
+        'order' => array('id' => 'desc'),
+        'page' => array(20, 'list'),
+        'col' => '*|id',
+    );
+}
+
+return $config;

+ 21 - 1
journal/database/cate.php

@@ -1,5 +1,6 @@
 <?php
-
+# 获取小刊分类权限
+$auth = Dever::tops();
 $type = array
 (
     # 默认类型
@@ -17,6 +18,24 @@ $type = array
     13 => '关联直播',
 );
 
+$list = array
+(
+    # 匹配的正则或函数 选填项
+    'option' => array
+    (
+
+        'name' => array('yes', 'like'),
+        'title' => array('yes', 'like'),
+        'id' => array($auth, 'in'),
+        'journal_id' => 'yes',
+    ),
+    'type' => 'all',
+    'order' => array('reorder' => 'desc', 'id' => 'desc'),
+    'page' => array(20, 'list'),
+    'col' => '*|id',
+);
+
+
 $id = Dever::input('where_id');
 return array
 (
@@ -211,6 +230,7 @@ return array
 
     'request' => array
     (
+        'list' => $list,
         'getAll' => array
         (
             # 匹配的正则或函数 选填项