Commit ba53ea5f authored by zhuwei's avatar zhuwei

新增关联客户

parent 045a5371
......@@ -533,6 +533,44 @@ class Member extends Basic{
}
/**
* 新增关联客户
* @return \think\Response
*/
public function addUserBind()
{
if (empty($this->params['user_id'])) {
return $this->response(101, '参数错误');
}
$s_index_user = new UserService();
//新增
$add_res = $s_index_user->addUserBind($this->params['user_id'],$this->userId);
switch ($add_res) {
case 1 :
return $this->response("300", "参数不全");
break;
case 2 :
return $this->response("300", "当前客户已经存在绑定关系");
break;
case 3 :
return $this->response("300", "当前客户已经存在绑定关系");
break;
case 4 :
return $this->response("300", "绑定客户关系数超限");
break;
case 5 :
return $this->response("300", "绑定失败");
break;
case 0 :
return $this->response("200", "绑定成功");
break;
default :
return $this->response("300", "绑定失败");
}
}
public function ceshi()
{
$s = new UserService();
......
......@@ -403,6 +403,8 @@ Route::group('index', [
'addDaily' => ['index/DailyPaper/addDaily', ['method' => 'get|post']],
'commitCheck' => ['index/DailyPaper/commitCheck', ['method' => 'get|post']],
'getPayLogImg' => ['index/DailyPaper/getPayLogImg', ['method' => 'get|post']],
'addUserBind' => ['index/member/addUserBind', ['method' => 'get|post']],
]);
......
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