96 lines
3.0 KiB
PHP
96 lines
3.0 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\api\controller;
|
||
|
|
|
||
|
|
use app\common\controller\BaseCom;
|
||
|
|
|
||
|
|
class RoomAuction extends BaseCom
|
||
|
|
{
|
||
|
|
//房间关系列表
|
||
|
|
public function room_relation_list()
|
||
|
|
{
|
||
|
|
$type_id = input('type');//1真爱拍 2 亲密拍
|
||
|
|
$reslut = model('RoomAuction')->room_relation_list($type_id);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//真爱拍选礼物后计算天数
|
||
|
|
public function room_auction_time()
|
||
|
|
{
|
||
|
|
$gift_id = input('gift_id');
|
||
|
|
$reslut = model('RoomAuction')->room_auction_time($gift_id);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 房间竞拍开始(数据提交)
|
||
|
|
public function room_auction()
|
||
|
|
{
|
||
|
|
$room_id = input('room_id');
|
||
|
|
$user_id = input('user_id');
|
||
|
|
$gift_id = input('gift_id');
|
||
|
|
$relation_id = input('relation_id','');
|
||
|
|
$auction_type = input('auction_type',1);//1真爱拍 2 亲密拍
|
||
|
|
$time_day = input('time_day', 0);//小时
|
||
|
|
$reslut = model('RoomAuction')->room_auction($room_id,$user_id,$gift_id,$relation_id,$auction_type,$time_day);
|
||
|
|
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//竞拍开始
|
||
|
|
// public function room_auction_start()
|
||
|
|
// {
|
||
|
|
// $auction_id = input('auction_id',0);
|
||
|
|
// $reslut = model('RoomAuction')->room_auction_start($auction_id);
|
||
|
|
// return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
// }
|
||
|
|
|
||
|
|
//参与竞拍
|
||
|
|
public function room_auction_join()
|
||
|
|
{
|
||
|
|
$auction_id = input('auction_id');
|
||
|
|
$user_id = $this->uid;
|
||
|
|
$gift_id = input('gift_id');
|
||
|
|
$num = input('num');
|
||
|
|
$type = input('type',1);//1金币购买 2送背包礼物
|
||
|
|
|
||
|
|
$reslut = model('RoomAuction')->room_auction_join($auction_id,$user_id,$gift_id,$num,$type);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//房间竞拍列表
|
||
|
|
public function room_auction_list()
|
||
|
|
{
|
||
|
|
$auction_id = input('auction_id');
|
||
|
|
$reslut = model('RoomAuction')->room_auction_list($auction_id);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//延时
|
||
|
|
public function room_auction_delay()
|
||
|
|
{
|
||
|
|
$auction_id = input('auction_id');
|
||
|
|
$reslut = model('RoomAuction')->room_auction_delay($auction_id);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//房间竞拍结束
|
||
|
|
public function room_auction_end()
|
||
|
|
{
|
||
|
|
$auction_id = input('auction_id');
|
||
|
|
$room_id = input('room_id');
|
||
|
|
$reslut = model('RoomAuction')->room_auction_end($room_id,$auction_id);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//修改房间竞拍模式
|
||
|
|
public function room_auction_mode()
|
||
|
|
{
|
||
|
|
$room_id = input('room_id');
|
||
|
|
$mode = input('label_id');//2亲密拍 1真爱拍
|
||
|
|
$reslut = model('RoomAuction')->room_auction_mode($room_id,$mode);
|
||
|
|
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|