修改江湖家居装修公司正方形LOGO的默认尺寸为200X200像素
修改江湖家居装修公司正方形LOGO的默认尺寸为300X300,在后台设置中修改为200X200像素,经测试无效,上传的图片仍自动裁剪为300X300像素,解决方法:
打开\system\admin\controllers\company\company.ctl.php 文件,查找 public function edit($company_id = null) 对象方法,大概在206行左右,
查看如下代码:
if ($k === 'logo') {
$size['photo'] = $cfg['companydecorate1'] ? $cfg['companydecorate1'] : '200X100';
} else if($k === 'thumb') {
$size['photo'] = $cfg['companydecorate2'] ? $cfg['companydecorate2'] : '300X300';
}else{
$size['photo'] = '1000X200';
}
替换为:
if ($k === 'logo') {
$size['photo'] = $cfg['company']['logo'] ? $cfg['company']['logo'] : '200X100';
} else if($k === 'thumb') {
$size['photo'] = $cfg['company']['thumb'] ? $cfg['company']['thumb'] : '200X200';
}else{
$size['photo'] = '1000X200';
}
再打开/system/home/controllers/scenter/company.ctl.php 和 /system/home/controllers/ucenter/company.ctl.php 文件,查找 public function info() 对象方法,做同样的修改与替换。
页:
[1]