修改PDF样式
이 커밋은 다음에 포함됨:
@@ -73,7 +73,7 @@
|
|||||||
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
||||||
html += "<video src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
html += "<video src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
||||||
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
||||||
html += "<img src='https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/priceImages/20250905/PDF.png' class='layui-upload-img' style='width: 40px;height: 40px;margin-right: 5px;' onclick='viewImage(\"" + item + "\")'/>";
|
html += "<img src='https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/priceImages/20250905/PDF.png' class='layui-upload-img' style='width: 40px;height: 40px;margin-right: 5px;' onclick='delImage(\"" + item + "\")'/>";
|
||||||
} else if (item != "") {
|
} else if (item != "") {
|
||||||
html += "<img src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
html += "<img src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,12 +70,16 @@
|
|||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function viewImage(item) {
|
function viewImage(item) {
|
||||||
|
let width = "400px";
|
||||||
|
let length = "400px";
|
||||||
let html = "<div style='width: 100%;height: 100%;display: flex;align-items: center;justify-content: center'>";
|
let html = "<div style='width: 100%;height: 100%;display: flex;align-items: center;justify-content: center'>";
|
||||||
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
||||||
html += "<video src='" + item + "' class='layui-upload-img' controls style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
html += "<video src='" + item + "' class='layui-upload-img' controls style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
||||||
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
||||||
let pdfUrl = "/js/pdf/web/viewer.html?file=" + item.replace("https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/", "http://imagediy.lingtao8.com/");
|
let pdfUrl = "/js/pdf/web/viewer.html?file=" + item;
|
||||||
html += "<iframe src='" + pdfUrl + "' style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
width = "800px";
|
||||||
|
length = "700px";
|
||||||
|
html += "<iframe src='" + pdfUrl + "' style='width: " + width + ";height: " + length + ";margin-right: 5px;'/>";
|
||||||
} else if (item != "") {
|
} else if (item != "") {
|
||||||
html += "<img src='" + item + "' class='layui-upload-img' style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
html += "<img src='" + item + "' class='layui-upload-img' style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
||||||
}
|
}
|
||||||
@@ -85,7 +89,7 @@
|
|||||||
title: false,
|
title: false,
|
||||||
closeBtn: 0,
|
closeBtn: 0,
|
||||||
offset: 'auto',
|
offset: 'auto',
|
||||||
area: ['400px', '400px'],
|
area: [width, length],
|
||||||
skin: 'layui-layer-nobg', //没有背景色
|
skin: 'layui-layer-nobg', //没有背景色
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
content: html
|
content: html
|
||||||
@@ -235,7 +239,7 @@
|
|||||||
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
||||||
html += "<video src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
html += "<video src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
||||||
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
||||||
html += "<img src='https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/priceImages/20250905/PDF.png' class='layui-upload-img' style='width: 40px;height: 40px;margin-right: 5px;' onclick='viewImage(\"" + item + "\")'/>";
|
html += "<img src='https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/priceImages/20250905/PDF.png' class='layui-upload-img' style='width: 40px;height: 40px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
||||||
} else if (item != "") {
|
} else if (item != "") {
|
||||||
html += "<img src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
html += "<img src='" + item + "' class='layui-upload-img' style='width: 50px;height: 50px;margin-right: 5px;' onclick='delImage(\"" + index + "\")'/>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,12 +58,16 @@
|
|||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function viewImage(item) {
|
function viewImage(item) {
|
||||||
|
let width = "400px";
|
||||||
|
let length = "400px";
|
||||||
let html = "<div style='width: 100%;height: 100%;display: flex;align-items: center;justify-content: center'>";
|
let html = "<div style='width: 100%;height: 100%;display: flex;align-items: center;justify-content: center'>";
|
||||||
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
if (item != "" && (item.indexOf(".mp4") > -1 || item.indexOf(".MP4") > -1)) {
|
||||||
html += "<video src='" + item + "' class='layui-upload-img' controls style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
html += "<video src='" + item + "' class='layui-upload-img' controls style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
||||||
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
} else if (item != "" && (item.indexOf(".PDF") > -1 || item.indexOf(".pdf") > -1)) {
|
||||||
let pdfUrl = "/js/pdf/web/viewer.html?file=" + item.replace("https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/", "http://imagediy.lingtao8.com/");
|
let pdfUrl = "/js/pdf/web/viewer.html?file=" + item;
|
||||||
html += "<iframe src='" + pdfUrl + "' style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
width = "800px";
|
||||||
|
length = "700px";
|
||||||
|
html += "<iframe src='" + pdfUrl + "' style='width: " + width + ";height: " + length + ";margin-right: 5px;'/>";
|
||||||
} else if (item != "") {
|
} else if (item != "") {
|
||||||
html += "<img src='" + item + "' class='layui-upload-img' style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
html += "<img src='" + item + "' class='layui-upload-img' style='width: 400px;height: 400px;margin-right: 5px;'/>";
|
||||||
}
|
}
|
||||||
@@ -73,7 +77,7 @@
|
|||||||
title: false,
|
title: false,
|
||||||
closeBtn: 0,
|
closeBtn: 0,
|
||||||
offset: 'auto',
|
offset: 'auto',
|
||||||
area: ['400px', '400px'],
|
area: [width, length],
|
||||||
skin: 'layui-layer-nobg', //没有背景色
|
skin: 'layui-layer-nobg', //没有背景色
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
content: html
|
content: html
|
||||||
|
|||||||
새 이슈에서 참조
사용자 차단