dever 5 years ago
parent
commit
ba26ec0060
2 changed files with 16 additions and 10 deletions
  1. 10 0
      app/collection/database/info.php
  2. 6 10
      app/collection/lib/Content.php

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

@@ -98,6 +98,16 @@ $config = array
             'list'      => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "官方"',
         ),
 
+        'author_name'      => array
+        (
+            'type'      => 'varchar-50',
+            'name'      => '作者称谓-默认为作者,可以改为店主之类的',
+            'default'   => '作者',
+            'desc'      => '作者称谓',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
         'desc'      => array
         (
             'type'      => 'varchar-800',

+ 6 - 10
app/collection/lib/Content.php

@@ -37,17 +37,18 @@ class Content
 
                 $info = Dever::db('collection/info')->one($info_id);
                 if ($info && $info['uid'] > 0) {
+                    $page['author_name'] = $info['author_name'] . ':';
                     $user = Dever::load('passport/api')->info($info['uid']);
                     $page['username'] = $user['username'];
 
-                    $page['copyright'] = "如不慎侵害您的权益,请告知,我们将责令创作者修改";
+                    $page['copyright'] = '如不慎侵害您的权益,请告知,我们将第一时间修改';
                 } else {
+                    $page['author_name'] = '';
                     $page['username'] = '官方';
-                    $page['copyright'] = "所有内容仅供内部专用,禁止在互联网传播";
+                    $page['copyright'] = '所有内容仅供内部专用,禁止在互联网传播';
                 }
                 
                 $result[$i] = $page;
-                //$result[$i]['copyright'] = $page['copyright'];
                 $result[$i]['data'] = -1;
                 $result[$i]['type'] = -1;
                 $result[$i]['times'] = $result[$i]['times_parent'] = '';
@@ -67,14 +68,9 @@ class Content
                 }
 			}
 
-            if ($page && $page['desc']) {
+            if ($page && $page['desc_end']) {
                 $result[$i] = $result[0];
-                if ($page['desc_end']) {
-                    //$result[$i]['name'] .= ' 已完结';
-                    $result[$i]['desc'] = $page['desc_end'];
-                } else {
-                    //$result[$i]['name'] .= ' 连载中';
-                }
+                $result[$i]['desc'] = $page['desc_end'];
             }
 		}