|
|
@@ -306,25 +306,7 @@ class Pub extends BaseController
|
|
|
*/
|
|
|
public function getCardLookCountRank(Request $request) {
|
|
|
var_dump('123456');
|
|
|
- $time = $request->param('time', time()); // 时间戳,默认为当前时间
|
|
|
- $list = (new UserModel)->where('card_look_count', '>', 0);
|
|
|
- if ($time > 0) {
|
|
|
- $list = $list->whereTime('create_time', '>=', $time);
|
|
|
- }
|
|
|
- $list = $list->order('card_look_count', 'desc')->select();
|
|
|
- $rankList = [];
|
|
|
- foreach ($list as $key => $value) {
|
|
|
- $userInfo = (new UserModel)->where('uid', $value['uid'])->find();
|
|
|
- $rankList[] = [
|
|
|
- 'rank' => $key + 1,
|
|
|
- 'uid' => $value['uid'],
|
|
|
- 'nickname' => $userInfo['nickname'],
|
|
|
- 'avatar' => $userInfo['avatar'],
|
|
|
- 'card_look_count' => $value['card_look_count'],
|
|
|
- 'template' => $this->getShowTemplateItem($value['uid']),
|
|
|
- ];
|
|
|
- }
|
|
|
- return app('json')->success($rankList);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|