|
|
|
@ -654,4 +654,14 @@ class AjaxController extends ThinkController{
|
|
|
|
|
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevelResource($level)]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getPromotes()
|
|
|
|
|
{
|
|
|
|
|
$companyId = I('company_id', 0);
|
|
|
|
|
$companyMap = ['_string' => '1=1'];
|
|
|
|
|
if ($companyId > 0) {
|
|
|
|
|
$companyMap['company_id'] = $companyId;
|
|
|
|
|
}
|
|
|
|
|
$promotes = M('promote', 'tab_')->where($companyMap)->field(['id', 'account'])->select();
|
|
|
|
|
return $this->ajaxReturn(['status' => 1, 'message' => '获取成功', 'data' => ['promotes' => $promotes]]);
|
|
|
|
|
}
|
|
|
|
|
}
|