-
Notifications
You must be signed in to change notification settings - Fork 34
/
movie.php
425 lines (404 loc) · 28.1 KB
/
movie.php
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<?php
/**
* 我的追剧
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('compoment/head.php');?>
<style>
#imga{
height:auto;
}
@media (max-width: 767px) {
#imga{
height:auto;
}
}
</style>
<div class="pure-g" id="layout">
<div class="pure-u-1 pure-u-md-<?php if(Bsoptions('site_style') == '1' || Bsoptions('site_style') == ''):?>3<?php endif;?><?php if(Bsoptions('site_style') == '2'):?>4<?php endif;?>-4">
<div class="content_container">
<?php if(Bsoptions('Diy') == true): ?><div class="ui <?php if(Bsoptions('postType') == "1"): ?>raised<?php endif; ?><?php if(Bsoptions('postType') == "2"): ?>stacked<?php endif; ?><?php if(Bsoptions('postType') == "3"): ?>tall stacked<?php endif; ?><?php if(Bsoptions('postType') == "4"): ?>piled<?php endif; ?> segment" <?php if(Bsoptions('postradius')): ?>style="border-radius:<?php echo Bsoptions('postradius'); ?>px"<?php endif; ?>><?php endif; ?>
<h2><i class="video icon"></i> <?php $this->title() ?></h2>
<?php if(!empty(Bsoptions('douban_movie_note'))): ?>
<div class="ui segment">
<i class="red heart icon"></i>
<?php echo Bsoptions('douban_movie_note');?>
</div>
<?php endif; ?>
<div class="ui active inverted dimmer" id="commonLoad" style="display:none">
<div class="ui active black elastic loader"></div>
</div>
<div class="ui secondary pointing menu">
<?php if(getMovieTag()[0]):?>
<a id="first" class="item active" data-tab="first"><?php echo getMovieTag()[0]; ?></a>
<?php endif; ?>
<?php if(getMovieTag()[1]):?>
<a id="second" class="item" data-tab="second"><?php echo getMovieTag()[1]; ?></a>
<?php endif; ?>
<?php if(getMovieTag()[2]):?>
<a id="third" class="item" data-tab="third"><?php echo getMovieTag()[2]; ?></a>
<?php endif; ?>
</div>
<?php if(getMovieTag()[0]):?>
<div class="ui bottom attached tab active" data-tab="first">
<div id="loading" class="ui icon message" style="display:none">
<i class="video loading icon"></i>
<div class="content">
<div class="header">
正在获取中.....
</div>
<p>请稍等一下哦~马上就出来了</p>
</div>
</div>
<div id="error1" style="display:none">
<article class="post">
<center><svg t="1617683554811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2629" width="200" height="200"><path d="M817.152 346.112c0-12.8-10.752-23.552-23.552-23.552h-28.672v281.6l-181.76 182.272H361.472v15.36c0 12.8 10.752 23.552 23.552 23.552l254.976-2.56 180.224-184.32-3.072-292.352z" fill="#E3EAED" p-id="2630"></path><path d="M332.8 705.536H258.56c-18.432 0-32.768-14.336-32.768-32.768V223.232c0-18.432 14.336-32.768 32.768-32.768H604.16c4.608 0 9.216 4.096 9.216 9.216 0 4.608-4.096 9.216-9.216 9.216H258.56c-7.68 0-14.336 6.656-14.336 14.336v449.024c0 7.68 6.656 14.336 14.336 14.336H332.8M686.08 299.52v-51.2c0-4.608 4.096-9.216 9.216-9.216 4.608 0 9.216 4.096 9.216 9.216v51.2" fill="#D3DBDE" p-id="2631"></path><path d="M608.768 797.184H350.208c-18.432 0-32.768-14.336-32.768-32.768V315.392c0-18.432 14.336-32.768 32.768-32.768h413.184c18.432 0 32.768 14.336 32.768 32.768v294.912l-187.392 186.88z m-258.56-496.64c-7.68 0-14.336 6.656-14.336 14.336v449.024c0 7.68 6.656 14.336 14.336 14.336h251.392l176.128-176.128v-286.72c0-7.68-6.656-14.336-14.336-14.336H350.208z" fill="#D3DBDE" p-id="2632"></path><path d="M601.088 778.752l177.152-176.128V322.56H394.752c-12.8 0-23.552 11.264-23.552 24.576v431.616h229.888z" fill="#F2F5F7" p-id="2633"></path><path d="M613.888 788.992h-18.432v-110.08c0-44.032 36.352-80.384 80.384-80.384h103.936v17.92H675.84c-34.304 0-62.464 27.648-62.464 62.464l0.512 110.08z m45.056-350.72H453.12c-6.656 0-12.288-5.632-12.288-12.288 0-6.656 5.632-12.288 12.288-12.288h205.824c6.656 0 12.288 5.632 12.288 12.288 0 7.168-5.632 12.288-12.288 12.288z m0-11.776v6.144-6.144z m1.536 71.168H453.12c-6.656 0-12.288-5.632-12.288-11.776 0-6.656 5.632-11.776 12.288-11.776H660.48c6.656 0 12.288 5.632 12.288 11.776-0.512 6.656-5.632 11.776-12.288 11.776z m0-11.776v6.144-6.144z m0 71.68H453.12c-6.656 0-12.288-5.632-12.288-11.776 0-6.656 5.632-11.776 12.288-11.776H660.48c6.656 0 12.288 5.632 12.288 11.776-0.512 6.656-5.632 11.776-12.288 11.776z m0-11.776v6.144-6.144z m-10.752-451.072c-5.12 0-9.216 4.096-9.216 9.216v61.44c0 5.12 4.096 9.216 9.216 9.216 4.608 0 9.216-4.096 9.216-9.216v-61.44c0-4.608-4.096-9.216-9.216-9.216z m114.688 17.408c-4.096-3.072-9.728-2.048-12.8 2.048l-35.84 49.664c-3.072 4.096-2.048 9.728 2.048 12.8 2.048 1.024 3.584 2.048 5.632 2.048 3.072 0 5.632-1.024 7.168-3.584l35.84-49.664c2.56-4.608 2.048-10.24-2.048-13.312z m58.88 71.168c-2.048-5.12-7.168-6.656-12.288-4.096l-55.296 25.6c-5.12 2.048-6.656 7.168-4.096 12.288 2.048 3.584 5.12 5.632 8.704 5.632 1.024 0 2.56 0 3.584-0.512l55.296-25.6c4.096-3.584 6.144-8.704 4.096-13.312z" fill="#D3DBDE" p-id="2634"></path></svg></center>
<center><h2>暂无数据</h2></center>
</article>
</div>
<div class="finish_content1 ui three column doubling stackable masonry grid"></div>
<!--分页链接-->
<br>
<div class="pagelist" id="page1">
</div>
</div>
<?php endif; ?>
<?php if(getMovieTag()[1]):?>
<div class="ui tab" data-tab="second">
<div id="loading2" class="ui icon message" style="display:none">
<i class="video loading icon"></i>
<div class="content">
<div class="header">
正在获取中.....
</div>
<p>请稍等一下哦~马上就出来了</p>
</div>
</div>
<div id="error2" style="display:none">
<article class="post">
<center><svg t="1617683554811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2629" width="200" height="200"><path d="M817.152 346.112c0-12.8-10.752-23.552-23.552-23.552h-28.672v281.6l-181.76 182.272H361.472v15.36c0 12.8 10.752 23.552 23.552 23.552l254.976-2.56 180.224-184.32-3.072-292.352z" fill="#E3EAED" p-id="2630"></path><path d="M332.8 705.536H258.56c-18.432 0-32.768-14.336-32.768-32.768V223.232c0-18.432 14.336-32.768 32.768-32.768H604.16c4.608 0 9.216 4.096 9.216 9.216 0 4.608-4.096 9.216-9.216 9.216H258.56c-7.68 0-14.336 6.656-14.336 14.336v449.024c0 7.68 6.656 14.336 14.336 14.336H332.8M686.08 299.52v-51.2c0-4.608 4.096-9.216 9.216-9.216 4.608 0 9.216 4.096 9.216 9.216v51.2" fill="#D3DBDE" p-id="2631"></path><path d="M608.768 797.184H350.208c-18.432 0-32.768-14.336-32.768-32.768V315.392c0-18.432 14.336-32.768 32.768-32.768h413.184c18.432 0 32.768 14.336 32.768 32.768v294.912l-187.392 186.88z m-258.56-496.64c-7.68 0-14.336 6.656-14.336 14.336v449.024c0 7.68 6.656 14.336 14.336 14.336h251.392l176.128-176.128v-286.72c0-7.68-6.656-14.336-14.336-14.336H350.208z" fill="#D3DBDE" p-id="2632"></path><path d="M601.088 778.752l177.152-176.128V322.56H394.752c-12.8 0-23.552 11.264-23.552 24.576v431.616h229.888z" fill="#F2F5F7" p-id="2633"></path><path d="M613.888 788.992h-18.432v-110.08c0-44.032 36.352-80.384 80.384-80.384h103.936v17.92H675.84c-34.304 0-62.464 27.648-62.464 62.464l0.512 110.08z m45.056-350.72H453.12c-6.656 0-12.288-5.632-12.288-12.288 0-6.656 5.632-12.288 12.288-12.288h205.824c6.656 0 12.288 5.632 12.288 12.288 0 7.168-5.632 12.288-12.288 12.288z m0-11.776v6.144-6.144z m1.536 71.168H453.12c-6.656 0-12.288-5.632-12.288-11.776 0-6.656 5.632-11.776 12.288-11.776H660.48c6.656 0 12.288 5.632 12.288 11.776-0.512 6.656-5.632 11.776-12.288 11.776z m0-11.776v6.144-6.144z m0 71.68H453.12c-6.656 0-12.288-5.632-12.288-11.776 0-6.656 5.632-11.776 12.288-11.776H660.48c6.656 0 12.288 5.632 12.288 11.776-0.512 6.656-5.632 11.776-12.288 11.776z m0-11.776v6.144-6.144z m-10.752-451.072c-5.12 0-9.216 4.096-9.216 9.216v61.44c0 5.12 4.096 9.216 9.216 9.216 4.608 0 9.216-4.096 9.216-9.216v-61.44c0-4.608-4.096-9.216-9.216-9.216z m114.688 17.408c-4.096-3.072-9.728-2.048-12.8 2.048l-35.84 49.664c-3.072 4.096-2.048 9.728 2.048 12.8 2.048 1.024 3.584 2.048 5.632 2.048 3.072 0 5.632-1.024 7.168-3.584l35.84-49.664c2.56-4.608 2.048-10.24-2.048-13.312z m58.88 71.168c-2.048-5.12-7.168-6.656-12.288-4.096l-55.296 25.6c-5.12 2.048-6.656 7.168-4.096 12.288 2.048 3.584 5.12 5.632 8.704 5.632 1.024 0 2.56 0 3.584-0.512l55.296-25.6c4.096-3.584 6.144-8.704 4.096-13.312z" fill="#D3DBDE" p-id="2634"></path></svg></center>
<center><h2>暂无数据</h2></center>
</article>
</div>
<div class="finish_content2 ui three column doubling stackable masonry grid"></div>
<!--分页链接-->
<br>
<div class="pagelist" id="page2">
</div>
</div>
<?php endif; ?>
<?php if(getMovieTag()[2]):?>
<div class="ui tab" data-tab="third">
<div id="loading3" class="ui icon message" style="display:none">
<i class="video loading icon"></i>
<div class="content">
<div class="header">
正在获取中.....
</div>
<p>请稍等一下哦~马上就出来了</p>
</div>
</div>
<div id="error3" style="display:none">
<article class="post">
<center><svg t="1617683554811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2629" width="200" height="200"><path d="M817.152 346.112c0-12.8-10.752-23.552-23.552-23.552h-28.672v281.6l-181.76 182.272H361.472v15.36c0 12.8 10.752 23.552 23.552 23.552l254.976-2.56 180.224-184.32-3.072-292.352z" fill="#E3EAED" p-id="2630"></path><path d="M332.8 705.536H258.56c-18.432 0-32.768-14.336-32.768-32.768V223.232c0-18.432 14.336-32.768 32.768-32.768H604.16c4.608 0 9.216 4.096 9.216 9.216 0 4.608-4.096 9.216-9.216 9.216H258.56c-7.68 0-14.336 6.656-14.336 14.336v449.024c0 7.68 6.656 14.336 14.336 14.336H332.8M686.08 299.52v-51.2c0-4.608 4.096-9.216 9.216-9.216 4.608 0 9.216 4.096 9.216 9.216v51.2" fill="#D3DBDE" p-id="2631"></path><path d="M608.768 797.184H350.208c-18.432 0-32.768-14.336-32.768-32.768V315.392c0-18.432 14.336-32.768 32.768-32.768h413.184c18.432 0 32.768 14.336 32.768 32.768v294.912l-187.392 186.88z m-258.56-496.64c-7.68 0-14.336 6.656-14.336 14.336v449.024c0 7.68 6.656 14.336 14.336 14.336h251.392l176.128-176.128v-286.72c0-7.68-6.656-14.336-14.336-14.336H350.208z" fill="#D3DBDE" p-id="2632"></path><path d="M601.088 778.752l177.152-176.128V322.56H394.752c-12.8 0-23.552 11.264-23.552 24.576v431.616h229.888z" fill="#F2F5F7" p-id="2633"></path><path d="M613.888 788.992h-18.432v-110.08c0-44.032 36.352-80.384 80.384-80.384h103.936v17.92H675.84c-34.304 0-62.464 27.648-62.464 62.464l0.512 110.08z m45.056-350.72H453.12c-6.656 0-12.288-5.632-12.288-12.288 0-6.656 5.632-12.288 12.288-12.288h205.824c6.656 0 12.288 5.632 12.288 12.288 0 7.168-5.632 12.288-12.288 12.288z m0-11.776v6.144-6.144z m1.536 71.168H453.12c-6.656 0-12.288-5.632-12.288-11.776 0-6.656 5.632-11.776 12.288-11.776H660.48c6.656 0 12.288 5.632 12.288 11.776-0.512 6.656-5.632 11.776-12.288 11.776z m0-11.776v6.144-6.144z m0 71.68H453.12c-6.656 0-12.288-5.632-12.288-11.776 0-6.656 5.632-11.776 12.288-11.776H660.48c6.656 0 12.288 5.632 12.288 11.776-0.512 6.656-5.632 11.776-12.288 11.776z m0-11.776v6.144-6.144z m-10.752-451.072c-5.12 0-9.216 4.096-9.216 9.216v61.44c0 5.12 4.096 9.216 9.216 9.216 4.608 0 9.216-4.096 9.216-9.216v-61.44c0-4.608-4.096-9.216-9.216-9.216z m114.688 17.408c-4.096-3.072-9.728-2.048-12.8 2.048l-35.84 49.664c-3.072 4.096-2.048 9.728 2.048 12.8 2.048 1.024 3.584 2.048 5.632 2.048 3.072 0 5.632-1.024 7.168-3.584l35.84-49.664c2.56-4.608 2.048-10.24-2.048-13.312z m58.88 71.168c-2.048-5.12-7.168-6.656-12.288-4.096l-55.296 25.6c-5.12 2.048-6.656 7.168-4.096 12.288 2.048 3.584 5.12 5.632 8.704 5.632 1.024 0 2.56 0 3.584-0.512l55.296-25.6c4.096-3.584 6.144-8.704 4.096-13.312z" fill="#D3DBDE" p-id="2634"></path></svg></center>
<center><h2>暂无数据</h2></center>
</article>
</div>
<div class="finish_content3 ui three column doubling stackable masonry grid"></div>
<!--分页链接-->
<br>
<div class="pagelist" id="page3">
</div>
</div>
<?php endif; ?>
</div></div>
<?php if(Bsoptions('Diy') == true): ?></div><?php endif; ?>
<script>
$(document).ready(function(){
$("#loading").show();
var page = 1;
var n = 0;
var max = 1;
getData();
function getData() {
$.ajax({
type: "GET",
async:true,
url: "<?php getDoubanFile(); ?>",
data: {
"type": '1',
"page": page,
"dbtype":'movie'
},
dateType: "json",
success: function(json) {
json = JSON.parse(json);
n = json.total;
max = json.max;
if(n == '0' || json.list[0].url == ''){
toastr.warning('啊哦,暂未获取到数据~~请稍后再试');
$("#loading").hide();
$("#page1").hide();
$("#error1").fadeIn();
}
else{
$("#page1").show();
content(json.list,json.rating_status);
}
},
complete: function() {
pageList();
<?php if(Bsoptions('Lazyload') == true) :?>
lazyLoad();
<?php endif; ?>
$('.ui.dimmer').click();
$("#commonLoad").fadeOut();
},
error: function() {
toastr.warning("数据获取错误,请稍后再试~~");
$("#loading").hide();
$("#page1").hide();
$("#error1").fadeIn();
}
});
};
function pageList() {
page = Math.min(page, max);
page = Math.max(page, 1);
var html = "<center><div class=\"ui circular labels\"><a class=\"ui label\" data-page="+ page +">共" + n + "条</a><a class=\"ui label\" data-page="+ page +">第" + page + "/" + max + "页</a>";
html += '<a class=\"ui label\" href="#" data-page="1">首页</a>';
html += (page > 1) ? '<a class=\"ui label\" href="#" data-page="' + (page - 1) + '">上一页</a>' : '<a class=\"ui label\" href="#" data-page="1">上一页</a>';
html += (page < max) ? '<a class=\"ui label\" href="#" data-page="' + (page + 1) + '">下一页</a>' : '<a class=\"ui label\" href="#" data-page="' + max + '">下一页</a>';
html += '<a class=\"ui label\" href="#" data-page="' + max + '">尾页</a><div class=\"ui mini input\"><input id=\"dipage\" type=\"number\" placeholder=\"输入跳转的页码\"></div><a id=\"gopage\" class=\"ui label\" href="#">跳转到指定页</a></div></center>';
var $html = $(html);
$html.find("a").click(function() {
if($(this).attr("id")!=='gopage'){
page = $(this).attr("data-page");
}
else{
var dipage = document.getElementById("dipage").value;
switch(dipage){
case dipage < 1 :
page = 1;
break;
case dipage > max:
page = max;
break;
default:
page = dipage;
};
};
$("#commonLoad").fadeIn();
getData();
});
$("#page1").html($html);
};
function content(list,rating) {
var str = " ";
for(var i in list) {
if(rating == '1'){
style = 'display:none';
}
else{
style = 'display:block';
};
str += '<div class="column"><div class="ui fluid card" style="word-break:break-all;"><div class="blurring dimmable image"><div class="ui dimmer"><div class="content"><div class="center"><a class="ui inverted button" href="' + list[i]['url'] + '"<?php if(Bsoptions('Link_blank') == true):?> target="_blank"<?php endif; ?>>我也要看</a></div></div></div><img id="imga" <?php echo lazyload('auto');?>src="'+ list[i]['cover'].replace('http://','//') +'" referrerPolicy="no-referrer"></div><div class="content" style="text-align:center;"><a class="header" href="' + list[i]['url'] + '"<?php if(Bsoptions('Link_blank') == true):?> target="_blank"<?php endif; ?>>《' + list[i]['title'] + '》</a><div class="meta"><a>' + list[i]['summary'] + '</a></div><div class="ui star rating" data-rating="' + list[i]['rating'] + '" data-max-rating="5" style="pointer-events: none;' + style + '"></div></div></div></div>'
}
$('.finish_content1').html(str);
$("#loading").hide();
}
});
$("#second").one('click',function(){
$("#loading2").show();
var page = 1;
var n = 0;
var max = 1;
getData();
function getData() {
$.ajax({
type: "GET",
async:true,
url: "<?php getDoubanFile(); ?>",
data: {
"type": '2',
"page": page,
"dbtype":'movie'
},
dateType: "json",
success: function(json) {
json = JSON.parse(json);
n = json.total;
max = json.max;
if(n == '0' || json.list[0].url == ''){
toastr.warning('啊哦,暂未获取到数据~~请稍后再试');
$("#loading2").hide();
$("#page2").hide();
$("#error2").fadeIn();
}
else{
$("#page2").show();
content(json.list,json.rating_status);
}
},
complete: function() {
pageList();
<?php if(Bsoptions('Lazyload') == true) :?>
lazyLoad();
<?php endif; ?>
$('.ui.dimmer').click();
$("#commonLoad").fadeOut();
},
error: function() {
toastr.warning("数据获取错误,请稍后再试~~");
$("#loading2").hide();
$("#page2").hide();
$("#error2").fadeIn();
}
});
};
function pageList() {
page = Math.min(page, max);
page = Math.max(page, 1);
var html = "<center><div class=\"ui circular labels\"><a class=\"ui label\" data-page="+ page +">共" + n + "条</a><a class=\"ui label\" data-page="+ page +">第" + page + "/" + max + "页</a>";
html += '<a class=\"ui label\" href="#" data-page="1">首页</a>';
html += (page > 1) ? '<a class=\"ui label\" href="#" data-page="' + (page - 1) + '">上一页</a>' : '<a class=\"ui label\" href="#" data-page="1">上一页</a>';
html += (page < max) ? '<a class=\"ui label\" href="#" data-page="' + (page + 1) + '">下一页</a>' : '<a class=\"ui label\" href="#" data-page="' + max + '">下一页</a>';
html += '<a class=\"ui label\" href="#" data-page="' + max + '">尾页</a><div class=\"ui mini input\"><input id=\"dipage\" type=\"number\" placeholder=\"输入跳转的页码\"></div><a id=\"gopage\" class=\"ui label\" href="#">跳转到指定页</a></div></center>';
var $html = $(html);
$html.find("a").click(function() {
if($(this).attr("id")!=='gopage'){
page = $(this).attr("data-page");
}
else{
var dipage = document.getElementById("dipage").value;
switch(dipage){
case dipage < 1 :
page = 1;
break;
case dipage > max:
page = max;
break;
default:
page = dipage;
};
};
$("#commonLoad").fadeIn();
getData();
});
$("#page2").html($html);
};
function content(list,rating) {
var str = " ";
for(var i in list) {
if(rating == '1'){
style = 'display:none';
}
else{
style = 'display:block';
};
str += '<div class="column"><div class="ui fluid card" style="word-break:break-all;"><div class="blurring dimmable image"><div class="ui dimmer"><div class="content"><div class="center"><a class="ui inverted button" href="' + list[i]['url'] + '"<?php if(Bsoptions('Link_blank') == true):?> target="_blank"<?php endif; ?>>我也要看</a></div></div></div><img id="imga" <?php echo lazyload('auto');?>src="'+ list[i]['cover'].replace('http://','//') +'" referrerPolicy="no-referrer"></div><div class="content" style="text-align:center;"><a class="header" href="' + list[i]['url'] + '"<?php if(Bsoptions('Link_blank') == true):?> target="_blank"<?php endif; ?>>《' + list[i]['title'] + '》</a><div class="meta"><a>' + list[i]['summary'] + '</a></div><div class="ui star rating" data-rating="' + list[i]['rating'] + '" data-max-rating="5" style="pointer-events: none;' + style + '"></div></div></div></div>'
}
$('.finish_content2').html(str);
$("#loading2").hide();
}
});
$("#third").one('click',function(){
$("#loading3").show();
var page = 1;
var n = 0;
var max = 1;
getData();
function getData() {
$.ajax({
type: "GET",
async:true,
url: "<?php getDoubanFile(); ?>",
data: {
"type": '3',
"page": page,
"dbtype":'movie'
},
dateType: "json",
success: function(json) {
json = JSON.parse(json);
n = json.total;
max = json.max;
if(n == '0' || json.list[0].url == ''){
toastr.warning('啊哦,暂未获取到数据~~请稍后再试');
$("#loading3").hide();
$("#page3").hide();
$("#error3").fadeIn();
}
else{
$("#page3").show();
content(json.list,json.rating_status);
}
},
complete: function() {
pageList();
<?php if(Bsoptions('Lazyload') == true) :?>
lazyLoad();
<?php endif; ?>
$('.ui.dimmer').click();
$("#commonLoad").fadeOut();
},
error: function() {
toastr.warning("数据获取错误,请稍后再试~~");
$("#loading3").hide();
$("#page3").hide();
$("#error3").fadeIn();
}
});
};
function pageList() {
page = Math.min(page, max);
page = Math.max(page, 1);
var html = "<center><div class=\"ui circular labels\"><a class=\"ui label\" data-page="+ page +">共" + n + "条</a><a class=\"ui label\" data-page="+ page +">第" + page + "/" + max + "页</a>";
html += '<a class=\"ui label\" href="#" data-page="1">首页</a>';
html += (page > 1) ? '<a class=\"ui label\" href="#" data-page="' + (page - 1) + '">上一页</a>' : '<a class=\"ui label\" href="#" data-page="1">上一页</a>';
html += (page < max) ? '<a class=\"ui label\" href="#" data-page="' + (page + 1) + '">下一页</a>' : '<a class=\"ui label\" href="#" data-page="' + max + '">下一页</a>';
html += '<a class=\"ui label\" href="#" data-page="' + max + '">尾页</a><div class=\"ui mini input\"><input id=\"dipage\" type=\"number\" placeholder=\"输入跳转的页码\"></div><a id=\"gopage\" class=\"ui label\" href="#">跳转到指定页</a></div></center>';
var $html = $(html);
$html.find("a").click(function() {
if($(this).attr("id")!=='gopage'){
page = $(this).attr("data-page");
}
else{
var dipage = document.getElementById("dipage").value;
switch(dipage){
case dipage < 1 :
page = 1;
break;
case dipage > max:
page = max;
break;
default:
page = dipage;
};
};
$("#commonLoad").fadeIn();
getData();
});
$("#page3").html($html);
};
function content(list,rating) {
var str = " ";
for(var i in list) {
if(rating == '1'){
style = 'display:none';
}
else{
style = 'display:block';
};
str += '<div class="column"><div class="ui fluid card" style="word-break:break-all;"><div class="blurring dimmable image"><div class="ui dimmer"><div class="content"><div class="center"><a class="ui inverted button" href="' + list[i]['url'] + '"<?php if(Bsoptions('Link_blank') == true):?> target="_blank"<?php endif; ?>>我也要看</a></div></div></div><img id="imga" <?php echo lazyload('auto');?>src="'+ list[i]['cover'].replace('http://','//') +'" referrerPolicy="no-referrer"></div><div class="content" style="text-align:center;"><a class="header" href="' + list[i]['url'] + '"<?php if(Bsoptions('Link_blank') == true):?> target="_blank"<?php endif; ?>>《' + list[i]['title'] + '》</a><div class="meta"><a>' + list[i]['summary'] + '</a></div><div class="ui star rating" data-rating="' + list[i]['rating'] + '" data-max-rating="5" style="pointer-events: none;' + style + '"></div></div></div></div>'
}
$('.finish_content3').html(str);
$("#loading3").hide();
}
});
</script>
<?php $this->need('compoment/sidebar.php'); ?>
<?php $this->need('compoment/foot.php'); ?>