浏览代码

禁止权限

zhangxiaobin 1 年之前
父节点
当前提交
d96cf2330e

+ 1 - 1
Party.php

@@ -1526,7 +1526,7 @@ class Party extends Common
                     $where["id"] = $userauthid;
                     $res1 = $userModel->where($where)->setDec("jewel", $giftValue);
                     // 添加当前用户钻石流水记录
-                    $res2 = $userjewellogModel->addUserJewelLog($userauthid, $giftValue, "-", $userInfo["jewel"], "赠送礼物:'" . $giftInfo["name"] . "',扣除" . $giftValue . "钻石!");
+                    $res2 = $userjewellogModel->addUserJewelLog($userauthid, $giftValue, "-", $userInfo["jewel"], "赠送礼物:'" . $giftInfo["name"] . "',扣除" . $giftValue . "钻石!",7);
                 }
 
                 // 添加赠送用户声币余额

+ 3 - 0
application/api/controller/Attire.php

@@ -50,6 +50,9 @@ class Attire extends Api
         if (!$attire_id) {
             $this->error(__('Invalid parameters'));
         }
+        if ($this->auth->power->attire == 1) {
+            $this->error('您已被禁止购买装扮');
+        }
         // 判断用户钻石余额是否充足
         $userModel = new \app\common\model\User();
         $userInfo = $userModel->where(["id"=>$this->auth->id])->find();

+ 3 - 0
application/api/controller/Dispatch.php

@@ -360,6 +360,9 @@ class Dispatch extends Common
         if (!$skill_id || !$num) {
             $this->error(__('Invalid parameters'));
         }
+        if ($this->auth->power->payorder == 1) {
+            $this->error('您已被禁止下单');
+        }
         $orderModel = new \app\common\model\DispatchOrder();
 
         // 获取接单信息

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

@@ -61,7 +61,7 @@ class Money extends Common
         if ($this->auth->is_auth != 2) {//实名后允许充值
             throw new Exception('请先实名认证');
         }
-        if ($this->power->recharge == 1) {//禁止充值
+        if ($this->auth->power->recharge == 1) {//禁止充值
             throw new Exception('禁止充值');
         }
         $user_id = $this->auth->id;
@@ -154,7 +154,7 @@ class Money extends Common
         }
 
         // 查询新人礼包
-        $this->addBagGift($user_id, $amount);
+        //$this->addBagGift($user_id, $amount);
 
         /*if ($method == "app") {
             $this->success("", json_decode($result, true));

+ 3 - 1
application/api/controller/Noble.php

@@ -97,7 +97,9 @@ class Noble extends Api
         if (!$level_id) {
             $this->error(__('Invalid parameters'));
         }
-
+        if ($this->auth->power->noble == 1) {
+            $this->error('您已被禁止开通贵族');
+        }
         $time = time();
         // 获取贵族信息
         $noblelevelModel = new \app\common\model\NobleLevel();

+ 3 - 0
application/api/controller/Usercenter.php

@@ -1183,6 +1183,9 @@ class UserCenter extends Common
             if ($isAnchor != 2) {
                 throw new Exception('您不是主播不允许提现');
             }
+            if ($this->auth->power->withdraw == 1) {
+                throw new Exception('您已被禁止提现');
+            }
             //验证提现类型
             $withdrawTypeConfig = config('wallet.withdraw_type');
             $typeIds = array_keys($withdrawTypeConfig);