WIN-2308041133\Administrator 1 month ago
parent
commit
345b92d981
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/admin/controller/user/User.php

+ 4 - 0
app/admin/controller/user/User.php

@@ -122,6 +122,10 @@ class User extends AuthController
     public function give_agent_level($uid = 0)
     {
         if (!$uid) return $this->failed('缺少参数');
+        $is_franchisee = User::where('uid', $uid)->value('is_franchisee');
+        if ($is_franchisee == 0){
+            $this->failed('非同盟商无法修改代理等级');
+        }
         $level = AgentLevel::getUserAgentLevel($uid);
         //获取当前会员等级
         if ($level === false)