新功能点:支持全局水印

This commit is contained in:
陈精华
2020-05-13 19:40:31 +08:00
committed by kl
parent 9c096605bb
commit fde31cb327
235 changed files with 114621 additions and 3392 deletions

View File

@ -5,17 +5,28 @@
<title>PDF图片预览</title>
<script src="js/lazyload.js"></script>
<style>
.container{
* {
margin: 0;
padding: 0;
}
html, body {
height: 100%;
width: 100%;
}
body {
background-color: #404040;
}
.container {
width: 100%;
height: 100%;
}
.img-area{
.img-area {
text-align: center
}
</style>
</head>
<body bgcolor="#404040">
<body>
<div class="container">
<#list imgurls as img>
<div class="img-area">
@ -24,8 +35,31 @@
</#list>
</div>
<img src="images/pdf.svg" width="63" height="63" style="position: fixed; cursor: pointer; top: 40%; right: 48px; z-index: 999;" alt="使用PDF预览" title="使用PDF预览" onclick="changePreviewType('pdf')"/>
<script src="js/watermark.js" type="text/javascript"></script>
<script>
window.onload=checkImgs;
window.onload = function () {
/*初始化水印*/
var watermarkTxt = '${watermarkTxt}';
if (watermarkTxt !== '') {
watermark.init({
watermark_txt: '${watermarkTxt}',
watermark_x: 0,
watermark_y: 0,
watermark_rows: 0,
watermark_cols: 0,
watermark_x_space: ${watermarkXSpace},
watermark_y_space: ${watermarkYSpace},
watermark_font: '${watermarkFont}',
watermark_fontsize: '${watermarkFontsize}',
watermark_color:'${watermarkColor}',
watermark_alpha: ${watermarkAlpha},
watermark_width: ${watermarkWidth},
watermark_height: ${watermarkHeight},
watermark_angle: ${watermarkAngle},
});
}
checkImgs();
};
window.onscroll = throttle(checkImgs);
function changePreviewType(previewType) {
var url = window.location.href;