buy_detail.html
5.9 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>2-22-3商品详情</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/common/buy_goods_detail.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
.swiper-slide {
height: 5rem;
}
.swiper-slide img {
width: 7.5rem;
height: 5.65rem;
}
</style>
</head>
<body>
<div class="container">
<div class="swiper">
<div class="swiper-container swiper-container-horizontal swiper-container-ios">
<div class="swiper-wrapper">
<volist name="pic" id="pic">
<div class="swiper-slide swiper-slide-top swiper-slide-prev"><img src="{:cmf_get_image_url($pic)}"></div>
</volist>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination swiper-pagination-bullets">
</div>
</div>
</div>
<div class="goods_detail_desc">
<p class="goods_detail_desc_money">¥{$art.money}<span>联系客服<img src="__TMPL__/public/assets/images/kefu_icon.png" alt=""></span></p>
<p class="goods_detail_desc_title">{$art.name}</p>
<p class="goods_detail_desc_content">{$art.intro}</p>
</div>
<div class="content_body">
<div class="content_head">
<ul class="select_card con_title">
<li class="select_card_list con_curr">
<!-- <img src="images/buy_car.png" alt=""> -->
<em class="select_icon1"></em>
<span>商品详情</span>
</li>
<li class="select_card_list ">
<em class="select_icon2"></em>
<span>用户评价</span>
</li>
</ul>
</div>
<div class="con_all">
<div class="con_warp">
{$art.content}
</div>
<div class="con_warp" style="display: none">
<ul class="con_list">
<li>
<div class="head_img_box">
<img src="__TMPL__/public/assets/images/detail_head_img.png" alt="">
<p class="user_name">穷艾尔雅</p>
<span class="release_time">2018-07-14</span>
</div>
<div class="pingjia_box">
<p class="pingjia_content">出行收纳更方便,体积更小轻松放入汽车后备箱,非常好的
一次租赁体验!期待下一次租赁!
</p>
<img class="pingjia_image" src="__TMPL__/public/assets/images/111.png" alt="">
<img class="pingjia_image" src="__TMPL__/public/assets/images/111.png" alt="">
<img class="pingjia_image" src="__TMPL__/public/assets/images/111.png" alt="">
<img class="pingjia_image" src="__TMPL__/public/assets/images/111.png" alt="">
</div>
</li>
</ul>
</div>
</div>
</div>
<footer class="footer">
<a href="{:url('Shopping/index')}">
<div class="buycar_box">
<span class="goods_num">{$cart}</span>
<eq name="cart" value="0">
<img class="footer_buycar_img" src="__TMPL__/public/assets/images/cdvcd@1x.png" alt="">
<else/>
<img class="footer_buycar_img" src="__TMPL__/public/assets/images/cdvcd@2x.png" alt="">
</eq>
</div>
</a>
<p class="footer_pay">前往支付</p>
<p class="footer_buycar">加入购物车</p>
</footer>
</div>
<script>
$(document).ready(function() {
get_main_content();
var $menu_box = $('.content_body .con_title>li');
$menu_box.click(function() {
$(this).addClass('con_curr').siblings().removeClass('con_curr');
var index = $menu_box.index(this);
$('.con_all .con_warp').eq(index).show().siblings().hide();
});
})
function get_main_content() {
}
//购物车跳转
$('.footer_buycar_img').on('click', function() {
window.location.href = "{:url('Shopping/index')}"
})
//购买商品轮播图
var swiper = new Swiper('.swiper-container', {
loop: true,
speed: 2000,
autoplay: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
});
//点击添加购物车
$('.footer_buycar').on('click', function() {
$.ajax({
type:"POST",
url:"{:url('Shopping/add')}",
data:{
"vehicle_id":"{$Request.param.vehicle_id}",
},
success:function (data) {
if(data.code == 1){
$('.goods_num').text(data.data)
}else{
alert(data.message);
}
},
error:function () {
}
})
})
//去购买
$('.footer_pay').on('click', function() {
window.location.href = "{:url('Rent/buySure')}"
})
</script>
</body>
</html>