dever 4 лет назад
Родитель
Сommit
83bdc1ea8a
2 измененных файлов с 6 добавлено и 4 удалено
  1. 1 1
      app/collection/lib/Core.php
  2. 5 3
      app/collection/src/Api.php

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

@@ -97,7 +97,7 @@ class Core
         unset($info['cdate']);
         unset($info['score_type']);
         unset($info['score_name']);
-        $info['id_code'] = Dever::encode($info['id'], $this->key());
+        $this->id_code = $info['id_code'] = Dever::encode($info['id'], $this->key());
     }
 
     # 检查是否可以查看

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

@@ -271,14 +271,16 @@ class Api extends Core
     # 获取合集下的内容
     public function getContent()
     {
+        # 获取用户信息
+        $data['user'] = $this->user;
+        $data['info'] = $this->checkInfo();
         $data['info_id'] = $this->id_code;
+
         $data['page_id'] = $this->page_id;
         $data['parent_page_id'] = $this->parent_page_id;
         $data['index'] = $this->index;
         $data['times_id'] = $this->times;
-        # 获取用户信息
-        $data['user'] = $this->user;
-        $data['info'] = $this->checkInfo();
+
         if ($data['info']['buy'] == 2) {
             Dever::load('user/lib/collection')->upAct($this->uid, $this->id, 1, $this->share_uid);
         }