From 14644b44a246a0d80a3453fb9b4990268215ab2b Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Tue, 10 Dec 2019 16:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=BD=E5=9C=B0=E9=A1=B5=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8=E6=B8=B8=E6=88=8F=E6=88=AA?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Game/edit.html | 12 +++++++++++- Application/Home/Controller/HomeController.class.php | 7 +++++++ Application/Home/View/default/Home/landingPage.html | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index a49fa8538..49f205480 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -333,7 +333,7 @@ - 横版游戏建议尺寸:16:9,1280*720px及以上;竖版游戏建议尺寸:9:16,720*1280px及以上,用于游戏详情页内展示 + 建议尺寸:750*1334,图片大小不超过3M @@ -1562,6 +1562,7 @@ id:'#screenshot', multiple:true }, + fileSingleSizeLimit:3*1024*1024, //设定单个文件大小 // dnd: false, paste: document.body, accept: { @@ -1655,6 +1656,15 @@ $percent.text( (percentage * 100).toFixed(0) + '%' ); }); + /** + * 验证文件格式以及文件大小 + */ + uploaderVideo.on("error",function (type){ + if(type=="F_EXCEED_SIZE"){ + layer.msg("视频大小不能超过3M"); + } + }); + uploaderImgScreen.on( 'uploadSuccess', function( file , response) { imgListScreenData.push(Number(response.id)); console.log(imgListScreenData) diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index ff6301680..aab22d5cf 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -209,6 +209,13 @@ class HomeController extends Controller } $game['flooring_page_imgs'] = $imageUrls; + $screenshotIds = explode(',', $game['screenshot']) ?? []; + $screenshotUrls = []; + foreach ($screenshotIds as $screenshotId) { + $screenshotUrls[] = get_cover($screenshotId, 'path'); + } + $game['screenshot'] = $screenshotUrls; + $isNewIos = false; if ($gameSource['is_new_sdk'] == 1) { $isNewIos = true; diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index bdca5ba6e..fab68793e 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -113,7 +113,7 @@