detail.html
4.3 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{extend name="layout/default"}
{block name='title'}专家在线-问答{/block}
{block name="content"}
<style>
.swiper-container {
margin: 0 0.4rem;
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="Box">
<!-- 专家在线 -->
<div class="exports_Mask">
<div class="exports_Con">
<div class="exports_ConTxt">向{$news.name}提问</div>
<div class="export_ConLi">
<p class="exports_ConTxt2">*</p>
<textarea id="ex_textarea" placeholder="请输入问题" name="question" id="" cols="30" rows="10"></textarea>
</div>
<div class="export_ConLi" style="margin-top:0.32rem;">
<div class="export_ConLi2">
<p class="exports_ConTxt2">*</p>
<input id="ex_name " name="expert_id" value="{$news.id}" type="hidden" class="experts_input1">
<input type="text" name="name" placeholder="请输入姓名">
</div>
<div class="export_ConLi3">
<p class="exports_ConTxt2">*</p>
<input id="ex_phone" type="text" name="tel" placeholder="请输入手机号">
</div>
</div>
<div class="release_btn experts_maskBtn" style="margin:0.98rem auto 0rem;">提交</div>
</div>
</div>
<!-- 内容 -->
<div class="list_DBox">
<div class="experts_dBox">
<h1 class="list_DTit">{$news.name}</h1>
<div class="experts_Box2">
<div class="experts_Img2"><img src="/static/image/zaixianhuida_icon.png" alt=""></div>
<p>在线回答</p>
</div>
</div>
<!-- 富文本 -->
<div class="list_Dtext">
{$news.content}
</div>
<!-- 图片 -->
<div class="list_DImg">
<img src="{$news.image}" alt="">
</div>
<!-- 轮播 -->
<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>
</div>
</div>
<script>
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
slidesPerView:3.5,
paginationClickable: true,
spaceBetween: 4,
});
$('.experts_Box2').click(function() {
$('.exports_Mask').show();
});
$('.exports_Mask').click(function() {
$('.exports_Mask').hide();
});
$('.exports_Con').click(function(event) {
event.stopPropagation();
if ($('.exports_Con').css('display') == "block") {
$('.exports_Mask').show();
} else {
$('.exports_Mask').hide();
}
});
$('.experts_btn').click(function () {
$(".experts_mask").show();
});
$(".experts_maskCon").click(function(event) {
event.stopPropagation(); //不在派发事件
$('.experts_mask').show();
});
$('.experts_mask').click(function () {
$('.experts_mask').hide();
});
// 提交
$('.experts_maskBtn').click(function () {
var data=$("#myform").serialize();
if($('#ex_textarea').val() == ''){
w('请输入问题')
}else if($('#ex_name').val() ==''){
w('请输入姓名')
}else if($('#ex_phone').val() ==''){
w('请输入手机号')
}else{
ajax("/index/experts/save",data,"post",function (res) {
w(res.msg);
},"");
}
})
</script>
{/block}