dever 4 年之前
父節點
當前提交
b09a01786b
共有 2 個文件被更改,包括 24 次插入23 次删除
  1. 10 10
      app/collection/database/info.php
  2. 14 13
      app/collection/lib/Manage.php

+ 10 - 10
app/collection/database/info.php

@@ -307,7 +307,7 @@ $config = array
             'desc'      => '请填写购买数',
             'match'     => 'option',
             'search'    => 'order',
-            'show'      => 'buy=1',
+            //'show'      => 'buy=1',
             'list'      => 'Dever::load("collection/lib/manage.num?id={id}")',
             'list_name' => '统计数字',
         ),
@@ -320,7 +320,7 @@ $config = array
             'desc'      => '手动增加购买系数',
             'match'     => 'is_string',
             'update'    => 'text',
-            'show'      => 'buy=1',
+            //'show'      => 'buy=1',
         ),
 
         'num_add_buy'       => array
@@ -331,7 +331,7 @@ $config = array
             'desc'      => '手动增加阅读数',
             'match'     => 'option',
             'update'    => 'text',
-            'show'      => 'buy=1',
+            //'show'      => 'buy=1',
         ),
 
         'num_add_view'      => array
@@ -342,7 +342,7 @@ $config = array
             'desc'      => '手动增加阅读数',
             'match'     => 'option',
             'update'    => 'text',
-            'show'      => 'buy=2',
+            //'show'      => 'buy=2',
         ),
 
         'num_view'      => array
@@ -363,7 +363,7 @@ $config = array
             'desc'      => '支付价格',
             'match'     => 'is_string',
             'update'    => 'text',
-            'show'      => 'buy=1',
+            //'show'      => 'buy=1',
         ),
 
         'buy_content'       => array
@@ -389,7 +389,7 @@ $config = array
             'match'     => 'is_string',
             'update'    => 'editor',
             'key'       => 1,
-            'show'      => 'buy=1',
+            //'show'      => 'buy=1',
         ),
 
         'audit'     => array
@@ -612,15 +612,15 @@ $config = array
 
             'list1' => array('功能', '"function&search_option_info_id={id}&oper_table=info"' , '{audit} == 1'),
 
-            'list2' => array('门票', '"buy&search_option_info_id={id}&oper_table=info"' , '{audit} == 1 && {buy} == 1'),
+            'list2' => array('门票', '"buy&search_option_info_id={id}&oper_table=info"' , '{audit} == 1'),
 
-            'list3' => array('项目', '"object&search_option_info_id={id}&oper_table=info"' , '{audit} == 1 && {buy} == 1'),
+            'list3' => array('项目', '"object&search_option_info_id={id}&oper_table=info"' , '{audit} == 1'),
 
             'br3' => array('<br />'),
 
-            'list3' => array('章节', '"page&search_option_info_id={id}&oper_table=info"' , '{audit} == 1'),
+            'list5' => array('章节', '"page&search_option_info_id={id}&oper_table=info"' , '{audit} == 1'),
 
-            'list4' => array('榜单', '"ranking&project=collection&search_option_info_id={id}&oper_table=info&oper_project=collection&where_id={id}"', '{audit} == 1'),
+            'list6' => array('榜单', '"ranking&project=collection&search_option_info_id={id}&oper_table=info&oper_project=collection&where_id={id}"', '{audit} == 1'),
             
         ),
     ),

+ 14 - 13
app/collection/lib/Manage.php

@@ -29,25 +29,26 @@ class Manage
         $cate = Dever::db('collection/cate')->one($data['cate_id']);
         $html = '《' . $cate['name'] . '》<br />';
 
-        if ($data['buy'] == 1) {
-
-            $num_buy = $data['num_buy'];
-            $num_add_buy = $data['num_add_buy'];
-            $num_ratio_buy = $data['num_ratio_buy'];
-            $num_buy_total = $data['num_buy_total'];
+        $num_buy = $data['num_buy'];
+        $num_add_buy = $data['num_add_buy'];
+        $num_ratio_buy = $data['num_ratio_buy'];
+        $num_buy_total = $data['num_buy_total'];
 
+        if ($data['buy'] == 1) {
             $html .= '<font style="color:red">收费</font><br />';
-            $html .= '购买数:('.$num_buy.'+'.$num_add_buy.')*'.$num_ratio_buy.'='.$num_buy_total;
         } else {
-
-            $num_view = $data['num_view'];
-            $num_add_view = $data['num_add_view'];
-            $num_view_total = $num_view + $num_add_view;
-
             $html .= '<font style="color:blue">免费</font><br />';
-            $html .= '阅读数:'.$num_view.'+'.$num_add_view.'='.$num_view_total;
         }
         
+        $html .= '购买数:('.$num_buy.'+'.$num_add_buy.')*'.$num_ratio_buy.'='.$num_buy_total;
+
+        $num_view = $data['num_view'];
+        $num_add_view = $data['num_add_view'];
+        $num_view_total = $num_view + $num_add_view;
+
+        
+        $html .= '<br />阅读数:'.$num_view.'+'.$num_add_view.'='.$num_view_total;
+        
         return $html;
     }