|
|
@@ -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)
|