WIN-2308041133\Administrator 9 달 전
부모
커밋
345b92d981
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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)