mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
后台上传ico图标
This commit is contained in:
parent
97f3d2b789
commit
c08152c854
@ -292,6 +292,15 @@ class SystemConfig extends AuthController
|
||||
$to = public_path() . array_reverse(explode('/', $post['weixin_ckeck_file']))[0];
|
||||
@copy($from, $to);
|
||||
}
|
||||
if (isset($post['ico_path'])) {
|
||||
$from = public_path() . $post['ico_path'];
|
||||
$toAdmin = public_path('admin') . 'favicon.ico';
|
||||
$toHome = public_path('home') . 'favicon.ico';
|
||||
$toPublic = public_path() . 'favicon.ico';
|
||||
@copy($from, $toAdmin);
|
||||
@copy($from, $toHome);
|
||||
@copy($from, $toPublic);
|
||||
}
|
||||
if (isset($post['admin_port'])) {
|
||||
$res = include(config_path() . 'workerman.php');
|
||||
$old_admin_port = $res['admin']['port'];
|
||||
|
||||
@ -118,7 +118,7 @@ class SystemAttachmentServices extends BaseServices
|
||||
if ($upload_type == 0) {
|
||||
$upload_type = sys_config('upload_type', 1);
|
||||
}
|
||||
if ($menuName == 'weixin_ckeck_file') {
|
||||
if ($menuName == 'weixin_ckeck_file' || $menuName == 'ico_path') {
|
||||
$upload_type = 1;
|
||||
$realName = true;
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ return [
|
||||
//上传文件大小
|
||||
'filesize' => 2097152,
|
||||
//上传文件后缀类型
|
||||
'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'txt'],
|
||||
'fileExt' => ['jpg', 'jpeg', 'png', 'gif', 'pem', 'mp3', 'wma', 'wav', 'amr', 'mp4', 'key', 'xlsx', 'xls', 'txt', 'ico'],
|
||||
//上传文件类型
|
||||
'fileMime' => [
|
||||
'image/jpeg',
|
||||
@ -32,6 +32,7 @@ return [
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.ms-excel',
|
||||
'text/xml',
|
||||
'image/x-icon',
|
||||
],
|
||||
//驱动模式
|
||||
'stores' => [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user