mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
图片管理列表,psd、tiff 格式的图片预览时使用缩略图 #339
This commit is contained in:
parent
43b54a05ca
commit
ede1ec5344
@ -67,7 +67,7 @@ class ImageController extends Controller
|
||||
}
|
||||
})->latest()->paginate(40);
|
||||
$images->getCollection()->each(function (Image $image) {
|
||||
$image->append('url', 'pathname');
|
||||
$image->append('url', 'pathname', 'thumb_url');
|
||||
$image->album?->setVisible(['name']);
|
||||
$image->group?->setVisible(['name']);
|
||||
$image->strategy?->setVisible(['name']);
|
||||
|
@ -353,9 +353,10 @@
|
||||
|
||||
$('.item').click(function () {
|
||||
let image = $(this).data('json');
|
||||
let previewUrl = ['psd', 'tif'].indexOf(image.extension) === -1 ? image.url : image.thumb_url;
|
||||
let html = $('#image-tpl').html()
|
||||
.replace(/__id__/g, image.id)
|
||||
.replace(/__url__/g, image.url)
|
||||
.replace(/__url__/g, previewUrl)
|
||||
.replace(/__user_name__/g, image.user ? image.user.name+'('+image.user.email+')' : '游客')
|
||||
.replace(/__user_email__/g, image.user ? image.user.email : '-')
|
||||
.replace(/__album_name__/g, image.album ? image.album.name : '-')
|
||||
|
Loading…
Reference in New Issue
Block a user