36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use think\Controller;
|
|
|
|
class Coupling extends Common
|
|
{
|
|
public function coupling_test(){
|
|
$uid = input('uid', 0);
|
|
$receive_uid = input('receive_uid', 0);
|
|
$integral = input('integral', 0);
|
|
$reslut = model('Coupling')->get_coupling_info($uid, $receive_uid, $integral);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
//指定用户CP详情
|
|
public function user_coupling_info(){
|
|
$uid = input('uid', 0);
|
|
$reslut = model('Coupling')->user_coupling_info($uid);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
//CP排行榜
|
|
public function get_cp_rank(){
|
|
$uid = $this->uid;
|
|
$time = input('time', 1);
|
|
$page = input('page', 1);
|
|
$page_limit = input('page_limit', 20);
|
|
$reslut = model('Coupling')->get_cp_rank($uid, $time, $page, $page_limit);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
|
|
}
|
|
|
|
}
|