rabin 6 months ago
parent
commit
34631a7c4c
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/place/lib/Act.php
  2. 1 1
      src/place/lib/Resource.php

+ 2 - 2
src/place/lib/Act.php

@@ -5,10 +5,10 @@ class Act
 {
     private $db;
     private $type;
-    public function __construct($name, $type = 1)
+    public function __construct($name, $type = false, $type_id = false)
     {
         $this->type = Dever::input('type', '', '', $type);
-        $this->type_id = Dever::input('type_id');
+        $this->type_id = Dever::input('type_id', '', '', $type_id);
         $this->db = Dever::db($name, 'place');
         $this->app = Dever::config('setting')['type'][$this->type];
     }

+ 1 - 1
src/place/lib/Resource.php

@@ -360,7 +360,7 @@ class Resource
             }
             # 查看详情信息
             if (Place::$uid) {
-                $act = new Act('collect', $this->type);
+                $act = new Act('collect', $this->type, $info['id']);
                 $info['collect'] = 2;
                 $collect = $act->getInfo();
                 if ($collect) {