jufubao-movie 1.0.39-beta1 → 1.0.39-beta11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbMovieLineFilm/JfbMovieLineFilm.vue +11 -3
- package/src/components/JfbMovieLineLineSeat/Attr.js +11 -0
- package/src/components/JfbMovieLineLineSeat/JfbMovieLineLineSeat.vue +74 -11
- package/src/components/JfbMovieLineLineSeat/Mock.js +1 -0
- package/src/components/JfbMovieLineLineSeat/XdOnlineSeat.vue +48 -27
- package/src/components/JfbMovieLineLineSeat/XdOnlineSeatMove.vue +13 -9
- package/src/components/JfbMovieLineSchedule/JfbMovieLineSchedule.vue +1 -1
- package/src/components/JfbMovieTfkFilmList/Attr.js +5 -238
- package/src/components/JfbMovieTfkFilmList/ContentItem.vue +129 -76
- package/src/components/JfbMovieTfkFilmList/JfbMovieTfkFilmList.vue +284 -91
- package/src/components/JfbMovieTfkFilmList/PosterAttr.js +257 -0
- package/src/components/JfbMovieTfkFilmList/XdPoster.vue +160 -0
- package/src/components/JfbMovieTfkFilmList/XdQueryFilter.vue +1 -0
- package/src/components/JfbMovieTfkFilmRecommend/Attr.js +31 -3
- package/src/components/JfbMovieTfkFilmRecommend/JfbMovieTfkFilmRecommend.vue +30 -6
- package/src/lib/VirtualList.js +269 -0
- package/src/mixins/posterMixins.js +0 -59
|
@@ -41,51 +41,27 @@
|
|
|
41
41
|
>{{item.label}}</view>
|
|
42
42
|
</view>
|
|
43
43
|
<!--poster-->
|
|
44
|
-
<
|
|
45
|
-
class="list-poster"
|
|
44
|
+
<xd-poster
|
|
46
45
|
v-if="posterList !== null && posterList.length > 0"
|
|
47
|
-
:style="
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<view class="list-poster-more" v-else>
|
|
57
|
-
<xd-swiper-dot
|
|
58
|
-
:style="{width: posterSize.width + 'rpx', height: posterSize.height + 'rpx' }"
|
|
59
|
-
:current="current"
|
|
60
|
-
:info="posterList"
|
|
61
|
-
field="content_name"
|
|
62
|
-
:mode="mode"
|
|
63
|
-
:dots-styles="dotStyleData"
|
|
64
|
-
>
|
|
65
|
-
<swiper
|
|
66
|
-
class="swiper xd-swiper-content"
|
|
67
|
-
:style="{width: posterSize.width + 'rpx', height: posterSize.height + 'rpx' }"
|
|
68
|
-
:indicator-dots="false"
|
|
69
|
-
:autoplay="carouselTime >0"
|
|
70
|
-
:interval="carouselTime"
|
|
71
|
-
:duration="500"
|
|
72
|
-
:current="current"
|
|
73
|
-
circular
|
|
74
|
-
@animationfinish="handleAnimationfinish"
|
|
75
|
-
>
|
|
76
|
-
<swiper-item v-for="(item,index) in posterList" :key="index" @click.stop="handlePosterClick(item,index)">
|
|
77
|
-
<image :style="{width: posterSize.width + 'rpx', height: posterSize.height + 'rpx' }" :src="item['image_url']" mode="aspectFill"></image>
|
|
78
|
-
</swiper-item>
|
|
79
|
-
</swiper>
|
|
80
|
-
</xd-swiper-dot>
|
|
81
|
-
</view>
|
|
82
|
-
</view>
|
|
46
|
+
:dot-style-data="dotStyleData"
|
|
47
|
+
:mode="mode"
|
|
48
|
+
:poster-list="posterList"
|
|
49
|
+
:style-obj="{
|
|
50
|
+
outSpacing: this.outSpacing,
|
|
51
|
+
posterSize: posterSize,
|
|
52
|
+
carouselTime: carouselTime,
|
|
53
|
+
}"
|
|
54
|
+
></xd-poster>
|
|
83
55
|
<!--poster-->
|
|
56
|
+
<view v-if="type === 'hot' || type === 'rightnow'" id="content-ref" class="content-ref"></view>
|
|
84
57
|
<!--film hot|rightnow-->
|
|
85
58
|
<view
|
|
86
|
-
v-if="type === 'hot' || type === 'rightnow'"
|
|
87
59
|
class="list-cont"
|
|
88
|
-
|
|
60
|
+
v-if="type === 'hot' || type === 'rightnow'"
|
|
61
|
+
:style="{
|
|
62
|
+
marginTop: outSpacing + 'rpx',
|
|
63
|
+
minHeight: layoutInfo['bodyMinHeightPx'] + 'px'
|
|
64
|
+
}"
|
|
89
65
|
>
|
|
90
66
|
<view class="skeleton-wrap" v-if="dataList === null">
|
|
91
67
|
<view
|
|
@@ -93,12 +69,12 @@
|
|
|
93
69
|
v-for="item in 6"
|
|
94
70
|
:key="item"
|
|
95
71
|
:style="{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
72
|
+
marginBottom:outSpacing + 'rpx',
|
|
73
|
+
padding:contMarginComp,
|
|
74
|
+
borderRadius:contRradius+ 'rpx',
|
|
75
|
+
border:contBorder,
|
|
76
|
+
boxShadow:contShadow,
|
|
77
|
+
}"
|
|
102
78
|
>
|
|
103
79
|
<view class="skeleton-wrap-item-image skeleton-item" :style="{marginRight:outSpacing + 'rpx'}"></view>
|
|
104
80
|
<view class="skeleton-wrap-item-title">
|
|
@@ -121,13 +97,15 @@
|
|
|
121
97
|
:style="{
|
|
122
98
|
marginBottom:outSpacing + 'rpx',
|
|
123
99
|
padding:contMarginComp,
|
|
124
|
-
borderRadius:contRradius+ 'rpx',
|
|
100
|
+
borderRadius:(contRradius+ 'rpx'),
|
|
125
101
|
border:contBorder,
|
|
126
102
|
boxShadow:contShadow,
|
|
127
103
|
backgroundColor:contBgColor,
|
|
104
|
+
height: film['is_content_height'] + 'rpx'
|
|
128
105
|
}"
|
|
129
106
|
>
|
|
130
107
|
<content-item
|
|
108
|
+
v-if="film['is_content_show']"
|
|
131
109
|
style="width: 100%;height: 100%"
|
|
132
110
|
:item="film"
|
|
133
111
|
:out-spacing="outSpacing"
|
|
@@ -139,10 +117,12 @@
|
|
|
139
117
|
></content-item>
|
|
140
118
|
</view>
|
|
141
119
|
</template>
|
|
120
|
+
<view class="hasNoData" v-if="dataList && dataList.length > 0 && pageToken === ''">已经到底没有更多数据了</view>
|
|
121
|
+
<xd-no-data v-if="dataList && dataList.length === 0" height="50vh" icon-type="film">暂无影片数据</xd-no-data>
|
|
142
122
|
</view>
|
|
143
123
|
<!--film hot|rightnow-->
|
|
144
124
|
<!--cinema-->
|
|
145
|
-
<view v-if="type === 'list'" class="list-filter" :style="{marginTop:outSpacing + 'rpx'}">
|
|
125
|
+
<view v-if="type === 'list'" id="list-filter" class="list-filter" :style="{marginTop:outSpacing + 'rpx'}">
|
|
146
126
|
<view class="list-filter-block" :class="{hasFitler:!!curQueryTab}">
|
|
147
127
|
<view @click="handleFilterTab('filter')">
|
|
148
128
|
<xd-font-icon icon="iconrepository-xialaxuanxiangdown" size="24" color="#999"></xd-font-icon>
|
|
@@ -169,10 +149,16 @@
|
|
|
169
149
|
></xd-query-filter>
|
|
170
150
|
</view>
|
|
171
151
|
</view>
|
|
152
|
+
<view id="content-list-ref" v-if="type === 'list'" class="content-ref"></view>
|
|
172
153
|
<view
|
|
173
154
|
v-if="type === 'list'"
|
|
174
155
|
class="list-cont"
|
|
175
|
-
:style="{
|
|
156
|
+
:style="{
|
|
157
|
+
marginTop:outSpacing + 'rpx',
|
|
158
|
+
paddingTop:paddingTop,
|
|
159
|
+
paddingBottom:paddingBottom,
|
|
160
|
+
minHeight: layoutInfo['bodyMinHeightPx'] + 'px'
|
|
161
|
+
}"
|
|
176
162
|
>
|
|
177
163
|
<view class="skeleton-wrap" v-if="dataList === null">
|
|
178
164
|
<view
|
|
@@ -185,6 +171,7 @@
|
|
|
185
171
|
borderRadius:contRradius+ 'rpx',
|
|
186
172
|
border:contBorder,
|
|
187
173
|
boxShadow:contShadow,
|
|
174
|
+
|
|
188
175
|
}"
|
|
189
176
|
>
|
|
190
177
|
<view class="title skeleton-item"></view>
|
|
@@ -207,10 +194,11 @@
|
|
|
207
194
|
border:contBorder,
|
|
208
195
|
boxShadow:contShadow,
|
|
209
196
|
backgroundColor:contBgColor,
|
|
210
|
-
height: '
|
|
197
|
+
height: film['is_content_height'] + 'rpx'
|
|
211
198
|
}"
|
|
212
199
|
>
|
|
213
200
|
<content-cinema
|
|
201
|
+
v-if="film['is_content_show']"
|
|
214
202
|
style="width: 100%;height: 100%"
|
|
215
203
|
:item="film"
|
|
216
204
|
:out-spacing="outSpacing"
|
|
@@ -228,10 +216,41 @@
|
|
|
228
216
|
@click="handleClose"
|
|
229
217
|
:style="{left:- outSpacing + 'rpx', right: - outSpacing + 'rpx', }"
|
|
230
218
|
></view>
|
|
219
|
+
<view class="hasNoData" v-if="dataList && dataList.length > 0 && pageToken === ''">已经到底没有更多数据了</view>
|
|
220
|
+
<xd-no-data v-if="dataList && dataList.length === 0" height="50vh" icon-type="cinema">暂无影院数据</xd-no-data>
|
|
231
221
|
</template>
|
|
232
222
|
</view>
|
|
223
|
+
<view
|
|
224
|
+
id="preRendering"
|
|
225
|
+
class="preRendering"
|
|
226
|
+
v-if="preRendering.length >0"
|
|
227
|
+
:style="{padding:outSpacing + 'rpx'}"
|
|
228
|
+
>
|
|
229
|
+
<view
|
|
230
|
+
class="list-cont-item"
|
|
231
|
+
v-for="(film,index) in preRendering"
|
|
232
|
+
:key="film.cinema_id"
|
|
233
|
+
:data-index="index"
|
|
234
|
+
:style="{
|
|
235
|
+
marginBottom:outSpacing + 'rpx',
|
|
236
|
+
padding:contMarginComp,
|
|
237
|
+
borderRadius:contRradius+ 'rpx',
|
|
238
|
+
border:contBorder,
|
|
239
|
+
boxShadow:contShadow,
|
|
240
|
+
backgroundColor:contBgColor,
|
|
241
|
+
}"
|
|
242
|
+
>
|
|
243
|
+
<content-cinema
|
|
244
|
+
style="width: 100%;height: 100%"
|
|
245
|
+
:item="film"
|
|
246
|
+
:out-spacing="outSpacing"
|
|
247
|
+
:color="{SEAT:mainColor,CODE:subMainColor,SELL:successColor}"
|
|
248
|
+
:type="type"
|
|
249
|
+
:border-radius="imgRradius"
|
|
250
|
+
></content-cinema>
|
|
251
|
+
</view>
|
|
252
|
+
</view>
|
|
233
253
|
<!--cinema-->
|
|
234
|
-
<view class="hasNoData" v-if="dataList && dataList.length > 0 && pageToken === ''">已经到底没有更多数据了</view>
|
|
235
254
|
</view>
|
|
236
255
|
<template v-else>
|
|
237
256
|
<view
|
|
@@ -246,6 +265,7 @@
|
|
|
246
265
|
|
|
247
266
|
<script>
|
|
248
267
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
268
|
+
import XdNoData from "@/components/XdNoData/XdNoData.vue";
|
|
249
269
|
import XdSwiperDot from "./XdSwiperDot.vue";
|
|
250
270
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
251
271
|
import JfbMovieTfkFilmListMixin from "./JfbMovieTfkFilmListMixin";
|
|
@@ -260,34 +280,41 @@
|
|
|
260
280
|
import XdQueryFilter from "./XdQueryFilter.vue";
|
|
261
281
|
import {mapState} from "vuex";
|
|
262
282
|
import Color from "color";
|
|
283
|
+
import VirtualList from "@/lib/VirtualList";
|
|
284
|
+
import XdPoster from "./XdPoster.vue";
|
|
263
285
|
|
|
264
286
|
export default {
|
|
265
287
|
name: "JfbMovieTfkFilmList",
|
|
266
288
|
components: {
|
|
289
|
+
XdPoster,
|
|
267
290
|
XdFontIcon,
|
|
268
291
|
ContentItem,
|
|
269
292
|
XdSwiperDot,
|
|
270
293
|
ContentCinema,
|
|
271
294
|
XdQuerySort,
|
|
272
|
-
XdQueryFilter
|
|
295
|
+
XdQueryFilter,
|
|
296
|
+
XdNoData
|
|
273
297
|
},
|
|
274
298
|
mixins: [
|
|
275
299
|
componentsMixins, extsMixins, JfbMovieTfkFilmListMixin,posterMixins
|
|
276
300
|
],
|
|
277
301
|
data() {
|
|
278
302
|
return {
|
|
303
|
+
/**@type {VirtualList}**/
|
|
304
|
+
virtualList:null,
|
|
279
305
|
options: {},
|
|
280
306
|
//hideMask: true,
|
|
281
307
|
type:'', //hot rightnow
|
|
308
|
+
addressType: '',
|
|
282
309
|
typeList:{hot:{label: '热映影片', value: 'hot'},list:{label: '影院列表', value: 'list'}, rightnow:{label: '即将上映', value: 'rightnow'}},
|
|
283
310
|
showTypeListData:null,
|
|
284
311
|
backgroundColor:'',
|
|
285
312
|
isPreview: false,
|
|
286
313
|
pageToken:'1',
|
|
287
|
-
pageSize:
|
|
314
|
+
pageSize: 10,
|
|
288
315
|
total: null,
|
|
289
316
|
isFirstLoadingData: false,
|
|
290
|
-
|
|
317
|
+
|
|
291
318
|
cinemaOrgDataList:null,
|
|
292
319
|
cinemaAreaList:null,
|
|
293
320
|
sort_consume_mode:'',//获取影院数据排序
|
|
@@ -308,10 +335,9 @@
|
|
|
308
335
|
//广告
|
|
309
336
|
posterList:null,
|
|
310
337
|
poster:{},
|
|
311
|
-
posterNum:1,
|
|
312
|
-
mode:'round'
|
|
313
|
-
|
|
314
|
-
carouselTime: 5000,//轮播图轮播周期
|
|
338
|
+
posterNum:1, //使用张数
|
|
339
|
+
mode:'round',//直接写死
|
|
340
|
+
carouselTime: 0,//轮播图轮播周期
|
|
315
341
|
|
|
316
342
|
//基础配置
|
|
317
343
|
outSpacing:'20',
|
|
@@ -348,7 +374,18 @@
|
|
|
348
374
|
buyPath:'',
|
|
349
375
|
fimeDetailPath:'',
|
|
350
376
|
|
|
377
|
+
//页面列表展示数据
|
|
378
|
+
dataList:null,
|
|
379
|
+
paddingTop: 0,
|
|
380
|
+
paddingBottom: 0,
|
|
381
|
+
virtualHeight:0,
|
|
382
|
+
virtualTop: 0,
|
|
351
383
|
|
|
384
|
+
|
|
385
|
+
//计算高度预加载列表
|
|
386
|
+
preRendering:[],
|
|
387
|
+
listFilterTop:null,
|
|
388
|
+
listFilterTopTimer:0,
|
|
352
389
|
}
|
|
353
390
|
},
|
|
354
391
|
computed:{
|
|
@@ -401,6 +438,7 @@
|
|
|
401
438
|
}
|
|
402
439
|
return style[this.mode]
|
|
403
440
|
},
|
|
441
|
+
|
|
404
442
|
contMarginComp(){
|
|
405
443
|
let str = `${this.checkValue(this.contMargin.top, 20)}rpx`;
|
|
406
444
|
str = `${str} ${this.checkValue(this.contMargin.right, 20)}rpx`;
|
|
@@ -412,9 +450,9 @@
|
|
|
412
450
|
posterSize(){
|
|
413
451
|
if(this.poster && this.poster.size) {
|
|
414
452
|
let {width, height} = this.poster.size
|
|
415
|
-
let size = {}
|
|
416
|
-
if(width) size['width'] = width || 710;
|
|
417
|
-
if(height) size['height'] = height || 280;
|
|
453
|
+
let size = { width: 710, height: 280 }
|
|
454
|
+
if(width) size['width'] = Number(width || 710);
|
|
455
|
+
if(height) size['height'] = Number(height || 280);
|
|
418
456
|
return size;
|
|
419
457
|
}
|
|
420
458
|
return {
|
|
@@ -422,15 +460,12 @@
|
|
|
422
460
|
height: 280,
|
|
423
461
|
}
|
|
424
462
|
},
|
|
425
|
-
|
|
426
|
-
|
|
427
463
|
},
|
|
428
464
|
watch: {
|
|
429
465
|
container(value, oldValue) {
|
|
430
466
|
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
431
467
|
if (this.$configProject['isPreview']) this.init(value)
|
|
432
468
|
},
|
|
433
|
-
|
|
434
469
|
posterNum(){
|
|
435
470
|
if (this.$configProject['isPreview']){
|
|
436
471
|
this.onJfbLoad();
|
|
@@ -438,6 +473,7 @@
|
|
|
438
473
|
},
|
|
439
474
|
stateCity(n, o){
|
|
440
475
|
if(n && JSON.stringify(n) !== JSON.stringify(o)){
|
|
476
|
+
this.virtualList.onChangeTab();
|
|
441
477
|
this.clearDataVar()
|
|
442
478
|
this.getList();
|
|
443
479
|
}
|
|
@@ -447,13 +483,109 @@
|
|
|
447
483
|
this.clearDataVar();
|
|
448
484
|
this.getList();
|
|
449
485
|
},
|
|
486
|
+
|
|
487
|
+
preRendering(val){
|
|
488
|
+
this.$nextTick(()=>{
|
|
489
|
+
if(val.length > 0) {
|
|
490
|
+
this.handlePreRendering(val);
|
|
491
|
+
}
|
|
492
|
+
})
|
|
493
|
+
}
|
|
450
494
|
},
|
|
451
495
|
created() {
|
|
496
|
+
let tab_id = '';
|
|
497
|
+
// #ifdef H5
|
|
498
|
+
tab_id = this.$xdUniHelper.getParmater('tab_id') ? this.$xdUniHelper.getParmater('tab_id'):'';
|
|
499
|
+
// #endif
|
|
500
|
+
// #ifdef MP-WEIXIN
|
|
501
|
+
let pages = this.$xdUniHelper.parseURL(this.$root.$scope.$page.fullPath);
|
|
502
|
+
tab_id = (pages.params && pages.params['tab_id']) ? pages.params['tab_id'] :'';
|
|
503
|
+
// #endif
|
|
504
|
+
if(['hot','list', 'rightnow'].includes(tab_id)) {
|
|
505
|
+
this.addressType = tab_id
|
|
506
|
+
}
|
|
507
|
+
|
|
452
508
|
this.isPreview = this.$configProject.isPreview;
|
|
453
509
|
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
454
510
|
this.init(this.container);
|
|
511
|
+
this.virtualList = new VirtualList(this, this.type ==='list'?'#content-list-ref':'#content-ref', {
|
|
512
|
+
fixedHeight: 240 ,
|
|
513
|
+
marginTopAndBottom: Number(this.outSpacing),
|
|
514
|
+
paddingTopAndBottom: this.checkValue(this.contMargin.top, 20) + this.checkValue(this.contMargin.bottom, 20),
|
|
515
|
+
type:this.type ==='list'?'auto':'fixed',
|
|
516
|
+
//获取节点数据
|
|
517
|
+
getDom:(id)=>{
|
|
518
|
+
return new Promise((resolve,reject)=>{
|
|
519
|
+
uni.createSelectorQuery().in(this).select(id)
|
|
520
|
+
.boundingClientRect((data)=>{
|
|
521
|
+
if(data && data.top !== undefined) resolve(data);
|
|
522
|
+
else reject(null)
|
|
523
|
+
}).exec()
|
|
524
|
+
});
|
|
525
|
+
},
|
|
526
|
+
//获取当前this
|
|
527
|
+
getParentThis(){
|
|
528
|
+
return this
|
|
529
|
+
},
|
|
530
|
+
callback: ({data}) =>{
|
|
531
|
+
this.dataList = data;
|
|
532
|
+
},
|
|
533
|
+
});
|
|
455
534
|
},
|
|
456
535
|
methods: {
|
|
536
|
+
getListFilterEleTop(){
|
|
537
|
+
if(this.listFilterTop !== null) return;
|
|
538
|
+
uni.pageScrollTo({
|
|
539
|
+
scrollTop: 0,
|
|
540
|
+
duration: 1,
|
|
541
|
+
success:()=>{
|
|
542
|
+
const query = uni.createSelectorQuery().in(this);
|
|
543
|
+
query
|
|
544
|
+
.select('#list-filter')
|
|
545
|
+
.boundingClientRect((data) => {
|
|
546
|
+
if(data && data.top !==undefined){
|
|
547
|
+
let listFilterTop = data.top - this.layoutInfo.top * this.$rpxNum - this.outSpacing * this.$rpxNum;
|
|
548
|
+
if(listFilterTop !== this.listFilterTop) {
|
|
549
|
+
setTimeout(()=>{
|
|
550
|
+
this.getListFilterEleTop();
|
|
551
|
+
this.listFilterTopTimer++
|
|
552
|
+
},200)
|
|
553
|
+
}
|
|
554
|
+
if( this.listFilterTopTimer >= 5) this.listFilterTop = listFilterTop;
|
|
555
|
+
}
|
|
556
|
+
else{
|
|
557
|
+
setTimeout(()=>{
|
|
558
|
+
this.getListFilterEleTop();
|
|
559
|
+
},30)
|
|
560
|
+
}
|
|
561
|
+
})
|
|
562
|
+
.exec();
|
|
563
|
+
}
|
|
564
|
+
})
|
|
565
|
+
|
|
566
|
+
},
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* @description 非固定高度处理
|
|
570
|
+
* @param list
|
|
571
|
+
*/
|
|
572
|
+
handlePreRendering(list){
|
|
573
|
+
//这里返回的高度宽度包含填充值
|
|
574
|
+
const query = uni.createSelectorQuery().in(this);
|
|
575
|
+
query
|
|
576
|
+
.selectAll('#preRendering > .list-cont-item')
|
|
577
|
+
.boundingClientRect((data) => {
|
|
578
|
+
if(data && data.length > 0) {
|
|
579
|
+
let height = [];
|
|
580
|
+
data.map(item=>{
|
|
581
|
+
height[item.dataset.index] = item.height - this.$rpxNum * ( this.checkValue(this.contMargin.top, 20) + this.checkValue(this.contMargin.bottom, 20))
|
|
582
|
+
});
|
|
583
|
+
this.virtualList.pushVirtualData(list,height);
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
.exec();
|
|
587
|
+
},
|
|
588
|
+
|
|
457
589
|
clearDataVar(){
|
|
458
590
|
this.dataList = null;
|
|
459
591
|
this.pageToken = '1';
|
|
@@ -463,6 +595,7 @@
|
|
|
463
595
|
this.sortCode = 'default'
|
|
464
596
|
this.cinemaOrgDataList = null;
|
|
465
597
|
},
|
|
598
|
+
|
|
466
599
|
getSortList(){
|
|
467
600
|
jfbRootExec('getTFKSortList', {
|
|
468
601
|
vm: this,
|
|
@@ -527,10 +660,16 @@
|
|
|
527
660
|
//todo
|
|
528
661
|
},
|
|
529
662
|
handleFilterTab(tab){
|
|
530
|
-
|
|
531
|
-
this.
|
|
532
|
-
|
|
533
|
-
|
|
663
|
+
uni.pageScrollTo({
|
|
664
|
+
scrollTop: this.listFilterTop,
|
|
665
|
+
duration: 200,
|
|
666
|
+
success:()=>{
|
|
667
|
+
if(tab === this.curQueryTab ) {
|
|
668
|
+
this.curQueryTab = ''
|
|
669
|
+
}
|
|
670
|
+
else this.curQueryTab = tab
|
|
671
|
+
}
|
|
672
|
+
})
|
|
534
673
|
},
|
|
535
674
|
handleQuerySort(sortData){
|
|
536
675
|
this.sortCode = sortData.value;
|
|
@@ -538,6 +677,7 @@
|
|
|
538
677
|
this.pageToken = '1';
|
|
539
678
|
this.dataList = null;
|
|
540
679
|
this.cinemaOrgDataList = null;
|
|
680
|
+
this.virtualList.onChangeTab();
|
|
541
681
|
this.getList();
|
|
542
682
|
|
|
543
683
|
//等待排序规则
|
|
@@ -551,6 +691,7 @@
|
|
|
551
691
|
this.areaName = sortData.area_name;
|
|
552
692
|
this.pageToken = '1';
|
|
553
693
|
this.dataList = null;
|
|
694
|
+
this.virtualList.onChangeTab();
|
|
554
695
|
this.getList();
|
|
555
696
|
setTimeout(()=>{
|
|
556
697
|
this.curQueryTab = '';
|
|
@@ -562,10 +703,6 @@
|
|
|
562
703
|
},
|
|
563
704
|
//影院列表
|
|
564
705
|
|
|
565
|
-
handleAnimationfinish(e){
|
|
566
|
-
this.current = e.detail.current;
|
|
567
|
-
},
|
|
568
|
-
|
|
569
706
|
getCinemaOrgData(){
|
|
570
707
|
let fitlerData = this.$xdUniHelper.cloneDeep(this.cinemaOrgDataList||[])
|
|
571
708
|
|
|
@@ -591,12 +728,9 @@
|
|
|
591
728
|
}
|
|
592
729
|
//#endif
|
|
593
730
|
|
|
594
|
-
console.log(`fitlerData:`,fitlerData)
|
|
595
|
-
console.warn(`fitlerData.length=${fitlerData.length}`)
|
|
596
|
-
|
|
597
731
|
//过滤之后不够分页直接返回值
|
|
598
732
|
if(fitlerData.length <= this.pageSize) {
|
|
599
|
-
this.
|
|
733
|
+
this.preRendering = this.$xdUniHelper.cloneDeep(fitlerData);
|
|
600
734
|
this.pageToken = ''
|
|
601
735
|
return;
|
|
602
736
|
}
|
|
@@ -611,7 +745,7 @@
|
|
|
611
745
|
return;
|
|
612
746
|
}
|
|
613
747
|
|
|
614
|
-
this.
|
|
748
|
+
this.preRendering = this.$xdUniHelper.cloneDeep(list);
|
|
615
749
|
if(this.pageSize < list.length) this.pageToken = '';
|
|
616
750
|
else this.pageToken = (Number(this.pageToken)+1) + '';
|
|
617
751
|
},
|
|
@@ -619,6 +753,16 @@
|
|
|
619
753
|
handleTab(value){
|
|
620
754
|
if(value === this.type) return;
|
|
621
755
|
this.type = value;
|
|
756
|
+
if( this.type === 'hot' || this.type === 'rightnow' ) {
|
|
757
|
+
this.virtualList.onChangeTab(this,'#content-ref', 'fixed' );
|
|
758
|
+
}
|
|
759
|
+
if( this.type === 'list') {
|
|
760
|
+
this.virtualList.onChangeTab(this,'#content-list-ref', 'auto' );
|
|
761
|
+
this.$nextTick(()=>{
|
|
762
|
+
this.getListFilterEleTop()
|
|
763
|
+
})
|
|
764
|
+
}
|
|
765
|
+
|
|
622
766
|
this.dataList = null;
|
|
623
767
|
this.pageToken = '1';
|
|
624
768
|
this.getList();
|
|
@@ -659,8 +803,6 @@
|
|
|
659
803
|
}
|
|
660
804
|
}
|
|
661
805
|
|
|
662
|
-
|
|
663
|
-
|
|
664
806
|
jfbRootExec(fName, {
|
|
665
807
|
vm: this,
|
|
666
808
|
data:params
|
|
@@ -669,27 +811,44 @@
|
|
|
669
811
|
|
|
670
812
|
//影片列表处理
|
|
671
813
|
if(this.type === 'rightnow' || this.type==='hot'){
|
|
672
|
-
|
|
673
|
-
this.
|
|
814
|
+
//预览模式
|
|
815
|
+
if(this.isPreview){
|
|
816
|
+
this.dataList = (this.dataList||[]).concat(res['list']).map(item=>{
|
|
817
|
+
item.is_content_show = true;
|
|
818
|
+
return item
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
this.virtualList.pushVirtualData(res['list']);
|
|
823
|
+
this.pageToken = res.next_page_token;
|
|
824
|
+
}
|
|
674
825
|
return;
|
|
675
826
|
}
|
|
676
827
|
|
|
677
828
|
//影院列表处理
|
|
678
829
|
if(this.type === 'list') {
|
|
679
|
-
//res['list'].splice(0, 31);
|
|
680
830
|
this.cinemaOrgDataList = res['list'];
|
|
681
831
|
this.cinemaAreaList = [{area_code:'all', area_name:'全城'}].concat(res['area_list']);
|
|
682
832
|
|
|
833
|
+
//预览模式
|
|
834
|
+
if(this.isPreview) {
|
|
835
|
+
this.dataList = (this.dataList||[]).concat(res['list'].slice(0, 20)).map(item=>{
|
|
836
|
+
item.is_content_show = true;
|
|
837
|
+
return item
|
|
838
|
+
});
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
683
841
|
|
|
684
842
|
//小于数量页面显示记录
|
|
685
843
|
if(res['list'].length <= this.pageSize) {
|
|
686
|
-
this.
|
|
844
|
+
this.preRendering = this.$xdUniHelper.cloneDeep(res['list']);
|
|
687
845
|
this.pageToken = '';
|
|
688
846
|
return
|
|
689
847
|
}
|
|
690
848
|
|
|
691
849
|
//正常处理
|
|
692
850
|
this.getCinemaOrgData();
|
|
851
|
+
|
|
693
852
|
}
|
|
694
853
|
|
|
695
854
|
}).catch(e=>{
|
|
@@ -700,7 +859,6 @@
|
|
|
700
859
|
|
|
701
860
|
onJfbLoad(options) {
|
|
702
861
|
this.options = options;
|
|
703
|
-
|
|
704
862
|
jfbRootExec('getTFKPosterContent', {
|
|
705
863
|
vm: this,
|
|
706
864
|
data: {
|
|
@@ -748,6 +906,8 @@
|
|
|
748
906
|
this.tabBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.tabBorder', {}));
|
|
749
907
|
this.tabActBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.tabActBorder', {}));
|
|
750
908
|
this.tabRradius = getContainerPropsValue(container, 'content.tabRradius', '10');
|
|
909
|
+
this.sort_consume_mode = getContainerPropsValue(container, 'content.sort_consume_mode', '');
|
|
910
|
+
this.isList = getContainerPropsValue(container, 'content.isList', 'N');
|
|
751
911
|
|
|
752
912
|
//内容
|
|
753
913
|
this.contMargin = getContainerPropsValue(container, 'content.contMargin', {});
|
|
@@ -765,14 +925,14 @@
|
|
|
765
925
|
this.showRightnowName = getContainerPropsValue(container, 'content.showRightnowName', '');
|
|
766
926
|
this.showListName = getContainerPropsValue(container, 'content.showListName', '');
|
|
767
927
|
|
|
768
|
-
|
|
928
|
+
//广告设置
|
|
769
929
|
this.poster = getContainerPropsValue(container, 'content.poster',{});
|
|
770
930
|
this.posterNum = getContainerPropsValue(container, 'content.posterNum',1);
|
|
771
|
-
this.
|
|
772
|
-
this.isList = getContainerPropsValue(container, 'content.isList', 'N');
|
|
931
|
+
this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime',5)) * 1000;
|
|
773
932
|
|
|
774
933
|
//链接(影院)
|
|
775
934
|
this.onlinePath = getContainerPropsValue(container, 'content.onlinePath', {value:''}).value;
|
|
935
|
+
this.codePath = getContainerPropsValue(container, 'content.codePath', {value:''}).value;
|
|
776
936
|
|
|
777
937
|
//链接(影片)
|
|
778
938
|
this.buyPath = getContainerPropsValue(container, 'content.buyPath', {value: ""}).value;
|
|
@@ -782,6 +942,11 @@
|
|
|
782
942
|
this.setShowTypeList();
|
|
783
943
|
},
|
|
784
944
|
|
|
945
|
+
onJfbScroll(options){
|
|
946
|
+
//console.log(options.e.scrollTop)
|
|
947
|
+
this.virtualList.onScrollEvent(options.e.scrollTop);
|
|
948
|
+
},
|
|
949
|
+
|
|
785
950
|
setShowTypeList(){
|
|
786
951
|
let list = [];
|
|
787
952
|
if(this.showHot === 'Y') list.push(this.typeList["hot"]);
|
|
@@ -795,14 +960,27 @@
|
|
|
795
960
|
})
|
|
796
961
|
|
|
797
962
|
//已有选中值不设置默认值
|
|
798
|
-
if(this.
|
|
799
|
-
this.type =
|
|
963
|
+
if(this.addressType) {
|
|
964
|
+
this.type = this.addressType;
|
|
965
|
+
}
|
|
966
|
+
else {
|
|
967
|
+
if(this.type === '' && list.length > 0) {
|
|
968
|
+
this.type = list[0].value;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
//
|
|
973
|
+
if(this.type === 'list') {
|
|
974
|
+
this.$nextTick(()=>{
|
|
975
|
+
this.getListFilterEleTop()
|
|
976
|
+
})
|
|
800
977
|
}
|
|
978
|
+
|
|
801
979
|
this.showTypeListData = list;
|
|
802
980
|
},
|
|
803
981
|
|
|
804
982
|
onJfbReachBottom(options) {
|
|
805
|
-
if(
|
|
983
|
+
if(this.pageToken === '' || this.dataList === null) return;
|
|
806
984
|
this.getList();
|
|
807
985
|
},
|
|
808
986
|
|
|
@@ -811,6 +989,8 @@
|
|
|
811
989
|
this.$xdUniHelper.navigateBack();
|
|
812
990
|
}
|
|
813
991
|
},
|
|
992
|
+
|
|
993
|
+
|
|
814
994
|
//重新回去广告位置工
|
|
815
995
|
onJfbUpdate() {
|
|
816
996
|
this.onJfbLoad(this.options)
|
|
@@ -853,6 +1033,7 @@
|
|
|
853
1033
|
.list-cont {
|
|
854
1034
|
position: relative;
|
|
855
1035
|
z-index: 2;
|
|
1036
|
+
|
|
856
1037
|
.skeleton-wrap {
|
|
857
1038
|
.skeleton-wrap-item {
|
|
858
1039
|
height: 240rpx;
|
|
@@ -936,7 +1117,7 @@
|
|
|
936
1117
|
}
|
|
937
1118
|
|
|
938
1119
|
&-item {
|
|
939
|
-
|
|
1120
|
+
box-sizing: content-box;
|
|
940
1121
|
|
|
941
1122
|
&:last-child {
|
|
942
1123
|
margin-bottom: 0!important;
|
|
@@ -1011,6 +1192,18 @@
|
|
|
1011
1192
|
font-size: 26rpx;
|
|
1012
1193
|
}
|
|
1013
1194
|
|
|
1195
|
+
.preRendering {
|
|
1196
|
+
background: #eee;
|
|
1197
|
+
position: fixed;
|
|
1198
|
+
top:-9999rpx;
|
|
1199
|
+
left:-9999rpx;
|
|
1200
|
+
opacity: 1;
|
|
1201
|
+
z-index: 0;
|
|
1202
|
+
width: 100%;
|
|
1203
|
+
box-sizing: border-box;
|
|
1204
|
+
overflow: hidden;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1014
1207
|
.hasNoData {
|
|
1015
1208
|
height: 80rpx;
|
|
1016
1209
|
line-height: 80rpx;
|