|
@@ -32,6 +32,8 @@
|
|
|
.contact-box img {width:74px;height:74px;margin-bottom:12px;margin-left:15px;}
|
|
|
.contact-box span {margin-bottom:12px;margin-left:2px;font-size:15px;}
|
|
|
.jucai { position: absolute;right: -20px;bottom: -27px;}
|
|
|
+ .layui-layer-imgtit a {max-width:100% !important;}
|
|
|
+ .layui-layer-imgbar {display:block !important;}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -53,7 +55,7 @@
|
|
|
<div class="review-box">
|
|
|
{volist name="previous" id="vo"}
|
|
|
<div class="img-box">
|
|
|
- <div class="img" style="background-image:url('{$vo.image}')"></div>
|
|
|
+ <div class="img" data-url="{$vo.image}" data-title="{$vo.title}" style="background-image:url('{$vo.image}')"></div>
|
|
|
<p>{$vo.title}</p>
|
|
|
</div>
|
|
|
{/volist}
|
|
@@ -108,5 +110,30 @@
|
|
|
<img src="__HIMAGES__/jucai.png" class="jucai">
|
|
|
</div>
|
|
|
</div>
|
|
|
+<script src="__COMMON_JS__/jquery-1.12.4.min.js"></script>
|
|
|
+<script src="__COMMON_JS__/layer/layer.js"></script>
|
|
|
+<script>
|
|
|
+ $('.img').click(function(){
|
|
|
+ let url = $(this).data('url');
|
|
|
+ let title = $(this).data('title');
|
|
|
+ let json = {
|
|
|
+ "title": title, //相册标题
|
|
|
+ "id": 1, //相册id
|
|
|
+ "start": 0, //初始显示的图片序号,默认0
|
|
|
+ "data": [ //相册包含的图片,数组格式
|
|
|
+ {
|
|
|
+ "alt": title,
|
|
|
+ "pid": 2, //图片id
|
|
|
+ "src": url, //原图地址
|
|
|
+ "thumb": "" //缩略图地址
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ layer.photos({
|
|
|
+ photos: json
|
|
|
+ });
|
|
|
+ $('.layui-layer-imgbar').show();
|
|
|
+ });
|
|
|
+</script>
|
|
|
</body>
|
|
|
</html>
|