jufubao-movie 1.0.36-beta7 → 1.0.37

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.
@@ -14,808 +14,87 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-movie-tfk-film-list__body">
17
- <view class="x-line"></view>
18
- <view
19
- class="tfk-list"
20
- v-if="showTypeListData.length > 0"
21
- :style="{
22
- padding: outSpacing + 'rpx'
23
- }"
24
- >
25
- <view class="list-tab" v-if="showTypeListData.length > 1">
26
- <view
27
- :class="{active: item.value === type}"
28
- v-for="(item,index) in showTypeListData"
29
- @click="handleTab(item.value)"
30
- :key="index"
31
- :style="{
32
- backgroundColor:item.value === type ? tabStyle.actBgColor:tabStyle.bgColor,
33
- color: item.value === type?tabStyle.actColor:tabStyle.color,
34
- fontWeight: item.value === type? tabStyle.actFontWeight: tabStyle.fontWeight,
35
- fontSize: item.value === type?(tabStyle.actFontSize):(tabStyle.fontSize),
36
- borderRadius: tabRradius + 'rpx',
37
- border:item.value === type?tabActBorder:tabBorder,
38
- boxShadow: item.value === type ? tabActShadow: tabShadow,
39
- marginRight: outSpacing + 'rpx',
40
- }"
41
- >{{item.label}}</view>
42
- </view>
43
- <!--poster-->
44
- <view
45
- class="list-poster"
46
- v-if="posterList !== null && posterList.length > 0"
47
- :style="{marginTop:outSpacing + 'rpx'}"
48
- >
49
- <view
50
- :style="{width: posterSize.width + 'rpx', height: posterSize.height + 'rpx' }"
51
- class="list-poster-one"
52
- v-if="posterList.length === 1"
53
- >
54
- <image :src="posterList[0].image_url" :alt="posterList[0].content_name"></image>
55
- </view>
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>
83
- <!--poster-->
84
- <!--film hot|rightnow-->
85
- <view
86
- v-if="type === 'hot' || type === 'rightnow'"
87
- class="list-cont"
88
- :style="{marginTop:outSpacing + 'rpx'}"
89
- >
90
- <view class="skeleton-wrap" v-if="dataList === null">
91
- <view
92
- class="skeleton-wrap-item"
93
- v-for="item in 6"
94
- :key="item"
95
- :style="{
96
- marginBottom:outSpacing + 'rpx',
97
- padding:contMarginComp,
98
- borderRadius:contRradius+ 'rpx',
99
- border:contBorder,
100
- boxShadow:contShadow,
101
- }"
102
- >
103
- <view class="skeleton-wrap-item-image skeleton-item" :style="{marginRight:outSpacing + 'rpx'}"></view>
104
- <view class="skeleton-wrap-item-title">
105
- <view class="title skeleton-item"></view>
106
- <view class="type skeleton-item"></view>
107
- <view class="director skeleton-item"></view>
108
- <view class="star skeleton-item"></view>
109
- </view>
110
- <view class="skeleton-wrap-item-btn skeleton-item" :style="{marginLeft:outSpacing + 'rpx'}">
111
- <view class="score skeleton-item"></view>
112
- <view class="btn skeleton-item"></view>
113
- </view>
114
- </view>
115
- </view>
116
- <template v-if="dataList !== null">
117
- <view
118
- class="list-cont-item"
119
- v-for="film in dataList"
120
- :key="film.id"
121
- :style="{
122
- marginBottom:outSpacing + 'rpx',
123
- padding:contMarginComp,
124
- borderRadius:contRradius+ 'rpx',
125
- border:contBorder,
126
- boxShadow:contShadow,
127
- backgroundColor:contBgColor,
128
- }"
129
- >
130
- <content-item
131
- style="width: 100%;height: 100%"
132
- :item="film"
133
- :out-spacing="outSpacing"
134
- :color="mainColor"
135
- :type="type"
136
- :border-radius="imgRradius"
137
- @on-film-detail="handleFilmDetail"
138
- @on-buy="handleBuy"
139
- ></content-item>
140
- </view>
141
- </template>
142
- </view>
143
- <!--film hot|rightnow-->
144
- <!--cinema-->
145
- <view v-if="type === 'list'" class="list-filter" :style="{marginTop:outSpacing + 'rpx'}">
146
- <view class="list-filter-block" :class="{hasFitler:!!curQueryTab}">
147
- <view @click="handleFilterTab('filter')">
148
- <xd-font-icon icon="iconrepository-xialaxuanxiangdown" size="24" color="#999"></xd-font-icon>
149
- <text>{{areaName}}</text>
150
- </view>
151
- <view @click="handleFilterTab('sort')">
152
- <xd-font-icon icon="iconshaixuanbiaoji_mian" size="28" color="#999"></xd-font-icon>
153
- <text>{{sortName}}</text>
154
- </view>
155
- </view>
156
- <view class="list-filter-modal" v-if="curQueryTab">
157
- <xd-query-sort
158
- key="sort"
159
- :sort="sort"
160
- v-if="sortUserList !== null && curQueryTab === 'sort'"
161
- @onConfirm="handleQuerySort"
162
- :list="sortUserList"
163
- ></xd-query-sort>
164
- <xd-query-filter
165
- key="filter"
166
- v-if="cinemaAreaList !== null && curQueryTab === 'filter'"
167
- :list="cinemaAreaList"
168
- @onConfirm="handleQueryFilter"
169
- ></xd-query-filter>
170
- </view>
171
- </view>
172
- <view
173
- v-if="type === 'list'"
174
- class="list-cont"
175
- :style="{marginTop:outSpacing + 'rpx'}"
176
- >
177
- <view class="skeleton-wrap" v-if="dataList === null">
178
- <view
179
- class="skeleton-wrap-item list"
180
- v-for="item in 8"
181
- :key="item"
182
- :style="{
183
- marginBottom:outSpacing + 'rpx',
184
- padding:contMarginComp,
185
- borderRadius:contRradius+ 'rpx',
186
- border:contBorder,
187
- boxShadow:contShadow,
188
- }"
189
- >
190
- <view class="title skeleton-item"></view>
191
- <view class="address skeleton-item"></view>
192
- <view class="bottom">
193
- <view class="local skeleton-item"></view>
194
- <view class="btn skeleton-item"></view>
195
- </view>
196
- </view>
197
- </view>
198
- <template v-if="dataList !== null">
199
- <view
200
- class="list-cont-item"
201
- v-for="(film) in dataList"
202
- :key="film.cinema_id"
203
- :style="{
204
- marginBottom:outSpacing + 'rpx',
205
- padding:contMarginComp,
206
- borderRadius:contRradius+ 'rpx',
207
- border:contBorder,
208
- boxShadow:contShadow,
209
- backgroundColor:contBgColor,
210
- height: 'auto'
211
- }"
212
- >
213
- <content-cinema
214
- style="width: 100%;height: 100%"
215
- :item="film"
216
- :out-spacing="outSpacing"
217
- :color="{SEAT:mainColor,CODE:subMainColor,SELL:successColor}"
218
- :type="type"
219
- :border-radius="imgRradius"
220
- @on-schedule="handleSchedule"
221
- @on-cashier-detail="handleCashierDetail"
222
- @on-code-detail="handleCodeDetail"
223
- ></content-cinema>
224
- </view>
225
- <view
226
- class="cont-mask"
227
- v-if="curQueryTab"
228
- @click="handleClose"
229
- :style="{left:- outSpacing + 'rpx', right: - outSpacing + 'rpx', }"
230
- ></view>
231
- </template>
232
- </view>
233
- <!--cinema-->
234
- <view class="hasNoData" v-if="dataList && dataList.length > 0 && pageToken === ''">已经到底没有更多数据了</view>
235
- </view>
236
- <template v-else>
237
- <view
238
- class="noConfig"
239
- v-if="isPreview"
240
- :style="{backgroundColor:backgroundColor, color:warningColor}"
241
- >热映影片,即将上映未配置,此模块在线上不显</view>
242
- </template>
17
+ <view>测试插件( {{containerId}} )</view>
243
18
  </view>
