Files
midi-php/application/api/controller/Ranking.php
2025-08-13 10:43:56 +08:00

57 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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']);
}
}