交友相关 直播间送礼
This commit is contained in:
@@ -155,8 +155,9 @@ class Room extends BaseCom
|
||||
$to_uid = input('to_uid', 0);//收礼人ID,逗号隔开的字符串
|
||||
$type = input('type', 1);//1金币购买 2送背包礼物
|
||||
$pit_number = input('pit_number', 0);
|
||||
$heart_id = input('heart_id', 0);
|
||||
|
||||
$reslut = model('Room')->room_gift($this->uid, $to_uid, $gift_id, $gift_num, $type, $room_id, $pit_number);
|
||||
$reslut = model('Room')->room_gift($this->uid, $to_uid, $gift_id, $gift_num, $type, $room_id, $pit_number,$heart_id);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class Friend extends Model
|
||||
db::name('vs_room')->where(['id' => $room_id])->update(['step' => 2]);
|
||||
|
||||
//推送给前端消息
|
||||
$text['text'] = '拍卖开始';
|
||||
$text['text'] = '交友开始';
|
||||
$text['step'] = 2;
|
||||
model('api/Chat')->sendMsg(1039,$room_id,$text);
|
||||
return ['code' => 1, 'msg' => '操作成功!', 'data' => ['friend_id' => $id]];
|
||||
@@ -225,7 +225,7 @@ class Friend extends Model
|
||||
* @param $room_id 房间id
|
||||
* @param $pit_number 坑位
|
||||
*/
|
||||
public function room_give_gift($uid, $to_uid, $gift_id, $gift_num, $from_type, $type, $room_id, $pit_number)
|
||||
public function room_give_gift($uid, $to_uid, $gift_id, $gift_num, $from_type, $type, $room_id, $pit_number,$heart_id)
|
||||
{
|
||||
$res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,$from_type,$type, $room_id,$pit_number);
|
||||
if($res['code'] != 1){
|
||||
|
||||
@@ -1213,7 +1213,7 @@ class Room extends Model
|
||||
|
||||
|
||||
//房间送礼
|
||||
public function room_gift($uid, $to_uid, $gift_id, $gift_num,$type, $room_id, $pit_number)
|
||||
public function room_gift($uid, $to_uid, $gift_id, $gift_num,$type, $room_id, $pit_number, $heart_id)
|
||||
{
|
||||
$label_type = model('Room')->get_room_label($room_id);
|
||||
if($label_type['code'] != 1){
|
||||
@@ -1248,7 +1248,7 @@ class Room extends Model
|
||||
}elseif($label_type['data']['type_id'] == 6){
|
||||
return model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,6,$type, $room_id,$pit_number);
|
||||
}elseif($label_type['data']['type_id'] == 7){
|
||||
return model('Friend')->room_give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number);
|
||||
return model('Friend')->room_give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,$heart_id);
|
||||
}else{
|
||||
$res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number);
|
||||
return $res;
|
||||
|
||||
Reference in New Issue
Block a user