diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php
index 25e0b7c3f..5524c3c17 100644
--- a/Application/Admin/Controller/PromoteCompanyController.class.php
+++ b/Application/Admin/Controller/PromoteCompanyController.class.php
@@ -534,6 +534,12 @@ class PromoteCompanyController extends ThinkController
$deposit = M('president_deposit', 'tab_')->where(['company_id' => $data['id']])->find();
+ $siteConfig = $data['site_config'] == '' ? null : json_decode($data['site_config'], true);
+ if ($siteConfig) {
+ $siteConfig['logo'] = get_cover($siteConfig['logo'], 'path');
+ $siteConfig['icon'] = get_cover($siteConfig['icon'], 'path');
+ }
+
$this->assign('selfCompanies', $selfCompanies);
$this->assign('payWays', PresidentDepositService::$payWays);
$this->assign('payTypes', PresidentDepositService::$payTypes);
@@ -542,7 +548,7 @@ class PromoteCompanyController extends ThinkController
$this->assign('deposit', $deposit);
}
$this->assign('relation', $relation);
-
+ $this->assign('siteConfig', $siteConfig);
$this->assign('data', $data);
$this->meta_title ='推广公司信息查看';
$this->display();
@@ -589,6 +595,12 @@ class PromoteCompanyController extends ThinkController
$selfCompanies = M('company_info', 'tab_')->field('id,partner company_name,link_man,link_phone')->where(['status' => 1])->select();
+ $siteConfig = $data['site_config'] ?? null;
+ if ($siteConfig) {
+ $siteConfig['logo'] = get_cover($siteConfig['logo'], 'path');
+ $siteConfig['icon'] = get_cover($siteConfig['icon'], 'path');
+ }
+
$this->assign('selfCompanies', $selfCompanies);
$this->assign('payWays', PresidentDepositService::$payWays);
$this->assign('payTypes', PresidentDepositService::$payTypes);
@@ -598,6 +610,7 @@ class PromoteCompanyController extends ThinkController
}
$this->assign('relation', $data['relation'] ?? null);
$this->assign('data', $data);
+ $this->assign('siteConfig', $siteConfig);
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/edit'])->find());
$this->meta_title ='审核信息查看';
$this->display("view");
@@ -704,6 +717,10 @@ class PromoteCompanyController extends ThinkController
if($data['resources'] == ''){
$data['resources'] ="[]";
}
+ $siteConfig = null;
+ if ($data['site_config']) {
+ $siteConfig = json_decode($data['site_config'], true);
+ }
$data['turnover_ratio'] = $data['turnover_ratio'] ? json_decode($data['turnover_ratio'], true) : $data['turnover_ratio'];
// $data['game_ids'] = explode(',', $data['game_ids']);
@@ -743,6 +760,7 @@ class PromoteCompanyController extends ThinkController
$this->assign('relation', $relation);
$this->assign('serviceAgreements', M('service_agreement', 'tab_')->select());
+ $this->assign('siteConfig', $siteConfig);
$this->assign('data', $data);
$this->display();
}
@@ -1134,13 +1152,30 @@ class PromoteCompanyController extends ThinkController
}
}
+ if (isset($save['is_site_custom']) && $save['is_site_custom'] == 1) {
+ if ($save['site_domain_prefix'] == '') {
+ $this->error('请输入推广后台域名前缀');
+ }
+ if ($save['site_config']['icon'] == '') {
+ $this->error('请上传推广后台ICON');
+ }
+ if ($save['site_config']['logo'] == '') {
+ $this->error('请上传推广后台logo');
+ }
+
+ /**
+ * @todo 暂未检查待审核的推广公司是否含有重复域名前缀
+ */
+ $domainExistMap = ['site_domain_prefix' => $save['site_domain_prefix']];
+ if (!empty($save['id'])) {
+ $domainExistMap['id'] = ['neq', $save['id']];
+ }
+ $domainCompany = M('promote_company', 'tab_')->field(['id'])->where($domainExistMap)->find();
+ if ($domainCompany) {
+ $this->error('推广后台域名前缀已存在');
+ }
+ }
- // if(!empty(I("contact_phone")) && !checkPhone(I('contact_phone'))) {
- // $this->error('联系电话格式不正确');
- // }
- // if(!empty(I('reg_phone')) && !checkPhone(I('reg_phone'))) {
- // $this->error('注册电话格式不正确');
- // }
if(!empty(I('taxation_rate')) && I('taxation_rate') > 0) {
if(!checkNumber(I('taxation_rate'))){
$this->error('税费费率格式错误');
diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html
index f547c50bd..e86b6adb9 100644
--- a/Application/Admin/View/PromoteCompany/add.html
+++ b/Application/Admin/View/PromoteCompany/add.html
@@ -22,6 +22,7 @@
+