浏览代码

送礼物限制

zhangxiaobin 1 年之前
父节点
当前提交
0ab83c06dc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      application/api/controller/Party.php

+ 2 - 2
application/api/controller/Party.php

@@ -1591,6 +1591,8 @@ class Party extends Common
 
         $backGiftId = 0;
         $boxgiftInfo = [];
+        // 不可以赠送给自己
+        if(in_array($userauthid,$user_id_arr)) $this->error("不可以赠送给自己!");
         if($is_back == 1) {
             // 获取背包礼物信息
             $giftInfo = \app\common\model\GiftBack::get($gift_id);
@@ -1614,8 +1616,6 @@ class Party extends Common
             $giftValue = $giftInfo["value"] * $number;
             $getValue  = $giftInfo["value"] * $number;
         } else {
-//        // 不可以赠送给自己
-//        if(in_array($userauthid,$user_id_arr)) $this->error("不可以赠送给自己!");
 
             // 获取礼物信息
             $giftModel = new \app\common\model\Gift();