diff --git a/conf/app.php b/conf/app.php index 94ede2f..c99b551 100644 --- a/conf/app.php +++ b/conf/app.php @@ -54,7 +54,8 @@ $configs = array( 'screenshot_start' => 1000, //视频播放页快照截取开始时间,单位:毫秒 'screenshot_expire_seconds' => 315360000, //视频封面图缓存3650天 'small_image_zoom_rate' => 2.5, //缩略图在最小尺寸基础上的放大倍数,以确保清晰度 - 'enableSmallImage' => true, //开启图片小尺寸缩略图,设置 false 则关闭 + 'enableSmallImage' => true, //列表页面是否开启缩略图,true 为显示缩略图,false 则显示原图 + 'enableSmallImageForWan' => false, //外网使用时,点击图片打开fancybox时是否显示缩略图:true 显示缩略图, false 则显示原图 /* //视频皮肤配置 diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 97808ec..0ac70c8 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -294,15 +294,25 @@ eof; } if (in_array($file['extension'], $imgExts)) { + //缩略图 $imgUrl = urlencode($file['path']); $smallUrl = "/site/smallimg/?id={$file['id']}&url={$imgUrl}"; if (empty(FSC::$app['config']['enableSmallImage']) || FSC::$app['config']['enableSmallImage'] === 'false') { $smallUrl = $file['path']; } + + //大图 + $bigUrl = $smallUrl; + if (empty(FSC::$app['config']['enableSmallImageForWan']) || FSC::$app['config']['enableSmallImageForWan'] === 'false') { + $bigUrl = $file['path']; + } + echo << diff --git a/www/js/beauty.js b/www/js/beauty.js index 9da2e1a..e1d17f8 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -87,10 +87,23 @@ if ($('#image_site').get(0)) { // 图片浏览 Fancybox.bind('[data-fancybox]', { - toolbar: true, + Toolbar: { + display: { + left: ["infobar"], + middle: [ + "zoomIn", + "zoomOut", + "toggle1to1", + "rotateCCW", + "rotateCW", + "flipX", + "flipY", + ], + right: ["slideshow", "fullscreen", "thumbs", "download", "close"], + }, + }, loop: true, smallBtn: false, - buttons: ["zoom", "slideShow", "fullScreen", "download", "thumbs", "close"], iframe: { preload: false },