2019-04-25 18:39:58 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title>office图片预览</title>
|
|
|
|
|
<script src="js/lazyload.js"></script>
|
|
|
|
|
<style>
|
|
|
|
|
.container{
|
|
|
|
|
width:100%;
|
|
|
|
|
}
|
|
|
|
|
.img-area{
|
|
|
|
|
text-align: center
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<#list imgurls as img>
|
|
|
|
|
<div class="img-area">
|
2019-04-26 14:10:37 +08:00
|
|
|
<img class="my-photo" alt="loading" title="查看大图" style="cursor: pointer;" data-src="${img}" src="images/loading.gif" onclick="changePreviewType('allImages')">
|
2019-04-25 18:39:58 +08:00
|
|
|
</div>
|
|
|
|
|
</#list>
|
|
|
|
|
</div>
|
2019-04-26 14:10:37 +08:00
|
|
|
<img src="images/right.png" style="position: fixed; cursor: pointer; top: 40%; right: 70px; z-index: 999;" alt="使用PDF预览" title="使用PDF预览" onclick="changePreviewType('pdf')"/>
|
2019-04-25 18:39:58 +08:00
|
|
|
<script>
|
|
|
|
|
window.onload=checkImgs;
|
|
|
|
|
window.onscroll = throttle(checkImgs);
|
2019-04-26 14:10:37 +08:00
|
|
|
function changePreviewType(previewType) {
|
2019-04-25 18:39:58 +08:00
|
|
|
var url = window.location.href;
|
|
|
|
|
if (url.indexOf("officePreviewType=image") != -1) {
|
2019-04-26 14:10:37 +08:00
|
|
|
url = url.replace("officePreviewType=image", "officePreviewType="+previewType);
|
2019-04-25 18:39:58 +08:00
|
|
|
} else {
|
2019-04-26 14:10:37 +08:00
|
|
|
url = url + "&officePreviewType="+previewType;
|
2019-04-25 18:39:58 +08:00
|
|
|
}
|
|
|
|
|
window.location.href=url;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|