36 lines
911 B
PHP
36 lines
911 B
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\common\controller\BaseCom;
|
|
use think\Db;
|
|
|
|
class UserCp extends BaseCom
|
|
{
|
|
//用户CP礼物回赠
|
|
public function cpGiveGift()
|
|
{
|
|
$user_id = input('user_id', 0);
|
|
$gift_id = input('gift_id', 0);
|
|
$room_id = input('room_id', 0);
|
|
if($room_id){
|
|
$from_type = 2;
|
|
}else{
|
|
$from_type = 1;
|
|
}
|
|
$reslut = model('GiveGift')->give_gift($this->uid, $user_id, $gift_id, 1,$from_type,1,$room_id);
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
|
|
//Cp 空间
|
|
public function cpZone()
|
|
{
|
|
$page = input('page', 1);
|
|
$page_limit = input('page_limit', 15);
|
|
$user_id = input('user_id', 0);
|
|
$reslut = model('UserCp')->cpZone($user_id, $page, $page_limit);
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
} |