dever 4 years ago
parent
commit
6c735a96ef
2 changed files with 15 additions and 1 deletions
  1. 10 0
      app/collection/database/info.php
  2. 5 1
      app/collection/src/Api.php

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

@@ -505,6 +505,16 @@ $config = array
             'attr'      => '',
         ),
 
+        'share_name'      => array
+        (
+            'type'      => 'varchar-50',
+            'name'      => '分享者称谓-默认为分享者',
+            'default'   => '分享者',
+            'desc'      => '分享者称谓',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
         'share_title'       => array
         (
             'type'      => 'varchar-100',

+ 5 - 1
app/collection/src/Api.php

@@ -295,11 +295,15 @@ class Api extends Core
         # 获取合集分享信息
         $data['share'] = $this->getInfoShare($data['info'], $data['code']);
 
-        $data['share_user'] = array();
+        $data['share_user'] = array
+        (
+            'uid' => -1,
+        );
         if ($this->uid && $this->uid > 0 && $this->share_uid && $this->share_uid > 0) {
             # 获取分享人信息
             $data['share_user'] = $this->getUser($this->share_uid, $data['info']['id']);
             if ($data['share_user']) {
+                $data['share_user']['share_name'] = $data['info']['share_name'];
                 $data['share_user']['ticket'] = Dever::load('user/lib/ticket')->check($this->share_uid, $data['info']['id']);
                 if ($data['share_user']['ticket']) {
                     $data['share_user']['code'] = $this->getCode($data['info']['id'], 0, 0, 0, 0, 0, $this->share_uid, $data['share_user']['ticket']['id']);