143 lines
4.4 KiB
PHP
143 lines
4.4 KiB
PHP
<?php
|
|
|
|
namespace app\api\controller;
|
|
|
|
use app\common\controller\Api;
|
|
|
|
class XqRoom extends Common
|
|
{
|
|
|
|
//开始阶段
|
|
public function prepare_stage(){
|
|
$rid = input('rid',0);
|
|
$reslut = model('XqRoom')->prepare_stage($this->uid,$rid);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
//心动不选择
|
|
public function choose_love_stage(){
|
|
$rid = input('rid',0);
|
|
$reslut = model('XqRoom')->choose_love_stage($this->uid,$rid);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
|
|
|
|
public function skill_show(){
|
|
$rid = input('rid',0);
|
|
$reslut = model('XqRoom')->skill_show($this->uid,$rid);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
|
|
|
|
//关闭活动
|
|
public function close_xq_activity(){
|
|
$rid = input('rid',0);
|
|
$reslut = model('XqRoom')->close_xq_activity($this->uid,$rid);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
|
|
|
|
public function modify_room_info(){
|
|
$rid = input('rid',0);
|
|
$cate_id = input('cate_id',0);
|
|
$reslut = model('XqRoom')->modify_room_info($this->uid,$rid,$cate_id);
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
|
}
|
|
|
|
|
|
//用户亮灯
|
|
public function user_room_light(){
|
|
$num = input('num',1);
|
|
$rid = input('rid',0);
|
|
$light_type = input('light_type',0);
|
|
$uid = $this->uid;
|
|
$key_name = "api:user:user_room_light:".$uid;
|
|
redis_lock_exit($key_name);
|
|
$result = model('XqRoom')->user_room_light_send_gift($uid,$rid,$num,$light_type);
|
|
redis_unlock($key_name);
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
|
|
//亮灯或爆灯的逐一才艺表演
|
|
public function ju_guang_light(){
|
|
$rid = input('rid',0);
|
|
$micro_id = input('micro_id', '');
|
|
$status = input('status', 1);
|
|
$result = model('XqRoom')->ju_guang_light($this->uid,$rid,$micro_id,$status);
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
//关闭相亲灯
|
|
public function close_xq_light(){
|
|
$rid = input('rid',0);
|
|
$result = model('XqRoom')->close_xq_light($this->uid,$rid);
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
|
|
//获取相亲指定礼物
|
|
public function xq_appoint_gift(){
|
|
$type = input('type',1);
|
|
$result = model('XqRoom')->xq_appoint_gift($type);
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
|
|
//相亲位关闭指定灯光
|
|
public function xq_reverse_send_gift(){
|
|
$uid = input('close_uid',0);
|
|
$rid = input('rid',0);
|
|
$gid = input('gid',0);
|
|
$num = input('num',1);
|
|
$type = input('type',1);
|
|
|
|
$key_name = "api:user:xq_reverse_send_gift:".$this->uid;
|
|
redis_lock_exit($key_name);
|
|
$result = model('XqRoom')->xq_reverse_send_gift($this->uid,$uid,$rid,$gid,$num,$type);
|
|
redis_unlock($key_name);
|
|
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
//主持亮明身份
|
|
public function show_xq_sf(){
|
|
$rid = input('rid',0);
|
|
$result = model('XqRoom')->show_xq_sf($this->uid,$rid);
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
//执行派对
|
|
public function xq_pd(){
|
|
$rid = input('rid',0);
|
|
$receive_uid = input('receive_uid',0);
|
|
$key_name = "api:user:xq_pd:".$this->uid;
|
|
redis_lock_exit($key_name);
|
|
$result = model('XqRoom')->xq_pd($this->uid,$receive_uid,$rid);
|
|
redis_unlock($key_name);
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|