|
|
@@ -299,12 +299,11 @@ class Pub extends BaseController
|
|
|
$data["card_look_count"] = $userData["card_look_count"] + 1;
|
|
|
// 获取名片浏览量排行榜
|
|
|
$time = $request->param('time', time()); // 时间戳,默认为当前时间
|
|
|
- $num = $request->param('num', 50); // 显示个数,默认为50个
|
|
|
$list = (new UserModel)->where('card_look_count', '>', 0);
|
|
|
if ($time > 0) {
|
|
|
$list = $list->whereTime('create_time', '>=', $time);
|
|
|
}
|
|
|
- $list = $list->order('card_look_count', 'desc')->limit($num)->select();
|
|
|
+ $list = $list->order('card_look_count', 'desc')->select();
|
|
|
$rankList = [];
|
|
|
foreach ($list as $key => $value) {
|
|
|
$userInfo = (new UserModel)->where('uid', $value['uid'])->find();
|