master
ELF 4 years ago
parent dd66846e68
commit c339623c78

@ -399,7 +399,7 @@
</div> </div>
</div> </div>
</span> </span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图</span> <span class="notice-text">尺寸为16*16pxpng图片</span>
</td> </td>
</tr> </tr>
@ -420,7 +420,7 @@
</div> </div>
</div> </div>
</span> </span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图</span> <span class="notice-text">尺寸为210*60px透明png图片</span>
</td> </td>
</tr> </tr>
@ -1273,7 +1273,15 @@
var iconUploader = new WmUploader({ var iconUploader = new WmUploader({
selector: '#icon-uploader', selector: '#icon-uploader',
url: uploadUrl, url: uploadUrl,
accept: {
title: '图片',
extensions: 'png',
mimeTypes: 'image/*',
},
afterSuccess: function(file, response) { afterSuccess: function(file, response) {
if (response.status == 0) {
return layer.msg(response.info)
}
$('#site-icon').val(response.id) $('#site-icon').val(response.id)
}, },
afterDelete: function(file) { afterDelete: function(file) {
@ -1283,7 +1291,15 @@
var logoUploader = new WmUploader({ var logoUploader = new WmUploader({
selector: '#logo-uploader', selector: '#logo-uploader',
url: uploadUrl, url: uploadUrl,
accept: {
title: '图片',
extensions: 'png',
mimeTypes: 'image/*',
},
afterSuccess: function(file, response) { afterSuccess: function(file, response) {
if (response.status == 0) {
return layer.msg(response.info)
}
$('#site-logo').val(response.id) $('#site-logo').val(response.id)
}, },
afterDelete: function(file) { afterDelete: function(file) {

@ -404,16 +404,18 @@
</div> </div>
<!--用来存放文件信息--> <!--用来存放文件信息-->
<div class="uploader-list" style="display: flex;"> <div class="uploader-list" style="display: flex;">
<?php if(!empty($siteConfig['icon'])):?>
<div id="<?=$siteConfig['icon']?>" class="item flooring_page_img_box" style="margin-right: 10px;"> <div id="<?=$siteConfig['icon']?>" class="item flooring_page_img_box" style="margin-right: 10px;">
<a href="javascript:;"><img src="<?=get_cover($siteConfig['icon'], 'path')?>" style="width: 100px;height: 100px;cursor: move;"></a> <a href="javascript:;"><img src="<?=get_cover($siteConfig['icon'], 'path')?>" style="width: 100px;height: 100px;cursor: move;"></a>
<h4 class="info" style="text-align: center;"> <h4 class="info" style="text-align: center;">
<a href="javascript:;" class="file-delete table_click" style="float:none;display:inline-block;" data-ref-tag="#site-icon">删除</a> <a href="javascript:;" class="file-delete table_click" style="float:none;display:inline-block;" data-ref-tag="#site-icon">删除</a>
</h4> </h4>
</div> </div>
<?php endif;?>
</div> </div>
</div> </div>
</span> </span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图</span> <span class="notice-text">尺寸为16*16pxpng图片</span>
</td> </td>
</tr> </tr>
@ -430,16 +432,18 @@
</div> </div>
<!--用来存放文件信息--> <!--用来存放文件信息-->
<div class="uploader-list" style="display: flex;"> <div class="uploader-list" style="display: flex;">
<?php if(!empty($siteConfig['logo'])):?>
<div id="<?=$siteConfig['logo']?>" class="item flooring_page_img_box" style="margin-right: 10px;"> <div id="<?=$siteConfig['logo']?>" class="item flooring_page_img_box" style="margin-right: 10px;">
<a href="javascript:;"><img src="<?=get_cover($siteConfig['logo'], 'path')?>" style="width: 100px;height: 100px;cursor: move;"></a> <a href="javascript:;"><img src="<?=get_cover($siteConfig['logo'], 'path')?>" style="width: 100px;height: 100px;cursor: move;"></a>
<h4 class="info" style="text-align: center;"> <h4 class="info" style="text-align: center;">
<a href="javascript:;" class="file-delete table_click" style="float:none;display:inline-block;" data-ref-tag="#site-logo">删除</a> <a href="javascript:;" class="file-delete table_click" style="float:none;display:inline-block;" data-ref-tag="#site-logo">删除</a>
</h4> </h4>
</div> </div>
<?php endif;?>
</div> </div>
</div> </div>
</span> </span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图</span> <span class="notice-text">尺寸为210*60px透明png图片</span>
</td> </td>
</tr> </tr>
@ -1145,7 +1149,15 @@
var iconUploader = new WmUploader({ var iconUploader = new WmUploader({
selector: '#icon-uploader', selector: '#icon-uploader',
url: uploadUrl, url: uploadUrl,
accept: {
title: '图片',
extensions: 'png,ico',
mimeTypes: 'image/*',
},
afterSuccess: function(file, response) { afterSuccess: function(file, response) {
if (response.status == 0) {
return layer.msg(response.info)
}
$('#site-icon').val(response.id) $('#site-icon').val(response.id)
}, },
afterDelete: function(file) { afterDelete: function(file) {
@ -1155,7 +1167,15 @@
var logoUploader = new WmUploader({ var logoUploader = new WmUploader({
selector: '#logo-uploader', selector: '#logo-uploader',
url: uploadUrl, url: uploadUrl,
accept: {
title: '图片',
extensions: 'png',
mimeTypes: 'image/*',
},
afterSuccess: function(file, response) { afterSuccess: function(file, response) {
if (response.status == 0) {
return layer.msg(response.info)
}
$('#site-logo').val(response.id) $('#site-logo').val(response.id)
}, },
afterDelete: function(file) { afterDelete: function(file) {

@ -1269,7 +1269,10 @@ class PromoteService {
$url = str_replace('http://', '', $url); $url = str_replace('http://', '', $url);
$url = str_replace('https://', '', $url); $url = str_replace('https://', '', $url);
$url = str_replace($domain, '', $url); $url = str_replace($domain, '', $url);
$domainPrefix = str_replace('tg-', '', $url); $domainPrefix = '';
if ($url != 'tg') {
$domainPrefix = str_replace('tg-', '', $url);
}
return M('promote_company', 'tab_')->where(['site_domain_prefix' => $domainPrefix])->find(); return M('promote_company', 'tab_')->where(['site_domain_prefix' => $domainPrefix])->find();
} }

@ -6,6 +6,12 @@ function WmUploader(options) {
return num; return num;
} }
this.accept = options.accept == undefined ? {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: 'image/*',
} : options.accept
// fileType: img file // fileType: img file
this.fileType = options.fileType == undefined ? 'img' : options.fileType this.fileType = options.fileType == undefined ? 'img' : options.fileType
this.uploadKey = options.uniqueCode == undefined ? this.randomNum(10000, 99999) : options.uniqueCode this.uploadKey = options.uniqueCode == undefined ? this.randomNum(10000, 99999) : options.uniqueCode
@ -34,11 +40,7 @@ function WmUploader(options) {
id: that.uploadSelector, id: that.uploadSelector,
multiple: false multiple: false
}, },
accept: { accept: that.accept,
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
resize: false, resize: false,
disableGlobalDnd: true, disableGlobalDnd: true,
fileNumLimit: 1, fileNumLimit: 1,

Loading…
Cancel
Save