@ -1156,6 +1156,12 @@ class PromoteCompanyController extends ThinkController
if ($save['site_domain_prefix'] == '') {
$this->error('请输入推广后台域名前缀');
}
if (strlen($save['site_domain_prefix']) > 6) {
$this->error('域名前缀不能超过6个字符');
if (!preg_match('/^[a-z0-9]+$/', $save['site_domain_prefix'])) {
$this->error('域名前缀只能由小写字母和数字组成');
if ($save['site_config']['icon'] == '') {
$this->error('请上传推广后台ICON');
@ -378,7 +378,7 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广后台域名前缀:</td>
<td class="r" >
<input type="text" class="txt" style="float: none;" name="site_domain_prefix" value="" placeholder="请输入推广后台域名前缀">
<span class="notice-text" style="float: none;">请确保唯一。完整地址: <span id="site-url-show" style="color: red; font-weight: bold;" data-domain="<?=C('DOMAIN', null, null)?>">无</span></span>
<span class="notice-text" style="float: none;">请确保唯一,只能由小写字母和数字组成,不能超过6个字符。完整地址: <span id="site-url-show" style="color: red; font-weight: bold;" data-domain="<?=C('DOMAIN', null, null)?>">无</span></span>
</td>
</tr>
@ -387,7 +387,7 @@
?>
<input type="text" class="txt" style="float: none;" name="site_domain_prefix" value="{$data.site_domain_prefix}" placeholder="请输入推广后台域名前缀">
<span class="notice-text" style="float: none;">请确保唯一。完整地址: <span id="site-url-show" style="color: red; font-weight: bold;" data-domain="<?=$domain?>"><?=$siteUrl?></span></span>
<span class="notice-text" style="float: none;">请确保唯一,只能由小写字母和数字组成,不能超过6个字符。完整地址: <span id="site-url-show" style="color: red; font-weight: bold;" data-domain="<?=$domain?>"><?=$siteUrl?></span></span>