-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop-movie.html
269 lines (261 loc) · 11.7 KB
/
top-movie.html
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<html lang="en">
<head>
<title>Top Search Result</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- 引入 Bootstrap -->
<link href="script/bootstrap.min.css" rel="stylesheet">
<!-- 引入动画CSS -->
<link href="style/animate.css" rel="stylesheet">
<!-- 引入main.css -->
<link href="style/search.css" rel="stylesheet">
<link href="style/main.css" rel="stylesheet">
<!-- 引入Vue.js -->
<script src="script/vue.js"></script>
</head>
<body>
<div class="header fixed-header">
<div class="header-logo">
<a href="index.html">
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
<path d="M36 8l4 8h-6l-4-8h-4l4 8h-6l-4-8h-4l4 8h-6l-4-8H8c-2.21 0-3.98 1.79-3.98 4L4 36c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V8h-8z"></path>
</svg>
<span>Movie-Finder</span>
</a>
</div>
<div class="header-navigation">
<a id="movie-top-search">TOP榜单</a>
<div class="movie-type-search">
<a id="movie-type-search">类型</a>
<div class="movie-dropdown-content" hidden>
<ul>
<li id="Drama">Drama</li>
<li id="Comedy">Comedy</li>
<li id="Thriller">Thriller</li>
<li id="Action">Action</li>
<li id="Romance">Romance</li>
<li id="Documentary">Documentary</li>
</ul>
</div>
</div>
<a id="buy-ticket">购票</a>
</div>
<div class="header-search-bar">
<div class="cntr">
<div class="cntr-innr">
<label class="search" for="inpt_search">
<input id="inpt_search" type="text" placeholder="电影/影人/导演"/>
</label>
</div>
</div>
</div>
<div class="header-user-entrance">
<a data-toggle="modal" data-target="#loginModal">
<span class="glyphicon glyphicon-user"></span>登陆
</a>
<span>|</span>
<a data-toggle="modal" data-target="#registerModal">
<span class="glyphicon glyphicon-log-in"></span>注册
</a>
</div>
<div class="heading user-entrance after-login" hidden>
<span class="user-profile">
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path
d="M24 24c4.42 0 8-3.59 8-8 0-4.42-3.58-8-8-8s-8 3.58-8 8c0 4.41 3.58 8 8 8zm0 4c-5.33 0-16 2.67-16 8v4h32v-4c0-5.33-10.67-8-16-8z"></path></svg>
</span>
<span class="user-name">
</span>
<span class="glyphicon glyphicon-log-out log-out"></span>
</div>
</div>
<div class="carousel-inner movie-background">
<div class="item active animated fadeInUp">
<img src="images/carousel3.jpg" alt="third"/>
</div>
</div>
<div class="main">
<!-- loading effect -->
<div class="search-loading">
<div class="wBall" id="wBall_1">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_2">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_3">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_4">
<div class="wInnerBall"></div>
</div>
<div class="wBall" id="wBall_5">
<div class="wInnerBall"></div>
</div>
</div>
<div class="movie-list" id="movie_list">
<h3>Top100</h3>
<table class="movie" v-for="(mov,index) in movies">
<tbody>
<tr class="item">
<td class="movie-ranking">
<span>{{ index + 1 }}</span>
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
<path d="M35.27 11.69C34.54 10.67 33.35 10 32 10l-22 .02c-2.21 0-4 1.77-4 3.98v20c0 2.21 1.79 3.98 4 3.98L32 38c1.35 0 2.54-.67 3.27-1.69L44 24l-8.73-12.31z"></path>
</svg>
</td>
<td class="movie poster">
<!-- 图片 -->
<img v-bind:src=" mov.picUrl " />
</td>
<td class="content">
<div>
<div class="title">
<span class="movie-title" v-bind:data-movie="mov.movieId">{{ mov.movieName }}</span>
</div>
<div class="detail">
<!--信息 -->
<span class="glyphicon glyphicon-time"></span>
<span class="release-date">{{ mov.releaseDate | formatDate }}</span>
<span class="glyphicon glyphicon-bookmark"></span>
<span class="movie-type">
<template v-for="(tag,index) in mov.genres">
<span v-if="index != mov.genres.length - 1"> {{ tag }}/</span>
<span v-else>{{ tag }} </span>
</template>
</span>
<span class="glyphicon glyphicon-facetime-video"></span>
<span class="movie-director">
<template v-for="(director, index) in mov.directors">
<span class="person" v-bind:data-director="director.directorId"
v-if="index != mov.directors.length - 1">{{ director.directorName }}/</span>
<span class="person" v-bind:data-director="director.directorId" v-else>{{ director.directorName }} </span>
</template>
</span>
<section class="movie-actors actor-star">
<span class="glyphicon glyphicon-th-list"></span>
<template v-for="(star, index) in mov.starActors">
<span class="person" v-bind:data-actor="star.actorId" v-if="index != mov.starActors.length - 1">{{ star.actorName }}/</span>
<span class="person" v-bind:data-actor="star.actorId" v-else>{{ star.actorName }}</span>
</template>
</section>
</div>
<div class="star">
<div class="allstar">
<ul>
</ul>
<!-- 星星-->
</div>
<span class="rating_nums">{{ mov.score }}<!-- 分数--></span>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- BEGIN: modal -->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<div class="modal-logo">
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
<path d="M36 8l4 8h-6l-4-8h-4l4 8h-6l-4-8h-4l4 8h-6l-4-8H8c-2.21 0-3.98 1.79-3.98 4L4 36c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V8h-8z"></path>
</svg>
<span>Movie-Finder</span>
</div>
</div>
<div class="modal-body">
<div class="input-group">
<span class="glyphicon glyphicon-user input-group-addon"></span>
<input type="text" class="form-control" name="login-name" id="login-name" placeholder="用户名"/>
</div>
<div class="input-group">
<span class="glyphicon glyphicon-pencil input-group-addon"></span>
<input type="password" class="form-control" name="login-pwd" id="login-pwd" placeholder="您的密码"/>
</div>
<div class="error-message login" hidden></div>
</div>
<div class="modal-footer">
<div class="modal-btn-footer" id="login_btn">登陆</div>
</div>
</div><!-- END: /.modal-content -->
</div><!-- END: login-modal -->
</div>
<div class="modal fade" id="registerModal" tabindex="-2" role="dialog" aria-labelledby="registerLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<div class="modal-logo">
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
<path d="M36 8l4 8h-6l-4-8h-4l4 8h-6l-4-8h-4l4 8h-6l-4-8H8c-2.21 0-3.98 1.79-3.98 4L4 36c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V8h-8z"></path>
</svg>
<span>Movie-Finder</span>
</div>
</div>
<div class="modal-body">
<div class="input-group">
<span class="glyphicon glyphicon-user input-group-addon"></span>
<input type="text" class="form-control" name="register-name" id="register-name" placeholder="用户名"/>
</div>
<div class="input-group">
<span class="glyphicon glyphicon-pencil input-group-addon"></span>
<input type="password" class="form-control" name="register-pwd" id="register-pwd"
placeholder="您的密码"/>
</div>
<div class="input-group">
<span class="glyphicon glyphicon-ok input-group-addon"></span>
<input type="password" class="form-control" name="registser-re-pwd" id="register-re-pwd"
placeholder="请确认您的密码"/>
</div>
<div class="error-message register" hidden></div>
</div>
<div class="modal-footer">
<div class="modal-btn-footer" id="register_btn">注册</div>
</div>
</div><!-- END: modal-content -->
</div>
</div><!-- END: register modal -->
<!-- END: modal -->
<!-- 引入jQuery -->
<script src="script/jquery.min.js"></script>
<!-- 引入bootstrap.min.js -->
<script src="script/bootstrap.min.js"></script>
<!-- 引入自定义JS -->
<script src="script/main.js"></script>
<script>
loadingEffect($("div.search-loading"));
var objKey = getParams();
var keyword = objKey["type"];
$.ajax({
type: 'GET',
url: COMMON_URL + 'movies/top100',
data:{},
success: function(data){
var movies = data;
Vue.filter('formatDate', function (input) {
if (!input) return " ";
var year = input.slice(0, 4);
var month = input.slice(4, 6);
var day = input.slice(6, 8);
return year + "-" + month + "-" + day;
});
var mmovie = new Vue({
el: '#movie_list',
data: {
movies: movies
}
});
addStars(movies);
addAllLinks();
},
error: function(){}
});
</script>
</body>
</html>