op_detail.html
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{extend name="layout/default"}
{block name="title"}专家观点--详情{/block}
{block name="content"}
<style>
.swiper-container {
margin: 0 0.4rem;
height: 0.9rem;
width: 100%;
box-sizing: border-box;
}
.swiper-button-next,
.swiper-button-prev {
width: 0.24rem;
height: 0.24rem;
background-size: 0.24rem 0.24rem;
top: 0.88rem;
}
.swiper-button-next {
right: 0.1rem;
background-image: url('/static/image/you_img.png');
}
.swiper-button-prev {
left: 0.1rem;
background-image: url('/static/image/zuo_img.png');
}
</style>
<div class="main">
<!-- 内容 -->
<div class="list_DBox">
<h1 class="list_DTit">{$news.name}</h1>
<p class="list_DTime">{$news.experts_name}</p>
<!-- 富文本 -->
<div class="list_Dtext">
{$news.content}
</div>
<!-- 轮播 -->
{if($news['images']!="")}
<div class="world_Dbox">
<div class="swiper-container">
<div class="swiper-wrapper">
{foreach(:explode(",",$news['images']) as $image)}
<div class="swiper-slide">
<div class="world_DImg"><img src="{$image}" alt=""></div>
</div>
{/foreach}
</div>
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
{/if}
</div>
</div>
<script>
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
slidesPerView:4,
paginationClickable: true,
spaceBetween: 4,
});
</script>
{/block}