forked from Lin-arm/Bookshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jsp
170 lines (154 loc) · 7.72 KB
/
index.jsp
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
165
166
167
168
169
170
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<title>首页</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%-- <link rel="shortcut icon" href="favicon.ico">--%>
<link rel="shortcut icon" href="https://pic1.imgdb.cn/item/635d4e7f16f2c2beb1394e9a.png">
<link type="text/css" rel="stylesheet" href="css/bootstrap.css">
<link type="text/css" rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="layer/layer.js"></script>
<script type="text/javascript" src="js/cart.js"></script>
</head>
<body>
<!--header-->
<jsp:include page="/header.jsp">
<jsp:param name="flag" value="1"></jsp:param>
</jsp:include>
<!--banner轮播图-->
<div class="banner">
<div class="container">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators指示器 -->
<ol class="carousel-indicators" id="olnum">
<c:forEach items="${scroll}" var="g" varStatus="status">
<c:choose>
<c:when test="${status.first}">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
</c:when>
<c:otherwise>
<li data-target="#carousel-example-generic" data-slide-to="${status.index}"></li>
</c:otherwise>
</c:choose>
</c:forEach>
</ol>
<!-- Wrapper for slides 幻灯片包装器 -->
<div class="carousel-inner" role="listbox" id="lunbotu" style="width: 1242px; height: 432px;">
<c:forEach items="${scroll}" var="g" varStatus="status">
<c:choose>
<c:when test="${status.first}">
<div class="item active">
<h2 class="hdng"><a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">${g.name}</a><span></span></h2>
<p>今日精选推荐</p>
<a class="banner_a" href="javascript:;" onclick="buy(${g.id})">立刻购买</a>
<div class="banner-text">
<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">
<img class="banner-img" src="${pageContext.request.contextPath }/${g.cover}" alt="${g.name}" width="350" height="350">
</a>
</div>
</div>
</c:when>
<c:otherwise>
<div class="item">
<h2 class="hdng"><a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">${g.name}</a><span></span></h2>
<p>今日精选推荐</p>
<a class="banner_a" href="javascript:;" onclick="buy(${g.id})">立刻购买</a>
<div class="banner-text">
<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">
<img class="banner-img" src="${pageContext.request.contextPath }/${g.cover}" alt="${g.name}" width="350" height="350">
</a>
</div>
</div>
</c:otherwise>
</c:choose>
</c:forEach>
</div>
<!-- Controls控制 -->
<%--<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>--%>
</div>
</div>
</div>
<!--//banner-->
<div class="subscribe2"></div>
<!--gallery-->
<div class="gallery">
<div class="container">
<div class="alert alert-danger">热销推荐</div>
<div class="gallery-grids">
<c:forEach items="${hotList}" var="g">
<div class="col-md-4 gallery-grid glry-two">
<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">
<img src="${pageContext.request.contextPath }/${g.cover}" class="img-responsive" alt="${g.name}" width="350" height="350"/>
</a>
<div class="gallery-info galrr-info-two">
<p>
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">查看详情</a>
</p>
<a class="shop" href="javascript:;" onclick="buy(${g.id})">立刻购买</a>
<div class="clearfix"></div>
</div>
<div class="galy-info">
<p>${g.name}</p>
<%-- <p>${g.typeName} > ${g.name}</p>--%>
<div class="galry">
<div class="prices">
<h5 class="item_price">¥ ${g.price}</h5>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</c:forEach>
</div>
<div class="clearfix"></div>
<div class="alert alert-info">新书推荐</div>
<div class="gallery-grids">
<c:forEach items="${newList}" var="g">
<div class="col-md-3 gallery-grid ">
<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">
<img src="${pageContext.request.contextPath }/${g.cover}" class="img-responsive" alt="${g.name}"/>
</a>
<div class="gallery-info">
<p>
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
<a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">查看详情</a>
</p>
<a class="shop" href="javascript:;" onclick="buy(${g.id})">立刻购买</a>
<div class="clearfix"></div>
</div>
<div class="galy-info">
<p>${g.name}</p>
<%-- <p>${g.typeName} > ${g.name}</p>--%>
<div class="galry">
<div class="prices">
<h5 class="item_price">¥ ${g.price}</h5>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</c:forEach>
</div>
</div>
</div>
<!--//gallery-->
<!--subscribe-->
<div class="subscribe"></div>
<!--//subscribe-->
<!--footer-->
<jsp:include page="/footer.jsp"/>
</body>
</html>