From dce35b6ff17326e87b137e75f84e26d4746e5525 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 5 Dec 2019 18:22:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=BC=96=E8=BE=91=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=99=90=E5=88=B6=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FileController.class.php | 8 ++++ Application/Admin/View/Game/edit.html | 41 +++++++++++-------- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/Application/Admin/Controller/FileController.class.php b/Application/Admin/Controller/FileController.class.php index 0e1304463..c96c5d31d 100644 --- a/Application/Admin/Controller/FileController.class.php +++ b/Application/Admin/Controller/FileController.class.php @@ -200,6 +200,14 @@ class FileController extends AdminController /* 调用文件上传组件上传文件 */ $Picture = D('Picture'); $pic_driver = C('PICTURE_UPLOAD_DRIVER'); + + if (I('icon')) { + if ($_FILES['file']['size'] > 51200) { + $return = array('status' => 1001, 'info' => '图片大小不得超过50k', 'data' => ''); + $this->ajaxReturn($return); + } + } + $info = $Picture->upload( $_FILES, C('PICTURE_UPLOAD'), diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index 1108fc7a0..3efde07c9 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -251,7 +251,7 @@ - 尺寸不得小于512*512px,圆角半径113px,不强制要求,可直接提供512*512方图 + 尺寸不得小于125*125px,大小不得超过50K @@ -1678,7 +1678,8 @@ } -