|
|
|
@ -7,6 +7,7 @@ use User\Api\UserApi;
|
|
|
|
|
use Org\XiguSDK\Xigu;
|
|
|
|
|
use Base\Service\PromoteService;
|
|
|
|
|
use Base\Service\ApplyService;
|
|
|
|
|
use Base\Service\PromoteCompanyService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 后台首页控制器
|
|
|
|
@ -276,6 +277,13 @@ class PromoteController extends ThinkController
|
|
|
|
|
if ($this->accountExist($account)) {
|
|
|
|
|
$this->error('该账号已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteCompanyService = new PromoteCompanyService();
|
|
|
|
|
$verifyingPromotes = $promoteCompanyService->getVerifyingPromotes();
|
|
|
|
|
if ($promoteCompanyService->isExistVerifyingPromoteAccount([$account], $verifyingPromotes)) {
|
|
|
|
|
$this->error('该账号已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!empty($mobile_phone)){
|
|
|
|
|
//判断手机格式
|
|
|
|
|
if (!preg_match("/^1[3456789]{1}\d{9}$/", $mobile_phone)) {
|
|
|
|
@ -407,6 +415,13 @@ class PromoteController extends ThinkController
|
|
|
|
|
if ($this->accountExist($data['account'], $_POST['id'])) {
|
|
|
|
|
$this->error('该账号已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteCompanyService = new PromoteCompanyService();
|
|
|
|
|
$verifyingPromotes = $promoteCompanyService->getVerifyingPromotes();
|
|
|
|
|
if ($promoteCompanyService->isExistVerifyingPromoteAccount([$data['account']], $verifyingPromotes)) {
|
|
|
|
|
$this->error('该账号已存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$company_id = I('company_id');
|
|
|
|
|
if ($company_id <0 && $promote['level'] ==1) {
|
|
|
|
|
$this->error('请选择推广公司');
|
|
|
|
|