dever 6 年之前
父节点
当前提交
544f80ed86
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 19 0
      journal/database/info.php
  2. 5 0
      main/src/Journal_v1.php

+ 19 - 0
journal/database/info.php

@@ -39,6 +39,12 @@ $share = array
 	2 => '不显示',
 );
 
+$top = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
 $buy = array
 (
 	1 => '收费',
@@ -369,6 +375,19 @@ $config = array
 			'option'	=> $share,
 		),
 
+		'top'		=> array
+		(
+			'type' 		=> 'tinyint-11',
+			'name' 		=> '是否显示排行榜',
+			'default' 	=> '1',
+			'desc' 		=> '是否显示排行榜',
+			'match' 	=> 'option',
+			'update'	=> 'radio',
+			'option'	=> $top,
+			'list'		=> true,
+			'search'	=> 'select',
+		),
+
 		'buy'		=> array
 		(
 			'type' 		=> 'int-11',

+ 5 - 0
main/src/Journal_v1.php

@@ -135,7 +135,11 @@ class Journal_v1 extends Core
         $subscribe = Dever::load('act/lib/subscribe')->get($info['id'], $uid, 4);
         $this->data['info']['subscribe'] = 2;
 
+        # 查看是否有排行榜
+        $this->data['info']['active'] = $info['top'];
+        
         # 查看是否有活动
+        /*
         $active = Dever::db('journal/active')->one(array('id' => $info['id']));
         $this->data['info']['active'] = 2;
         if ($active && $active['status'] == 1) {
@@ -146,6 +150,7 @@ class Journal_v1 extends Core
         if ($active && $time >= $active['start'] && $time < $active['end']) {
             $this->data['info']['active'] = 1;
         }
+        */
 
         if ($this->data['info']['active'] == 1) {
             $this->setButton('share', 1);