|
|
|
@ -1088,6 +1088,7 @@ class PromoteController extends BaseController
|
|
|
|
|
if (!$result['status']) {
|
|
|
|
|
$this->ajaxReturn(['status' => 0, 'msg' => $result['message']]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$status = $promoteService->addPromote($params, $parent);
|
|
|
|
|
if ($status) {
|
|
|
|
|
$this->ajaxReturn(['status' => 1, 'msg' => '添加成功']);
|
|
|
|
@ -1217,7 +1218,10 @@ class PromoteController extends BaseController
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (empty($_REQUEST['real_name'])) {
|
|
|
|
|
$this->error('联系人姓名不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
if (empty($_REQUEST['real_name'])) {
|
|
|
|
|
$this->error('联系人姓名不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
exit();
|
|
|
|
@ -1239,6 +1243,20 @@ class PromoteController extends BaseController
|
|
|
|
|
$this->error('您输入的手机号码格式不合法', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$groupRemark = $_REQUEST['group_remark'] ?? '';
|
|
|
|
|
$promote = M('promote', 'tab_')->field(['id', 'level'])->where(['id' => $_REQUEST['id']])->find();
|
|
|
|
|
if (!$promote) {
|
|
|
|
|
$this->error('该推广员不存在', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ($promote['level'] == 2 && $groupRemark == '') {
|
|
|
|
|
$this->error('请输入部门名称', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ($promote['level'] == 3 && $groupRemark == '') {
|
|
|
|
|
$this->error('请输入小组名称', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
// if (empty($_REQUEST['email'])) {
|
|
|
|
|
// $this->error('电子邮箱不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
|
|
|
|
|
// return false;
|
|
|
|
|