dever 4 år sedan
förälder
incheckning
ef87e807eb
2 ändrade filer med 6 tillägg och 1 borttagningar
  1. 1 1
      app/collection/lib/Core.php
  2. 5 0
      app/collection/src/Api.php

+ 1 - 1
app/collection/lib/Core.php

@@ -39,7 +39,7 @@ class Core
     	# 获取当前的用户信息
         $this->token = Dever::input('token');
         $this->uid = 1;
-        $this->share_uid = 2;
+        $this->share_uid = 1;
         $this->user = $this->getUser($this->uid, $this->id);
         $this->user['id'] = $this->uid;
         $this->system_source = Dever::input('system_source', 1);

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

@@ -201,8 +201,13 @@ class Api extends Core
         # 获取合集分享信息
         $data['share'] = $this->getInfoShare($data['info']);
 
+        $data['share_user'] = array();
         if ($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']['ticket'] = Dever::load('user/lib/ticket')->check($this->share_uid, $data['info']['id']);
+            }
         }
 
         return $data;