|
@@ -1571,16 +1571,24 @@ class Party extends Common
|
|
|
* 全麦/单独赠送礼物
|
|
|
*/
|
|
|
public function giveGiftToYou() {
|
|
|
+ $is_back = $this->request->request("is_back",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");
|
|
|
$party_id = $this->request->request("party_id",0);
|
|
|
$room_type = $this->request->request('room_type',1);
|
|
|
$number = $this->request->request("number");
|
|
|
- $is_back = $this->request->request("is_back",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);
|