Commit 1581c3ad authored by zhuwei's avatar zhuwei

客户邀请人

parent e1123fa0
......@@ -553,7 +553,21 @@ class Member extends Basic
}
$s_index_user = new UserService();
$result = $s_index_user->userInvite($params['user_id'],$params['phone']);
return $this->response("200","请求成功",$result);
switch ($result) {
case 0 :
return $this->response("300", "绑定失败");
break;
case 1 :
return $this->response("200","请求成功");
break;
case 4 :
return $this->response("300", "不存在该邀请人!");
break;
default :
return $this->response("300", "绑定失败");
}
}
......
......@@ -679,7 +679,10 @@ class UserService
$referrer_source = 10;
$referrer_id = $user_res;
}
$this->user->setUserInvite($user_id,$referrer_source,$referrer_id);
$res = $this->user->setUserInvite($user_id,$referrer_source,$referrer_id);
return $res == 1 ? 1 : 0;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment