Browse Source

默认的

Kirin 4 years ago
parent
commit
d6b4ab65fa
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/admin/model/vote/VoteJoin.php

+ 3 - 1
app/admin/model/vote/VoteJoin.php

@@ -57,7 +57,9 @@ class VoteJoin extends BaseModel
                 $item['rank'] = self::valid()->where('vid', $id)->where('vote', '>', $item['vote'])->count() + 1;
                 $item['_add_time'] = date('Y-m-d H:i:s', $item['add_time']);
             });
-        $count = $data->count();
+        $count = self::alias('a')
+            ->where('a.vid', $id)
+            ->join('user u', 'u.uid = a.uid', 'left')->count();
         return compact('count', 'data');
     }