244
19
  </view>
245
20
  </template>
246
21
 
247
22
  <script>
248
23
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
249
- import XdSwiperDot from "./XdSwiperDot.vue";
250
24
  import { jfbRootExec } from "@/utils/xd.event";
251
25
  import JfbMovieTfkFilmListMixin from "./JfbMovieTfkFilmListMixin";
252
26
  import { getContainerPropsValue } from "@/utils/xd.base";
253
- import getServiceUrl from '@/common/getServiceUrl'
254
27
  import componentsMixins from "@/mixins/componentsMixins";
255
28
  import extsMixins from "@/mixins/extsMixins";
256
- import posterMixins from "@/mixins/posterMixins";
257
- import ContentItem from './ContentItem.vue'
258
- import ContentCinema from "./ContentCinema.vue";
259
- import XdQuerySort from "./XdQuerySort.vue";
260
- import XdQueryFilter from "./XdQueryFilter.vue";
261
- import {mapState} from "vuex";
262
- import Color from "color";
263
-
264
29
  export default {
265
30
  name: "JfbMovieTfkFilmList",
266
31
  components: {
267
- XdFontIcon,
268
- ContentItem,
269
- XdSwiperDot,
270
- ContentCinema,
271
- XdQuerySort,
272
- XdQueryFilter
32
+ XdFontIcon
273
33
  },
274
34
  mixins: [
275
- componentsMixins, extsMixins, JfbMovieTfkFilmListMixin,posterMixins
35
+ componentsMixins, extsMixins, JfbMovieTfkFilmListMixin
276
36
  ],
277
37
  data() {
278
38
  return {
279
- options: {},
280
- //hideMask: true,
281
- type:'', //hot rightnow
282
- typeList:{hot:{label: '热映影片', value: 'hot'},list:{label: '影院列表', value: 'list'}, rightnow:{label: '即将上映', value: 'rightnow'}},
283
- showTypeListData:null,
284
- backgroundColor:'',
285
- isPreview: false,
286
- pageToken:'1',
287
- pageSize: 20,
288
- total: null,
289
- isFirstLoadingData: false,
290
- dataList:null,
291
- cinemaOrgDataList:null,
292
- cinemaAreaList:null,
293
- sort_consume_mode:'',//获取影院数据排序
294
- sortUserList:null,
295
-
296
-
297
- //filter
298
- showQueryModal:false,
299
- curQueryTab:'',
300
- sort:'',
301
- sortName:'排序',
302
- sortCode:'default',
303
-
304
- //区域
305
- areaCode:'all',
306
- areaName:'区域筛选',
307
-
308
- //广告
309
- posterList:null,
310
- poster:{},
311
- posterNum:1,
312
- mode:'round',
313
- current: 0,
314
- carouselTime: 5000,//轮播图轮播周期
315
-
316
- //基础配置
317
- outSpacing:'20',
318
- showHot: '',
319
- showRightnow:'',
320
- showList:'Y',
321
- showHotName:'',
322
- showRightnowName: '',
323
- showListName: '',
324
- isList:'Y', //组件是否用户列表或者是否为首页(是否开启返回功能)
325
- tabStyle:{},
326
-
327
-
328
- //tab
329
- tabBorder:'0',
330
- tabActBorder:'0',
331
- tabShadow:'0 0 0 rgba(0,0,0,0)',
332
- tabActShadow:'0 0 0 rgba(0,0,0,0)',
333
- tabRradius:'10',
334
-
335
- //列表样式
336
- contMargin:{},
337
- contRradius:'20',
338
- contBorder:'0',
339
- contShadow:'0 0 10rpx rgba(0,0,0,.05)',
340
- contBgColor:'#fff',
341
- imgRradius:'10',
342
-
343
- //链接
344
- onlinePath:'',
345
- codePath:'',
346
- cashierPath:'',
347
-
348
- buyPath:'',
349
- fimeDetailPath:'',
350
-
351
39
 
40
+ //todo
352
41
  }
353
- },
354
- computed:{
355
- ...mapState({
356
- stateCity: state => state.cityLocation.city,
357
- stateLocation: (state) => state.cityLocation.location || {},
358
- }),
359
-
360
- dotStyleData(){
361
- let alpha = 0.6;
362
- let selectedColor = `rgba(${Color(this.mainColor).alpha(alpha).array().join(',')})`;
363
- let style = {
364
- dot: {
365
- backgroundColor: 'rgba(166,166,166,.5)',
366
- border: '0px rgba(166,166,166,.5) solid',
367
- color: '#fff',
368
- selectedBackgroundColor: selectedColor,
369
- selectedBorder: `0px this.mainColor solid`
370
- },
371
- default: {
372
- width: 16,
373
- backgroundColor: 'rgba(200,200,200,.45)',
374
- border: '1px rgba(200,200,200,.45) solid',
375
- color: '#fff',
376
- selectedBackgroundColor: selectedColor,
377
- selectedBorder: `1px this.mainColor solid`
378
- },
379
- round: {
380
- backgroundColor: 'rgba(166,166,166,.5)',
381
- border: '0px rgba(166,166,166,.5) solid',
382
- color: '#fff',
383
- selectedBackgroundColor: selectedColor,
384
- selectedBorder: `0px this.mainColor solid`
385
- },
386
- nav: {
387
- backgroundColor: 'rgba(0,0,0,.5)',
388
- border: '1px rgba(0,0,0,.5) solid',
389
- color: '#fff',
390
- selectedBackgroundColor: 'rgba(255, 255, 255, 1)',
391
- selectedBorder: '1px rgba(255, 255, 255 1) solid'
392
- },
393
- indexes: {
394
- backgroundColor: 'rgba(0,0,0,.5)',
395
- border: '0px rgba(0,0,0,.5) solid',
396
- color: '#aaa',
397
- selectedBackgroundColor: 'rgba(0,0,0,.8)',
398
- selectedBorder: '0px rgba(0,0,0,.8) solid',
399
- selectedColor: '#fff',
400
- }
401
- }
402
- return style[this.mode]
403
- },
404
- contMarginComp(){
405
- let str = `${this.checkValue(this.contMargin.top, 20)}rpx`;
406
- str = `${str} ${this.checkValue(this.contMargin.right, 20)}rpx`;
407
- str = `${str} ${this.checkValue(this.contMargin.bottom, 20)}rpx`;
408
- str = `${str} ${this.checkValue(this.contMargin.left, 20)}rpx`;
409
- return str
410
- },
411
-
412
- posterSize(){
413
- if(this.poster && this.poster.size) {
414
- let {width, height} = this.poster.size
415
- let size = {}
416
- if(width) size['width'] = width || 710;
417
- if(height) size['height'] = height || 280;
418
- return size;
419
- }
420
- return {
421
- width: 710,
422
- height: 280,
423
- }
424
- },
425
-
426
-
427
42
  },
428
43
  watch: {
429
44
  container(value, oldValue) {
430
45
  if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
431
46
  if (this.$configProject['isPreview']) this.init(value)
432
47
  },
433
-
434
- posterNum(){
435
- if (this.$configProject['isPreview']){
436
- this.onJfbLoad();
437
- }
438
- },
439
- stateCity(n, o){
440
- if(n && JSON.stringify(n) !== JSON.stringify(o)){
441
- this.clearDataVar()
442
- this.getList();
443
- }
444
- },
445
- showTypeListData(){
446
- if(this.type === '') return;
447
- this.clearDataVar();
448
- this.getList();
449
- },
450
48
  },
451
49
  created() {
452
- this.isPreview = this.$configProject.isPreview;
453
- this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
454
50
  this.init(this.container);
51
+
52
+ //todo
455
53
  },
456
54
  methods: {
457
- clearDataVar(){
458
- this.dataList = null;
459
- this.pageToken = '1';
460
- this.areaCode = 'all'
461
- this.areaName ='区域筛选';
462
- this.sortName = '排序'
463
- this.sortCode = 'default'
464
- this.cinemaOrgDataList = null;
465
- },
466
- getSortList(){
467
- jfbRootExec('getTFKSortList', {
468
- vm: this,
469
- data:{}
470
- }).then(res => {
471
- this.sortUserList = res['cinema_customer_sort'];
472
- }).catch(err=>{
473
- console.error(err);
474
- })
475
-
476
- },
477
-
478
- //影片列表
479
- handleFilmDetail(film_id){
480
- console.warn(`toFilmInfo(影片详情).${film_id}`)
481
- if(!this.fimeDetailPath) {
482
- console.error('未配置链接');
483
- return;
484
- }
485
- if( this.isPreview) return;
486
- this.$xdUniHelper.navigateTo({
487
- url: this.fimeDetailPath + `?film_id=${film_id}`
488
- })
489
- },
490
- handleBuy(film_id){
491
- console.warn(`toBuyChooseCinema(选择影院).${film_id}`)
492
- if(!this.buyPath) {
493
- console.error('未配置链接');
494
- return;
495
- }
496
- if( this.isPreview) return;
497
- this.$xdUniHelper.navigateTo({
498
- url: this.buyPath + `?film_id=${film_id}`
499
- })
500
- },
501
- //影片列表
502
-
503
- //影院列表
504
- handleSchedule(item){
505
- console.warn(`handleSchedule(选择排期).${item.cinema_id}`)
506
- if(!this.onlinePath) {
507
- console.error('未配置链接');
508
- return;
509
- }
510
- if( this.isPreview) return;
511
- this.$xdUniHelper.navigateTo({
512
- url: this.onlinePath + `?cinema_id=${item.cinema_id}`,
513
- });
514
- },
515
- handleCodeDetail(item){
516
- console.warn(`handleCodeDetail(选择电子码列表).${item.cinema_id}`)
517
- if(!this.codePath) {
518
- console.error('未配置链接');
519
- return;
520
- }
521
- if( this.isPreview) return;
522
- this.$xdUniHelper.navigateTo({
523
- url: this.codePath + `?cinema_id=${item.cinema_id}`,
524
- });
525
- },
526
- handleCashierDetail(item){
527
- //todo
528
- },
529
- handleFilterTab(tab){
530
- if(tab === this.curQueryTab ) {
531
- this.curQueryTab = ''
532
- }
533
- else this.curQueryTab = tab
534
- },
535
- handleQuerySort(sortData){
536
- this.sortCode = sortData.value;
537
- this.sortName = sortData.label;
538
- this.pageToken = '1';
539
- this.dataList = null;
540
- this.cinemaOrgDataList = null;
541
- this.getList();
542
-
543
- //等待排序规则
544
- setTimeout(()=>{
545
- this.curQueryTab = '';
546
- },200)
547
-
548
- },
549
- handleQueryFilter(sortData){
550
- this.areaCode = sortData.area_code;
551
- this.areaName = sortData.area_name;
552
- this.pageToken = '1';
553
- this.dataList = null;
554
- this.getList();
555
- setTimeout(()=>{
556
- this.curQueryTab = '';
557
- },200)
558
-
559
- },
560
- handleClose(){
561
- this.curQueryTab = '';
562
- },
563
- //影院列表
564
-
565
- handleAnimationfinish(e){
566
- this.current = e.detail.current;
567
- },
568
-
569
- getCinemaOrgData(){
570
- let fitlerData = this.$xdUniHelper.cloneDeep(this.cinemaOrgDataList||[])
571
-
572
- //非全域处理
573
- if(this.areaCode !== 'all') {
574
- fitlerData = fitlerData.filter(item=>{
575
- return item.area_code === this.areaCode;
576
- });
577
- }
578
-
579
- //添加测试数据
580
- // "NODE_ENV": "development",
581
- // #ifdef H5
582
- if(window.location.href.indexOf('filter=1') !== -1
583
- || this.$configProject.NODE_ENV === 'development'
584
- ) {
585
- fitlerData = fitlerData.map((item,index)=>{
586
- return {
587
- ...item,
588
- cinema_name: `${item.cinema_name}-${index+1}`,
589
- }
590
- });
591
- }
592
- //#endif
593
-
594
- console.log(`fitlerData:`,fitlerData)
595
- console.warn(`fitlerData.length=${fitlerData.length}`)
596
-
597
- //过滤之后不够分页直接返回值
598
- if(fitlerData.length <= this.pageSize) {
599
- this.dataList = this.$xdUniHelper.cloneDeep(fitlerData);
600
- this.pageToken = ''
601
- return;
602
- }
603
-
604
- let list = this.$xdUniHelper.getLocalPaginationData(
605
- fitlerData, this.pageToken, this.pageSize
606
- );
607
-
608
- //分页完成的数据为0
609
- if(list.length === 0) {
610
- this.pageToken = ''
611
- return;
612
- }
613
-
614
- this.dataList = (this.dataList||[]).concat(this.$xdUniHelper.cloneDeep(list));
615
- if(this.pageSize < list.length) this.pageToken = '';
616
- else this.pageToken = (Number(this.pageToken)+1) + '';
617
- },
618
-
619
- handleTab(value){
620
- if(value === this.type) return;
621
- this.type = value;
622
- this.dataList = null;
623
- this.pageToken = '1';
624
- this.getList();
625
- },
626
-
627
- getList(){
628
- let fName = 'getTFKListFilmHotList';
629
- if(this.type === 'rightnow') fName = 'getTFKListFilmRightnowList';
630
- if(this.type === 'list') fName = 'getTFKCinemaList';
631
-
632
- if(this.isFirstLoadingData) this.$xdShowLoading({});
633
- if(!this.isFirstLoadingData){
634
- this.isFirstLoadingData = true;
635
- }
636
-
637
- let params = {
638
- city_code: this.stateCity.city_code,
639
- type: this.type,
640
- page_token: this.pageToken,
641
- page_size: this.pageSize
642
- }
643
-
644
- //影院参数
645
- if(this.type === 'list') {
646
- //有数据直接进行数据分页
647
- if(this.cinemaOrgDataList !== null) {
648
- this.getCinemaOrgData();
649
- this.$xdHideLoading({});
650
- return
651
- }
652
-
653
- params = {
654
- city_code: this.stateCity.city_code,
655
- latitude: this.stateLocation.latitude,
656
- longitude: this.stateLocation.longitude,
657
- sort_consume_mode: this.sort_consume_mode || '',
658
- sort_custom:this.sortCode
659
- }
660
- }
661
-
662
-
663
-
664
- jfbRootExec(fName, {
665
- vm: this,
666
- data:params
667
- }).then(res => {
668
- if(this.isFirstLoadingData) this.$xdHideLoading({});
669
-
670
- //影片列表处理
671
- if(this.type === 'rightnow' || this.type==='hot'){
672
- this.dataList = (this.dataList||[]).concat(res['list']);
673
- this.pageToken = res.next_page_token;
674
- return;
675
- }
676
-
677
- //影院列表处理
678
- if(this.type === 'list') {
679
- //res['list'].splice(0, 31);
680
- this.cinemaOrgDataList = res['list'];
681
- this.cinemaAreaList = [{area_code:'all', area_name:'全城'}].concat(res['area_list']);
682
-
683
-
684
- //小于数量页面显示记录
685
- if(res['list'].length <= this.pageSize) {
686
- this.dataList = res['list'];
687
- this.pageToken = '';
688
- return
689
- }
55
+ onJfbLoad(options) {
690
56
 
691
- //正常处理
692
- this.getCinemaOrgData();
693
- }
57
+ // jfbRootExec('baiduUserLogin', {
694
58
 
695
- }).catch(e=>{
696
- console.error(e);
697
- this.$xdHideLoading({});
698
- })
699
- },
59
+ // vm: this,// data: {
700
60
 
701
- onJfbLoad(options) {
702
- this.options = options;
61
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
703
62
 
704
- jfbRootExec('getTFKPosterContent', {
705
- vm: this,
706
- data: {
707
- page_id: this.pageAttr['page_id'], //页面ID
708
- container_id: this.containerId, //组件ID
709
- page_size: this.posterNum //可以不传
710
- },
711
- })
712
- .then(res => {
713
- let posterList = res.list.map((item,index) => {
714
- return {
715
- ...item,
716
- image_background_url: item.image_background_url?getServiceUrl(item.image_background_url):'',
717
- image_url: item.image_url?getServiceUrl(item.image_url):''
718
- }
719
- });
720
- this.posterList = this.posterFilterNoUseData(posterList);
721
- })
722
- .catch(err=>{
723
- console.error(err);
724
- })
725
-
726
- this.getSortList();
63
+ // }
727
64
 
65
+ // }).then().catch()
728
66
  },
729
-
730
67
  /**
731
68
  * @description 监听事件变化
732
69
  * @param container {object} 业务组件对象自己
733
70
  */
734
71
  init(container) {
735
- this.outSpacing = getContainerPropsValue(container, 'content.outSpacing', '20');
736
- this.tabStyle = Object.assign({},{
737
- color:'#333',
738
- bgColor: '#fff',
739
- fontSize: '26rpx',
740
- fontWeight: 'normal',
741
- actBgColor: this.mainColor,
742
- actColor: '#fff',
743
- actFontSize: '26rpx',
744
- actFontWeight: 'normal',
745
- },getContainerPropsValue(container, 'content.tabStyle', {}));
746
- this.tabShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0.05)'},getContainerPropsValue(container, 'content.tabShadow', {}))
747
- this.tabActShadow = this.getXdShadow( {width:20, color:this.mainColor},getContainerPropsValue(container, 'content.tabActShadow', {}))
748
- this.tabBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.tabBorder', {}));
749
- this.tabActBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.tabActBorder', {}));
750
- this.tabRradius = getContainerPropsValue(container, 'content.tabRradius', '10');
751
-
752
- //内容
753
- this.contMargin = getContainerPropsValue(container, 'content.contMargin', {});
754
- this.contRradius = getContainerPropsValue(container, 'content.contRradius', '10');
755
- this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contShadow', {}))
756
- this.contBorder = this.getXdBorder({width:2,color:'rgba(0,0,0,0)'},getContainerPropsValue(container, 'content.contBorder', {}));
757
- this.contBgColor = getContainerPropsValue(container, 'content.contBgColor', '#fff');
758
- this.imgRradius = getContainerPropsValue(container, 'content.imgRradius', '10');
759
72
 
760
- //控制标签显示
761
- this.showHot = getContainerPropsValue(container, 'content.showHot','Y');
762
- this.showRightnow = getContainerPropsValue(container, 'content.showRightnow','Y');
763
- this.showList = getContainerPropsValue(container, 'content.showList','Y');
764
- this.showHotName = getContainerPropsValue(container, 'content.showHotName', '');
765
- this.showRightnowName = getContainerPropsValue(container, 'content.showRightnowName', '');
766
- this.showListName = getContainerPropsValue(container, 'content.showListName', '');
73
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
767
74
 
768
-
769
- this.poster = getContainerPropsValue(container, 'content.poster',{});
770
- this.posterNum = getContainerPropsValue(container, 'content.posterNum',1);
771
- this.sort_consume_mode = getContainerPropsValue(container, 'content.sort_consume_mode', '');
772
- this.isList = getContainerPropsValue(container, 'content.isList', 'N');
773
-
774
- //链接(影院)
775
- this.onlinePath = getContainerPropsValue(container, 'content.onlinePath', {value:''}).value;
776
-
777
- //链接(影片)
778
- this.buyPath = getContainerPropsValue(container, 'content.buyPath', {value: ""}).value;
779
- this.fimeDetailPath = getContainerPropsValue(container, 'content.fimeDetailPath', {value: ""}).value;
780
-
781
- //初始化数据
782
- this.setShowTypeList();
75
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
783
76
  },
784
-
785
- setShowTypeList(){
786
- let list = [];
787
- if(this.showHot === 'Y') list.push(this.typeList["hot"]);
788
- if(this.showList === 'Y') list.push(this.typeList["list"]);
789
- if(this.showRightnow === 'Y') list.push(this.typeList["rightnow"]);
790
- list = this.$xdUniHelper.cloneDeep(list).map(item=>{
791
- if(item.value === 'hot') item.label = this.showHotName ||item.label
792
- if(item.value === 'list') item.label = this.showListName || item.label;
793
- if(item.value === 'rightnow') item.label = this.showRightnowName || item.label;
794
- return item
795
- })
796
-
797
- //已有选中值不设置默认值
798
- if(this.type === '' && list.length > 0) {
799
- this.type = list[0].value;
800
- }
801
- this.showTypeListData = list;
77
+ onJfbScroll(options) {
78
+ console.log('event.onJfbScroll', options)
802
79
  },
803
-
804
80
  onJfbReachBottom(options) {
805
- if(!this.pageToken) return false;
806
- this.getList();
81
+ console.log('event.onJfbReachBottom', options)
82
+ },
83
+ onJfbShow(options) {
84
+ console.log('event.onJfbShow', options)
85
+ },
86
+ onJfbHide(options) {
87
+ console.log('event.onJfbHide', options)
807
88
  },
808
-
809
89
  onJfbBack(options) {
810
- if(this.isList === 'Y') {
811
- this.$xdUniHelper.navigateBack();
812
- }
90
+ console.log('event.onJfbBack', options)
813
91
  },
814
- //重新回去广告位置工
815
- onJfbUpdate() {
816
- this.onJfbLoad(this.options)
92
+ onJfbUpdate(...data) {
93
+ console.log('event.onJfbUpdate', data)
94
+ },
95
+ onJfbCustomEvent(options) {
96
+ console.log('event.onJfbReachBottom', options)
817
97
  },
818
-
819
98
  }
820
99
  }
821
100
 
@@ -826,201 +105,7 @@
826
105
 
827
106
  .jfb-movie-tfk-film-list {
828
107
  &__body{
829
- .tfk-list {
830
- & >view:first-child {
831
- margin-top: 0 !important;
832
- }
833
- }
834
-
835
- .list-tab {
836
- display: flex;
837
- justify-content: space-between;
838
- align-items: center;
839
-
840
- & > view {
841
- flex: 1;
842
- height: 80rpx;
843
- line-height: 80rpx;
844
- text-align: center;
845
- font-size: 28rpx;
846
-
847
- &:last-child {
848
- margin-right: 0!important;
849
- }
850
- }
851
- }
852
-
853
- .list-cont {
854
- position: relative;
855
- z-index: 2;
856
- .skeleton-wrap {
857
- .skeleton-wrap-item {
858
- height: 240rpx;
859
- padding: 20rpx;
860
- background: #fff;
861
- display: flex;
862
- justify-content: space-between;
863
- align-items: center;
864
-
865
- //影片列表骨架
866
- &-image {
867
- .skeleton-item(160rpx, 240rpx);
868
- flex-shrink: 0;
869
- margin-right: 20rpx;
870
- }
871
-
872
- &-title {
873
- flex: 1;
874
-
875
- .title {
876
- .skeleton-item(100%, 50rpx);
877
- margin-bottom: 20rpx;
878
- }
879
-
880
- .director,.star,.type {
881
- .skeleton-item(100%, 40rpx);
882
- margin-bottom: 10rpx;
883
- }
884
- }
885
-
886
- &-btn {
887
- display: flex;
888
- align-content: space-between;
889
- align-items: flex-end;
890
- justify-content: flex-end;
891
- flex-flow: wrap;
892
- height: 100%;
893
- box-sizing: border-box;
894
- padding: 10rpx 0;
895
- width: 130rpx;
896
- flex-shrink: 0;
897
-
898
- & > .score {
899
- .skeleton-item(100rpx, 40rpx);
900
- }
901
- & > .btn {
902
- .skeleton-item(130rpx, 60rpx);
903
- }
904
- }
905
-
906
- &:last-child {
907
- margin-bottom: 0!important;
908
- }
909
-
910
- //影院列表骨架
911
- &.list {
912
- display: block;
913
- }
914
- & > .title {
915
- .skeleton-item(100%, 60rpx);
916
- margin-bottom: 20rpx;
917
- }
918
- & > .address {
919
- .skeleton-item(100%, 40rpx);
920
- margin-bottom: 20rpx;
921
- }
922
- & > .bottom {
923
- display: flex;
924
- justify-content: space-between;
925
- align-items: center;
926
- padding-top: 30rpx;
927
-
928
- & > .local {
929
- .skeleton-item(120rpx, 30rpx);
930
- }
931
- & > .btn {
932
- .skeleton-item(150rpx, 70rpx);
933
- }
934
- }
935
- }
936
-
937
-
938
- }
939
-
940
- &-item {
941
- height: 240rpx;
942
-
943
- &:last-child {
944
- margin-bottom: 0!important;
945
- }
946
- }
947
-
948
- .cont-mask {
949
- position: absolute;
950
- top: 0;
951
- bottom: 0;
952
- z-index: 1;
953
- background-color: rgba(0, 0, 0, .2);
954
- }
955
- }
956
-
957
- .list-poster {
958
- &-one {
959
- display: flex;
960
- justify-content: center;
961
- align-items: center;
962
-
963
- & > image {
964
- height: 100%;
965
- width: 100%;
966
- }
967
- }
968
- }
969
-
970
- .list-filter {
971
- position: relative;
972
- z-index: 3;
973
- .hasFitler {
974
- box-shadow: 0 -5rpx 20rpx 0 rgba(0,0,0, .1);
975
- border-radius: 20rpx 20rpx 0 0;
976
- }
977
-
978
- &-block {
979
- display: flex;
980
- justify-content: space-between;
981
- align-items: center;
982
- height: 100rpx;
983
- background: #fff;
984
- font-size: 28rpx;
985
-
986
- & > view {
987
- flex: 1;
988
- text-align: center;
989
- cursor: pointer;
990
- color:#999;
991
- display: flex;
992
- justify-content: center;
993
- align-items: center;
994
-
995
- & > text {
996
- margin-left: 10rpx;
997
- }
998
- }
999
- }
1000
-
1001
- &-modal {
1002
- position: relative;
1003
- height: 1px;
1004
- width: 100%;
1005
- z-index: 3;
1006
- }
1007
- }
1008
- }
1009
-
1010
- .noConfig {
1011
- line-height: 100rpx;
1012
- text-align: center;
1013
- font-size: 26rpx;
1014
- }
1015
108
 
1016
- .hasNoData {
1017
- height: 80rpx;
1018
- line-height: 80rpx;
1019
- font-size: 24rpx;
1020
- text-align: center;
1021
- color: #ccc;
1022
- background-color: rgba(255, 255, 255, .05);
1023
- margin: 20rpx 0
1024
109
  }
1025
110
  }
1026
111
  </style>