Merge branch 'hotfix/add_company' into release

master
ELF 4 years ago
commit 8cb9a6552a

@ -324,6 +324,11 @@ class PartnerController extends ThinkController
$this->error('已存在同名未审核的cp,请勿重复添加');
}
$has_check = M("partner","tab_")->where(["partner_name"=>$partner_info['partner']])->field("id")->find();
if ($has_check) {
$this->error('已存在同名cp,请勿重复添加');
}
$res =D("PartnerVerify")->add_db($save);
if ($res) {
//操作日志

@ -970,6 +970,14 @@ class PromoteCompanyController extends ThinkController
$this->error('推广公司已存在');
}
}
if(!isset($save['id'])){
$map['company_id'] = 0;
$res = M("PromoteCompanyVerify","tab_")->where($map)->field("id")->find();
if($res){
$this->error('已添加过此推广公司,请联系管理尽快审核');
}
}
// if(!empty(I("contact_phone")) && !checkPhone(I('contact_phone'))) {
// $this->error('联系电话格式不正确');

@ -437,11 +437,23 @@
<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('PromoteCompany/lists')}");
$('#submit').click(function(){
$('#form').submit();
});
var ids = [];
highlight_subnav("{:U('PromoteCompany/lists')}");
var flag = false;
$('#submit').click(function(){
if (!flag) {
flag = true;
setTimeout(function () {
flag = false;
$('#form').submit();
}, 500);
}else{
layer.msg('请求处理中,请勿重复点击');
}
});
var ids = [];
</script>
<script>
var doc = [];

Loading…
Cancel
Save