|
@@ -1571,16 +1571,24 @@ class Party extends Common
|
|
|
* 全麦/单独赠送礼物
|
|
|
*/
|
|
|
public function giveGiftToYou() {
|
|
|
+ $is_back = $this->request->request("is_back",0);// 是否背包赠送: 1=是,0=否
|
|
|
+
|
|
|
// 接口防并发
|
|
|
- if (!$this->apiLimit(1, 1000)) {
|
|
|
- $this->error(__('Operation frequently'));
|
|
|
+ if($is_back){
|
|
|
+ if (!$this->apiLimit(50, 1000)) {
|
|
|
+ $this->error(__('Operation frequently'));
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (!$this->apiLimit(1, 1000)) {
|
|
|
+ $this->error(__('Operation frequently'));
|
|
|
+ }
|
|
|
}
|
|
|
$user_ids = $this->request->request("user_id");// 赠送对象
|
|
|
$gift_id = $this->request->request("gift_id");// 礼物ID
|
|
|
$party_id = $this->request->request("party_id",0);// 派对ID
|
|
|
$room_type = $this->request->request('room_type',1); // 房间类型
|
|
|
$number = $this->request->request("number");// 赠送数量
|
|
|
- $is_back = $this->request->request("is_back",0);// 是否背包赠送: 1=是,0=否
|
|
|
+
|
|
|
if (!$user_ids || !in_array($is_back,[0,1]) || !$gift_id || !$number || !in_array($room_type,[1,2])) $this->error(__('Invalid parameters'));
|
|
|
$user_id_arr = explode(",",$user_ids);
|
|
|
$userCount = count($user_id_arr);
|