yn_hxy_web/hxy-web/html/photoView.html

57 lines
1.4 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>公共照片查看</title>
<script src="../js/public/public.js"></script>
<script src="../js/public/public_utils.js"></script>
<script src="../plugs/jquery/jquery-3.6.0.min.js"></script>
<style>
body, html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
float: left;
background-repeat: no-repeat;
background-size: 100%;
}
#content{
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: content;
}
</style>
</head>
<body>
<div id="content">
</div>
</body>
<script type="text/javascript">
var path;
$(function () {
let filePath = localStorage.getItem("filePath");
let fileName = localStorage.getItem("fileName");
let fileTime = localStorage.getItem("fileTime");
console.log("filePath:"+filePath);
if(filePath == "" || filePath == null || filePath == "null"){
alert("图片获取失败!!!");
return;
}
//测试用
// path = 'http://192.168.0.14:1909/file/ynRealName/violationBlack/2024/05/13/08ffd23539df47ed873058a163249ffe005Qblgkgy1h3h38c7wwrj30q70q7gs5.jpg';
// path = fileUrl + "/" + filePath[i];
var html = `<img src="${filePath}" style="height:100%"/>`
$("#content").empty();
$("#content").append(html);
});
</script>
</html>