dever 6 years ago
parent
commit
94d19cac91
2 changed files with 27 additions and 4 deletions
  1. 10 4
      config/env/localhost/default.php
  2. 17 0
      journal/database/cate.php

+ 10 - 4
config/env/localhost/default.php

@@ -37,7 +37,7 @@ $config['database'] = array
 		'database' => 'wonderful',
 		'username' => isset($dc['mysql']) ? $dc['mysql']['username'] : 'root',
 		'password' => isset($dc['mysql']) ? $dc['mysql']['password'] : '123456',
-		'charset' => 'utf8',
+		'charset' => 'utf8mb4',
 	),
 
     'session' => array
@@ -57,13 +57,13 @@ $config['cache'] = array
     # 启用页面缓存 会根据当前的url来生成缓存,相当于页面静态化。
     'html' => 0,
     # 启用数据级别缓存 这个缓存是程序员自定义的:Dever::cache('name', 'value', 3600);
-    'data' => 3600,
+    'data' => 0,
     # 启用load加载器缓存,一般不加载
     'load' => 0,
     # 启用load加载器的远程加载缓存
     'curl' => 0,
     # 启用路由缓存
-    'route' => 36000,
+    'route' => 0,
 
     # 缓存精细控制,可以根据缓存的key(mysql为表名、service为小写类名,规则是模糊匹配),来控制每一条缓存
     'routeKey' => array
@@ -132,9 +132,15 @@ if (isset($dc['redis'])) {
 
 $config['debug'] = array
 (
-	'log' => array('type' => 'file'),
+	'log' => false
 );
 
+/*
+if (DEVER_APP_NAME == 'source') {
+    $config['debug']['log'] = array('type' => 'file'); 
+}
+*/
+
 
 $host = 'http://'.$local . '/';
 

+ 17 - 0
journal/database/cate.php

@@ -1,6 +1,7 @@
 <?php
 # 获取小刊分类权限
 $auth = Dever::tops();
+$status = Dever::config('base')->status;
 $type = array
 (
     # 默认类型
@@ -189,6 +190,20 @@ return array
             'update'    => 'editor',
         ),
 
+        'status'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => '上线状态',
+            'default'   => '2',
+            'desc'      => '上线状态',
+            'match'     => 'is_numeric',
+            //'update'  => 'select',
+            'option'    => $status,
+            'search'    => 'select',
+            'list'      => true,
+            'edit'      => true,
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',
@@ -250,6 +265,7 @@ return array
             'option' => array
             (
                 'state' => 1,
+                'status' => 2,
             ),
             'type' => 'all',
             'order' => array('reorder' => 'desc','id' => 'desc'),
@@ -262,6 +278,7 @@ return array
             'option' => array
             (
                 'ids' => array('yes-id', 'in'),
+                'status' => 2,
                 'state' => 1,
             ),
             'type' => 'all',