57 lines
1.5 KiB
PHP
57 lines
1.5 KiB
PHP
<?php
|
||
|
||
namespace app\api\controller;
|
||
|
||
use app\common\controller\BaseCom;
|
||
|
||
class Ranking extends BaseCom
|
||
{
|
||
protected $model, $type, $room_id;
|
||
/**
|
||
* @var mixed
|
||
*/
|
||
private $page;
|
||
/**
|
||
* @var mixed
|
||
*/
|
||
private $page_limit;
|
||
|
||
public function __construct() {
|
||
parent::__construct();
|
||
$this->type = input('type', 0);//1日榜;2本周榜;3月榜;0 总榜
|
||
$this->room_id = input('room_id', 0);
|
||
$this->page = input('page', 0);
|
||
$this->page_limit = input('page_limit', 0);
|
||
$this->model = new \app\api\model\Ranking($this->uid, $this->type, $this->room_id, $this->page, $this->page_limit);
|
||
}
|
||
|
||
//财富\魅力 榜
|
||
public function wealth_ranking()
|
||
{
|
||
$ranking_type = input('ranking_type', 1);//1财富 2魅力
|
||
$reslut = $this->model->ranking($ranking_type);
|
||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
}
|
||
|
||
//房间榜
|
||
public function room_ranking()
|
||
{
|
||
$reslut = $this->model->room_ranking();
|
||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
}
|
||
|
||
//公会榜
|
||
public function guild_ranking()
|
||
{
|
||
$reslut = $this->model->guild_ranking();
|
||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
}
|
||
|
||
//真爱榜
|
||
public function love_ranking()
|
||
{
|
||
$reslut = $this->model->love_ranking();
|
||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
}
|
||
|
||
} |