jufubao-movie 1.0.36-beta3 → 1.0.36-beta4
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/JfbMovieTfkFilmList/Api.js +16 -6
- package/src/components/JfbMovieTfkFilmList/Attr.js +38 -0
- package/src/components/JfbMovieTfkFilmList/ContentCinema.vue +2 -0
- package/src/components/JfbMovieTfkFilmList/JfbMovieTfkFilmList.vue +244 -50
- package/src/components/JfbMovieTfkFilmList/XdQueryFilter.vue +2 -36
- package/src/components/JfbMovieTfkFilmRecommend/JfbMovieTfkFilmRecommend.vue +53 -39
package/package.json
CHANGED
|
@@ -38,14 +38,12 @@ module.exports = [
|
|
|
38
38
|
{
|
|
39
39
|
mapFnName: 'getTFKCinemaList',
|
|
40
40
|
title: '获取即将上映影片列表',
|
|
41
|
-
path: '/movie/v1/
|
|
41
|
+
path: '/movie/v1/cinema/list',
|
|
42
42
|
isRule: false,
|
|
43
43
|
params: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
page_token: ['page_token', 'Number|string', '必选'],
|
|
48
|
-
scene: ['应用场景', 'string', '可选', 'list'],
|
|
44
|
+
city_code: ['city_code', 'Number', '必选'],
|
|
45
|
+
latitude: ['latitude', 'Number', '必选'],
|
|
46
|
+
longitude: ['longitude', 'Number', '必选'],
|
|
49
47
|
},
|
|
50
48
|
isConsole: true,
|
|
51
49
|
disabled: true,
|
|
@@ -64,4 +62,16 @@ module.exports = [
|
|
|
64
62
|
isConsole: true,
|
|
65
63
|
disabled: true,
|
|
66
64
|
},
|
|
65
|
+
|
|
66
|
+
{
|
|
67
|
+
mapFnName: 'getTFKSortList',
|
|
68
|
+
title: '获取内容',
|
|
69
|
+
path: '/movie/v1/film/options',
|
|
70
|
+
isRule: false,
|
|
71
|
+
params: {},
|
|
72
|
+
isConsole: true,
|
|
73
|
+
disabled: true,
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
//
|
|
67
77
|
];
|
|
@@ -85,6 +85,33 @@ export default {
|
|
|
85
85
|
inline: false,
|
|
86
86
|
className: 'input60',
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
ele: 'title',
|
|
90
|
+
label: '影院列表设置',
|
|
91
|
+
size: 'small',
|
|
92
|
+
groupKey:'content',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: '获取数据排序方式:',
|
|
96
|
+
ele: 'xd-site-select-list',
|
|
97
|
+
valueKey: 'sort_consume_mode',
|
|
98
|
+
value: data['sort_consume_mode'] || '',
|
|
99
|
+
groupKey:'content',
|
|
100
|
+
placeholder: '请选择获取数据排序方式',
|
|
101
|
+
className: 'input80',
|
|
102
|
+
handleCustom({ action, data }) {
|
|
103
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
104
|
+
setting_id: 'sort_consume_mode',
|
|
105
|
+
key: Date.now()
|
|
106
|
+
})
|
|
107
|
+
.then(res => {
|
|
108
|
+
data.cb(res.list)
|
|
109
|
+
})
|
|
110
|
+
.catch(error => {
|
|
111
|
+
console.error(error);
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
},
|
|
88
115
|
{
|
|
89
116
|
ele: 'title',
|
|
90
117
|
label: '广告设置',
|
|
@@ -542,6 +569,17 @@ export default {
|
|
|
542
569
|
size: 'small',
|
|
543
570
|
groupKey:'advanced',
|
|
544
571
|
},
|
|
572
|
+
{
|
|
573
|
+
label: "组件用途",
|
|
574
|
+
ele: "xd-radio",
|
|
575
|
+
valueKey: "isList",
|
|
576
|
+
value: data['isList'] || "N",
|
|
577
|
+
groupKey: 'advanced',
|
|
578
|
+
list: [
|
|
579
|
+
{label: "用于内页", value: "Y"},
|
|
580
|
+
{label: "用于首页", value: "N"}
|
|
581
|
+
]
|
|
582
|
+
},
|
|
545
583
|
{
|
|
546
584
|
label: '影片详情访问地址:',
|
|
547
585
|
ele: 'xd-select-pages-path',
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
</view>
|
|
12
12
|
<view class="btn">
|
|
13
|
+
<!--不展示核销类型【SELL】-->
|
|
13
14
|
<view
|
|
14
15
|
v-for="(name,index) in item['cinema_type_name']"
|
|
16
|
+
v-if="item['cinema_type'][index] !== 'SELL'"
|
|
15
17
|
:key="index"
|
|
16
18
|
@click.stop="handleBtn(item['cinema_type'][index])"
|
|
17
19
|
:style="{
|
|
@@ -142,26 +142,28 @@
|
|
|
142
142
|
</view>
|
|
143
143
|
<!--film hot|rightnow-->
|
|
144
144
|
<!--cinema-->
|
|
145
|
-
<view class="list-filter" :style="{marginTop:outSpacing + 'rpx'}">
|
|
145
|
+
<view v-if="type === 'list'" class="list-filter" :style="{marginTop:outSpacing + 'rpx'}">
|
|
146
146
|
<view class="list-filter-block" :class="{hasFitler:!!curQueryTab}">
|
|
147
147
|
<view @click="handleFilterTab('filter')">
|
|
148
148
|
<xd-font-icon icon="iconrepository-xialaxuanxiangdown" size="24" color="#999"></xd-font-icon>
|
|
149
|
-
<text
|
|
149
|
+
<text>{{areaName}}</text>
|
|
150
150
|
</view>
|
|
151
151
|
<view @click="handleFilterTab('sort')">
|
|
152
152
|
<xd-font-icon icon="iconshaixuanbiaoji_mian" size="28" color="#999"></xd-font-icon>
|
|
153
|
-
<text
|
|
153
|
+
<text>{{sortName}}</text>
|
|
154
154
|
</view>
|
|
155
155
|
</view>
|
|
156
156
|
<view class="list-filter-modal" v-if="curQueryTab">
|
|
157
157
|
<xd-query-sort
|
|
158
|
+
key="sort"
|
|
158
159
|
:sort="sort"
|
|
159
|
-
v-
|
|
160
|
+
v-if="sortUserList !== null && curQueryTab === 'sort'"
|
|
160
161
|
@onConfirm="handleQuerySort"
|
|
162
|
+
:list="sortUserList"
|
|
161
163
|
></xd-query-sort>
|
|
162
164
|
<xd-query-filter
|
|
163
|
-
|
|
164
|
-
v-
|
|
165
|
+
key="filter"
|
|
166
|
+
v-if="cinemaAreaList !== null && curQueryTab === 'filter'"
|
|
165
167
|
:list="cinemaAreaList"
|
|
166
168
|
@onConfirm="handleQueryFilter"
|
|
167
169
|
></xd-query-filter>
|
|
@@ -229,6 +231,7 @@
|
|
|
229
231
|
</template>
|
|
230
232
|
</view>
|
|
231
233
|
<!--cinema-->
|
|
234
|
+
<view class="hasNoData" v-if="dataList && dataList.length > 0 && pageToken === ''">已经到底没有更多数据了</view>
|
|
232
235
|
</view>
|
|
233
236
|
<template v-else>
|
|
234
237
|
<view
|
|
@@ -273,24 +276,33 @@
|
|
|
273
276
|
data() {
|
|
274
277
|
return {
|
|
275
278
|
options: {},
|
|
276
|
-
hideMask: true,
|
|
279
|
+
//hideMask: true,
|
|
277
280
|
type:'', //hot rightnow
|
|
278
281
|
typeList:{hot:{label: '热映影片', value: 'hot'},list:{label: '影院列表', value: 'list'}, rightnow:{label: '即将上映', value: 'rightnow'}},
|
|
279
282
|
showTypeListData:null,
|
|
280
283
|
backgroundColor:'',
|
|
281
284
|
isPreview: false,
|
|
282
285
|
pageToken:'1',
|
|
283
|
-
pageSize:
|
|
286
|
+
pageSize: 20,
|
|
284
287
|
total: null,
|
|
285
288
|
isFirstLoadingData: false,
|
|
286
289
|
dataList:null,
|
|
287
290
|
cinemaOrgDataList:null,
|
|
288
291
|
cinemaAreaList:null,
|
|
292
|
+
sort_consume_mode:'',//获取影院数据排序
|
|
293
|
+
sortUserList:null,
|
|
294
|
+
|
|
289
295
|
|
|
290
296
|
//filter
|
|
291
297
|
showQueryModal:false,
|
|
292
|
-
curQueryTab:'
|
|
293
|
-
sort:'
|
|
298
|
+
curQueryTab:'',
|
|
299
|
+
sort:'',
|
|
300
|
+
sortName:'排序',
|
|
301
|
+
sortCode:'default',
|
|
302
|
+
|
|
303
|
+
//区域
|
|
304
|
+
areaCode:'all',
|
|
305
|
+
areaName:'区域筛选',
|
|
294
306
|
|
|
295
307
|
//广告
|
|
296
308
|
posterList:null,
|
|
@@ -325,13 +337,23 @@
|
|
|
325
337
|
contBorder:'0',
|
|
326
338
|
contShadow:'0 0 10rpx rgba(0,0,0,.05)',
|
|
327
339
|
contBgColor:'#fff',
|
|
328
|
-
imgRradius:'10'
|
|
340
|
+
imgRradius:'10',
|
|
341
|
+
|
|
342
|
+
//链接
|
|
343
|
+
onlinePath:'',
|
|
344
|
+
codePath:'',
|
|
345
|
+
cashierPath:'',
|
|
346
|
+
|
|
347
|
+
buyPath:'',
|
|
348
|
+
fimeDetailPath:'',
|
|
349
|
+
|
|
329
350
|
|
|
330
351
|
}
|
|
331
352
|
},
|
|
332
353
|
computed:{
|
|
333
354
|
...mapState({
|
|
334
|
-
stateCity: state => state.cityLocation.city
|
|
355
|
+
stateCity: state => state.cityLocation.city,
|
|
356
|
+
stateLocation: (state) => state.cityLocation.location || {},
|
|
335
357
|
}),
|
|
336
358
|
|
|
337
359
|
dotStyleData(){
|
|
@@ -415,13 +437,13 @@
|
|
|
415
437
|
},
|
|
416
438
|
stateCity(n, o){
|
|
417
439
|
if(n && JSON.stringify(n) !== JSON.stringify(o)){
|
|
440
|
+
this.clearDataVar()
|
|
418
441
|
this.getList();
|
|
419
442
|
}
|
|
420
443
|
},
|
|
421
444
|
showTypeListData(){
|
|
422
445
|
if(this.type === '') return;
|
|
423
|
-
this.
|
|
424
|
-
this.pageToken = '1';
|
|
446
|
+
this.clearDataVar();
|
|
425
447
|
this.getList();
|
|
426
448
|
},
|
|
427
449
|
},
|
|
@@ -431,48 +453,111 @@
|
|
|
431
453
|
this.init(this.container);
|
|
432
454
|
},
|
|
433
455
|
methods: {
|
|
456
|
+
clearDataVar(){
|
|
457
|
+
this.dataList = null;
|
|
458
|
+
this.pageToken = '1';
|
|
459
|
+
this.areaCode = 'all'
|
|
460
|
+
this.areaName ='区域筛选';
|
|
461
|
+
this.sortName = '排序'
|
|
462
|
+
this.sortCode = 'default'
|
|
463
|
+
this.cinemaOrgDataList = null;
|
|
464
|
+
},
|
|
465
|
+
getSortList(){
|
|
466
|
+
jfbRootExec('getTFKSortList', {
|
|
467
|
+
vm: this,
|
|
468
|
+
data:{}
|
|
469
|
+
}).then(res => {
|
|
470
|
+
this.sortUserList = res['cinema_customer_sort'];
|
|
471
|
+
debugger
|
|
472
|
+
}).catch(err=>{
|
|
473
|
+
console.error(err);
|
|
474
|
+
})
|
|
475
|
+
|
|
476
|
+
},
|
|
477
|
+
|
|
434
478
|
//影片列表
|
|
435
479
|
handleFilmDetail(film_id){
|
|
480
|
+
console.warn(`toFilmInfo(影片详情).${film_id}`)
|
|
481
|
+
if(!this.fimeDetailPath) {
|
|
482
|
+
console.error('未配置链接');
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
436
485
|
if( this.isPreview) return;
|
|
437
486
|
this.$xdUniHelper.navigateTo({
|
|
438
487
|
url: this.fimeDetailPath + `?film_id=${film_id}`
|
|
439
488
|
})
|
|
440
489
|
},
|
|
441
490
|
handleBuy(film_id){
|
|
491
|
+
console.warn(`toBuyChooseCinema(选择影院).${film_id}`)
|
|
492
|
+
if(!this.buyPath) {
|
|
493
|
+
console.error('未配置链接');
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
442
496
|
if( this.isPreview) return;
|
|
443
497
|
this.$xdUniHelper.navigateTo({
|
|
444
498
|
url: this.buyPath + `?film_id=${film_id}`
|
|
445
499
|
})
|
|
446
500
|
},
|
|
447
501
|
//影片列表
|
|
502
|
+
|
|
448
503
|
//影院列表
|
|
449
504
|
handleSchedule(item){
|
|
450
|
-
|
|
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
|
+
});
|
|
451
514
|
},
|
|
452
515
|
handleCodeDetail(item){
|
|
453
|
-
|
|
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
|
+
});
|
|
454
525
|
},
|
|
455
526
|
handleCashierDetail(item){
|
|
456
|
-
|
|
527
|
+
//todo
|
|
457
528
|
},
|
|
458
|
-
handleQuerySort(sortData){
|
|
459
|
-
console.log("handleQuerySort", sortData);
|
|
460
|
-
setTimeout(()=>{
|
|
461
|
-
this.curQueryTab = '';
|
|
462
|
-
},500)
|
|
463
529
|
|
|
464
|
-
},
|
|
465
530
|
handleFilterTab(tab){
|
|
466
531
|
if(tab === this.curQueryTab ) {
|
|
467
532
|
this.curQueryTab = ''
|
|
468
533
|
}
|
|
469
534
|
else this.curQueryTab = tab
|
|
470
535
|
},
|
|
536
|
+
|
|
537
|
+
handleQuerySort(sortData){
|
|
538
|
+
this.sortCode = sortData.value;
|
|
539
|
+
this.sortName = sortData.label;
|
|
540
|
+
this.pageToken = '1';
|
|
541
|
+
this.dataList = null;
|
|
542
|
+
this.cinemaOrgDataList = null;
|
|
543
|
+
this.getList();
|
|
544
|
+
|
|
545
|
+
//等待排序规则
|
|
546
|
+
setTimeout(()=>{
|
|
547
|
+
this.curQueryTab = '';
|
|
548
|
+
},200)
|
|
549
|
+
|
|
550
|
+
},
|
|
551
|
+
|
|
471
552
|
handleQueryFilter(sortData){
|
|
472
|
-
|
|
553
|
+
this.areaCode = sortData.area_code;
|
|
554
|
+
this.areaName = sortData.area_name;
|
|
555
|
+
this.pageToken = '1';
|
|
556
|
+
this.dataList = null;
|
|
557
|
+
this.getList();
|
|
473
558
|
setTimeout(()=>{
|
|
474
559
|
this.curQueryTab = '';
|
|
475
|
-
},
|
|
560
|
+
},200)
|
|
476
561
|
|
|
477
562
|
},
|
|
478
563
|
handleClose(){
|
|
@@ -483,16 +568,63 @@
|
|
|
483
568
|
|
|
484
569
|
|
|
485
570
|
handleClick(){
|
|
486
|
-
|
|
571
|
+
//todo
|
|
487
572
|
},
|
|
573
|
+
|
|
488
574
|
handleAnimationfinish(e){
|
|
489
575
|
this.current = e.detail.current;
|
|
490
576
|
},
|
|
577
|
+
|
|
491
578
|
getCinemaOrgData(){
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
579
|
+
let fitlerData = this.$xdUniHelper.cloneDeep(this.cinemaOrgDataList||[])
|
|
580
|
+
|
|
581
|
+
//非全域处理
|
|
582
|
+
if(this.areaCode !== 'all') {
|
|
583
|
+
fitlerData = fitlerData.filter(item=>{
|
|
584
|
+
return item.area_code === this.areaCode;
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
//添加测试数据
|
|
589
|
+
// "NODE_ENV": "development",
|
|
590
|
+
// #ifdef H5
|
|
591
|
+
if(window.location.href.indexOf('filter=1') !== -1
|
|
592
|
+
|| this.$configProject.NODE_ENV === 'development'
|
|
593
|
+
) {
|
|
594
|
+
fitlerData = fitlerData.map((item,index)=>{
|
|
595
|
+
return {
|
|
596
|
+
...item,
|
|
597
|
+
cinema_name: `${item.cinema_name}-${index+1}`,
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
//#endif
|
|
602
|
+
|
|
603
|
+
console.log(`fitlerData:`,fitlerData)
|
|
604
|
+
console.warn(`fitlerData.length=${fitlerData.length}`)
|
|
605
|
+
|
|
606
|
+
//过滤之后不够分页直接返回值
|
|
607
|
+
if(fitlerData.length <= this.pageSize) {
|
|
608
|
+
this.dataList = this.$xdUniHelper.cloneDeep(fitlerData);
|
|
609
|
+
this.pageToken = ''
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
let list = this.$xdUniHelper.getLocalPaginationData(
|
|
614
|
+
fitlerData, this.pageToken, this.pageSize
|
|
615
|
+
);
|
|
616
|
+
|
|
617
|
+
//分页完成的数据为0
|
|
618
|
+
if(list.length === 0) {
|
|
619
|
+
this.pageToken = ''
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
this.dataList = (this.dataList||[]).concat(this.$xdUniHelper.cloneDeep(list));
|
|
624
|
+
if(this.pageSize < list.length) this.pageToken = '';
|
|
625
|
+
else this.pageToken = (Number(this.pageToken)+1) + '';
|
|
495
626
|
},
|
|
627
|
+
|
|
496
628
|
handleTab(value){
|
|
497
629
|
if(value === this.type) return;
|
|
498
630
|
this.type = value;
|
|
@@ -502,8 +634,8 @@
|
|
|
502
634
|
},
|
|
503
635
|
|
|
504
636
|
getList(){
|
|
505
|
-
let fName = '
|
|
506
|
-
if(this.type === 'rightnow') fName = '
|
|
637
|
+
let fName = 'getTFKListFilmHotList';
|
|
638
|
+
if(this.type === 'rightnow') fName = 'getTFKListFilmRightnowList';
|
|
507
639
|
if(this.type === 'list') fName = 'getTFKCinemaList';
|
|
508
640
|
|
|
509
641
|
if(this.isFirstLoadingData) this.$xdShowLoading({});
|
|
@@ -511,26 +643,64 @@
|
|
|
511
643
|
this.isFirstLoadingData = true;
|
|
512
644
|
}
|
|
513
645
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
646
|
+
let params = {
|
|
647
|
+
city_code: this.stateCity.city_code,
|
|
648
|
+
type: this.type,
|
|
649
|
+
page_token: this.pageToken,
|
|
650
|
+
page_size: this.pageSize
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
//影院参数
|
|
654
|
+
if(this.type === 'list') {
|
|
655
|
+
//有数据直接进行数据分页
|
|
656
|
+
if(this.cinemaOrgDataList !== null) {
|
|
657
|
+
this.getCinemaOrgData();
|
|
658
|
+
this.$xdHideLoading({});
|
|
659
|
+
return
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
params = {
|
|
517
663
|
city_code: this.stateCity.city_code,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
664
|
+
latitude: this.stateLocation.latitude,
|
|
665
|
+
longitude: this.stateLocation.longitude,
|
|
666
|
+
sort_consume_mode: this.sort_consume_mode || '',
|
|
667
|
+
sort_custom:this.sortCode
|
|
521
668
|
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
jfbRootExec(fName, {
|
|
674
|
+
vm: this,
|
|
675
|
+
data:params
|
|
522
676
|
}).then(res => {
|
|
677
|
+
if(this.isFirstLoadingData) this.$xdHideLoading({});
|
|
678
|
+
|
|
523
679
|
//影片列表处理
|
|
524
680
|
if(this.type === 'rightnow' || this.type==='hot'){
|
|
525
681
|
this.dataList = (this.dataList||[]).concat(res['list']);
|
|
682
|
+
this.pageToken = res.next_page_token;
|
|
683
|
+
return;
|
|
526
684
|
}
|
|
685
|
+
|
|
527
686
|
//影院列表处理
|
|
528
687
|
if(this.type === 'list') {
|
|
688
|
+
//res['list'].splice(0, 31);
|
|
529
689
|
this.cinemaOrgDataList = res['list'];
|
|
530
|
-
this.cinemaAreaList = res['area_list'];
|
|
690
|
+
this.cinemaAreaList = [{area_code:'all', area_name:'全城'}].concat(res['area_list']);
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
//小于数量页面显示记录
|
|
694
|
+
if(res['list'].length <= this.pageSize) {
|
|
695
|
+
this.dataList = res['list'];
|
|
696
|
+
this.pageToken = '';
|
|
697
|
+
return
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
//正常处理
|
|
531
701
|
this.getCinemaOrgData();
|
|
532
702
|
}
|
|
533
|
-
|
|
703
|
+
|
|
534
704
|
}).catch(e=>{
|
|
535
705
|
console.error(e);
|
|
536
706
|
this.$xdHideLoading({});
|
|
@@ -561,6 +731,8 @@
|
|
|
561
731
|
console.error(err);
|
|
562
732
|
})
|
|
563
733
|
|
|
734
|
+
this.getSortList();
|
|
735
|
+
|
|
564
736
|
},
|
|
565
737
|
|
|
566
738
|
/**
|
|
@@ -600,12 +772,25 @@
|
|
|
600
772
|
this.showHotName = getContainerPropsValue(container, 'content.showHotName', '');
|
|
601
773
|
this.showRightnowName = getContainerPropsValue(container, 'content.showRightnowName', '');
|
|
602
774
|
this.showListName = getContainerPropsValue(container, 'content.showListName', '');
|
|
603
|
-
|
|
775
|
+
|
|
604
776
|
|
|
605
777
|
this.poster = getContainerPropsValue(container, 'content.poster',{});
|
|
606
778
|
this.posterNum = getContainerPropsValue(container, 'content.posterNum',1);
|
|
779
|
+
this.sort_consume_mode = getContainerPropsValue(container, 'content.sort_consume_mode', '');
|
|
780
|
+
this.isList = getContainerPropsValue(container, 'content.isList', 'N');
|
|
781
|
+
|
|
782
|
+
//链接(影院)
|
|
783
|
+
this.onlinePath = getContainerPropsValue(container, 'content.onlinePath', {value:''}).value;
|
|
784
|
+
|
|
785
|
+
//链接(影片)
|
|
786
|
+
this.buyPath = getContainerPropsValue(container, 'content.buyPath', {value: ""}).value;
|
|
787
|
+
this.fimeDetailPath = getContainerPropsValue(container, 'content.fimeDetailPath', {value: ""}).value;
|
|
788
|
+
|
|
789
|
+
//初始化数据
|
|
790
|
+
this.setShowTypeList();
|
|
607
791
|
},
|
|
608
|
-
|
|
792
|
+
|
|
793
|
+
setShowTypeList(){
|
|
609
794
|
let list = [];
|
|
610
795
|
if(this.showHot === 'Y') list.push(this.typeList["hot"]);
|
|
611
796
|
if(this.showList === 'Y') list.push(this.typeList["list"]);
|
|
@@ -616,21 +801,19 @@
|
|
|
616
801
|
if(item.value === 'rightnow') item.label = this.showRightnowName || item.label;
|
|
617
802
|
return item
|
|
618
803
|
})
|
|
619
|
-
|
|
620
|
-
|
|
804
|
+
|
|
805
|
+
//已有选中值不设置默认值
|
|
806
|
+
if(this.type === '' && list.length > 0) {
|
|
807
|
+
this.type = list[0].value;
|
|
808
|
+
}
|
|
621
809
|
this.showTypeListData = list;
|
|
622
810
|
},
|
|
623
811
|
|
|
624
812
|
onJfbReachBottom(options) {
|
|
625
|
-
|
|
813
|
+
if(!this.pageToken) return false;
|
|
814
|
+
this.getList();
|
|
626
815
|
},
|
|
627
816
|
|
|
628
|
-
onJfbShow(options) {
|
|
629
|
-
this.getList()
|
|
630
|
-
},
|
|
631
|
-
onJfbHide(options) {
|
|
632
|
-
console.log('event.onJfbHide', options)
|
|
633
|
-
},
|
|
634
817
|
onJfbBack(options) {
|
|
635
818
|
if(this.isList === 'Y') {
|
|
636
819
|
this.$xdUniHelper.navigateBack();
|
|
@@ -806,6 +989,7 @@
|
|
|
806
989
|
align-items: center;
|
|
807
990
|
height: 100rpx;
|
|
808
991
|
background: #fff;
|
|
992
|
+
font-size: 28rpx;
|
|
809
993
|
|
|
810
994
|
& > view {
|
|
811
995
|
flex: 1;
|
|
@@ -836,5 +1020,15 @@
|
|
|
836
1020
|
text-align: center;
|
|
837
1021
|
font-size: 26rpx;
|
|
838
1022
|
}
|
|
1023
|
+
|
|
1024
|
+
.hasNoData {
|
|
1025
|
+
height: 80rpx;
|
|
1026
|
+
line-height: 80rpx;
|
|
1027
|
+
font-size: 24rpx;
|
|
1028
|
+
text-align: center;
|
|
1029
|
+
color: #ccc;
|
|
1030
|
+
background-color: rgba(255, 255, 255, .05);
|
|
1031
|
+
margin: 20rpx 0
|
|
1032
|
+
}
|
|
839
1033
|
}
|
|
840
1034
|
</style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<view class="filter_wrap">
|
|
4
4
|
<view v-for="item in list" @click.stop="onConfirm(item)" :key="item.area_code" class="filter_item">
|
|
5
5
|
<view>{{item.area_name}}</view>
|
|
6
|
-
<view>{{item.cinema_count}}</view>
|
|
6
|
+
<view v-if="item.area_code !== 'all'">{{item.cinema_count}}</view>
|
|
7
7
|
</view>
|
|
8
8
|
</view>
|
|
9
9
|
</view>
|
|
@@ -21,40 +21,7 @@ export default {
|
|
|
21
21
|
list: {
|
|
22
22
|
type: Array,
|
|
23
23
|
default: function(){
|
|
24
|
-
return [
|
|
25
|
-
{
|
|
26
|
-
title: "品牌",
|
|
27
|
-
options: [
|
|
28
|
-
{label: "味多美", value: "1"},
|
|
29
|
-
{label: "好丽友", value: "2"},
|
|
30
|
-
{label: "达利园", value: "3"},
|
|
31
|
-
{label: "徐福记", value: "4"},
|
|
32
|
-
{label: "三只松鼠", value: "5"},
|
|
33
|
-
{label: "鸿一", value: "6"},
|
|
34
|
-
{label: "稻香村", value: "7"},
|
|
35
|
-
{label: "港荣", value: "8"},
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
title: "尺寸",
|
|
40
|
-
options: [
|
|
41
|
-
{label: "≤4英寸", value: "size-1"},
|
|
42
|
-
{label: "6英寸", value: "size-2"},
|
|
43
|
-
{label: "8英寸", value: "size-3"},
|
|
44
|
-
{label: "10英寸", value: "size-4"},
|
|
45
|
-
{label: "12英寸", value: "size-5"},
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: "适用场景",
|
|
50
|
-
options: [
|
|
51
|
-
{label: "生日", value: "scene-1"},
|
|
52
|
-
{label: "下午茶", value: "scene-2"},
|
|
53
|
-
{label: "聚会", value: "scene-3"},
|
|
54
|
-
{label: "婚庆", value: "scene-4"},
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
]
|
|
24
|
+
return []
|
|
58
25
|
}
|
|
59
26
|
},
|
|
60
27
|
},
|
|
@@ -70,7 +37,6 @@ export default {
|
|
|
70
37
|
},
|
|
71
38
|
|
|
72
39
|
methods: {
|
|
73
|
-
|
|
74
40
|
onConfirm(item){
|
|
75
41
|
this.$emit("onConfirm", item);
|
|
76
42
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<view class="x-line"></view>
|
|
18
18
|
<view
|
|
19
19
|
class="tfk-recommend"
|
|
20
|
-
v-if="
|
|
20
|
+
v-if="showTypeListData.length > 0"
|
|
21
21
|
:style="{
|
|
22
22
|
padding: outSpacing + 'rpx',
|
|
23
23
|
backgroundImage:bgImageComp
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<view
|
|
42
42
|
@click="handleTab(item.value)"
|
|
43
43
|
:class="{active: type === item.value}"
|
|
44
|
-
v-for="(item,index) in
|
|
44
|
+
v-for="(item,index) in showTypeListData"
|
|
45
45
|
:key="index"
|
|
46
46
|
>{{item.label}}<text v-if="type === item.value" :style="{backgroundColor:mainColor}"></text></view>
|
|
47
47
|
</view>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<view
|
|
54
54
|
@click="handleTab(item.value)"
|
|
55
55
|
:class="{active: type === item.value}"
|
|
56
|
-
v-for="(item,index) in
|
|
56
|
+
v-for="(item,index) in showTypeListData"
|
|
57
57
|
:key="index"
|
|
58
58
|
:style="{
|
|
59
59
|
backgroundColor: type === item.value? titleTextActBgColor: titleTextBgColor,
|
|
@@ -103,9 +103,7 @@
|
|
|
103
103
|
class="tfk-scroll-item"
|
|
104
104
|
v-for="item in dataList"
|
|
105
105
|
:key="item.id"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}"
|
|
106
|
+
@click="toFilmInfo(item.id)"
|
|
109
107
|
>
|
|
110
108
|
<view class="tfk-scroll-item-image" :style="{borderRadius:contItemRradius + 'rpx'}">
|
|
111
109
|
<image :src="item.poster" :alt="item.show_name" mode="scaleToFill"></image>
|
|
@@ -118,13 +116,13 @@
|
|
|
118
116
|
type="primary"
|
|
119
117
|
style="display:block;"
|
|
120
118
|
size="mini"
|
|
121
|
-
@click="toBuyChooseCinema(item.id)">购票</xd-button>
|
|
119
|
+
@click.stop="toBuyChooseCinema(item.id)">购票</xd-button>
|
|
122
120
|
<xd-button
|
|
123
121
|
v-else-if="item.show_button === '2'"
|
|
124
122
|
type="subPrimary"
|
|
125
123
|
style="display:block;"
|
|
126
124
|
size="mini"
|
|
127
|
-
@click="toBuyChooseCinema(item.id)">预售</xd-button>
|
|
125
|
+
@click.stop="toBuyChooseCinema(item.id)">预售</xd-button>
|
|
128
126
|
</template>
|
|
129
127
|
<template v-else>
|
|
130
128
|
<xd-button
|
|
@@ -132,14 +130,14 @@
|
|
|
132
130
|
type="success"
|
|
133
131
|
style="display:block;"
|
|
134
132
|
size="mini"
|
|
135
|
-
@click="toFilmInfo(item.id)"
|
|
133
|
+
@click.stop="toFilmInfo(item.id)"
|
|
136
134
|
>想看</xd-button>
|
|
137
135
|
<xd-button
|
|
138
136
|
v-else-if="item.show_button === '2'"
|
|
139
137
|
type="subPrimary"
|
|
140
138
|
style="display:block;"
|
|
141
139
|
size="mini"
|
|
142
|
-
@click="toBuyChooseCinema(item.id)">预售</xd-button>
|
|
140
|
+
@click.stop="toBuyChooseCinema(item.id)">预售</xd-button>
|
|
143
141
|
</template>
|
|
144
142
|
</view>
|
|
145
143
|
</view>
|
|
@@ -191,7 +189,7 @@
|
|
|
191
189
|
pageSize: '20',
|
|
192
190
|
total: null,
|
|
193
191
|
dataList:null,
|
|
194
|
-
|
|
192
|
+
showTypeListData:[],
|
|
195
193
|
|
|
196
194
|
//基础配置
|
|
197
195
|
outSpacing:'',
|
|
@@ -273,22 +271,6 @@
|
|
|
273
271
|
else return '0 0 0 rgba(0,0,0,0)';
|
|
274
272
|
},
|
|
275
273
|
|
|
276
|
-
showTypeList(){
|
|
277
|
-
let list = [];
|
|
278
|
-
if(this.showHot === 'Y') list.push(this.typeList["hot"]);
|
|
279
|
-
if(this.showRightnow === 'Y') list.push(this.typeList["rightnow"]);
|
|
280
|
-
list = this.$xdUniHelper.cloneDeep(list).map(item=>{
|
|
281
|
-
if(item.value === 'hot') item.label = this.showHotName ||item.label
|
|
282
|
-
if(item.value === 'rightnow') item.label = this.showRightnowName || item.label;
|
|
283
|
-
return item
|
|
284
|
-
})
|
|
285
|
-
if(list.length > 0){
|
|
286
|
-
this.type = list[0].value;
|
|
287
|
-
}
|
|
288
|
-
else this.type = '';
|
|
289
|
-
return list;
|
|
290
|
-
},
|
|
291
|
-
|
|
292
274
|
|
|
293
275
|
titleMarginComp(){
|
|
294
276
|
let str = `${this.checkValue(this.titleMargin.top, 20)}rpx`;
|
|
@@ -297,6 +279,7 @@
|
|
|
297
279
|
str = `${str} ${this.checkValue(this.titleMargin.left, 20)}rpx`;
|
|
298
280
|
return str
|
|
299
281
|
},
|
|
282
|
+
|
|
300
283
|
contPaddingComp(){
|
|
301
284
|
let str = `${this.checkValue(this.contMargin.top, 20)}rpx`;
|
|
302
285
|
str = `${str} ${this.checkValue(this.contMargin.right, 20)}rpx`;
|
|
@@ -312,6 +295,7 @@
|
|
|
312
295
|
},
|
|
313
296
|
stateCity(n, o){
|
|
314
297
|
if(n && JSON.stringify(n) !== JSON.stringify(o)){
|
|
298
|
+
this.dataList = null;
|
|
315
299
|
this.getList();
|
|
316
300
|
}
|
|
317
301
|
},
|
|
@@ -323,17 +307,27 @@
|
|
|
323
307
|
created() {
|
|
324
308
|
this.isPreview = this.$configProject.isPreview;
|
|
325
309
|
this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
326
|
-
this.init(this.container);
|
|
310
|
+
this.init(this.container, true);
|
|
327
311
|
},
|
|
328
312
|
methods: {
|
|
329
313
|
toFilmInfo(film_id){
|
|
314
|
+
console.warn(`toFilmInfo(影片详情).${film_id}`)
|
|
315
|
+
if(!this.fimeDetailPath) {
|
|
316
|
+
console.error('未配置链接');
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
330
319
|
if( this.isPreview) return;
|
|
331
320
|
this.$xdUniHelper.navigateTo({
|
|
332
321
|
url: this.fimeDetailPath + `?film_id=${film_id}`
|
|
333
322
|
})
|
|
334
323
|
},
|
|
335
324
|
toBuyChooseCinema(film_id){
|
|
336
|
-
|
|
325
|
+
console.warn(`toBuyChooseCinema(选择影院).${film_id}`)
|
|
326
|
+
if(!this.buyPath) {
|
|
327
|
+
console.error('未配置链接');
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if(this.isPreview) return;
|
|
337
331
|
this.$xdUniHelper.navigateTo({
|
|
338
332
|
url: this.buyPath + `?film_id=${film_id}`
|
|
339
333
|
})
|
|
@@ -346,6 +340,11 @@
|
|
|
346
340
|
},
|
|
347
341
|
|
|
348
342
|
handleMore(){
|
|
343
|
+
console.warn('handleMore')
|
|
344
|
+
if(!this.fimeListPath) {
|
|
345
|
+
console.error('未配置链接');
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
349
348
|
if( this.isPreview) return;
|
|
350
349
|
this.$xdUniHelper.navigateTo({
|
|
351
350
|
url: this.fimeListPath
|
|
@@ -362,7 +361,6 @@
|
|
|
362
361
|
if(!this.isFirstLoadingData){
|
|
363
362
|
this.isFirstLoadingData = true;
|
|
364
363
|
}
|
|
365
|
-
|
|
366
364
|
jfbRootExec(fName, {
|
|
367
365
|
vm: this,
|
|
368
366
|
data: {
|
|
@@ -430,21 +428,36 @@
|
|
|
430
428
|
this.isContShadowColor = getContainerPropsValue(container, 'content.isContShadowColor', '#eee');
|
|
431
429
|
|
|
432
430
|
//链接
|
|
433
|
-
this.buyPath = getContainerPropsValue(container, 'content.buyPath', {value: ""});
|
|
434
|
-
this.fimeDetailPath = getContainerPropsValue(container, 'content.fimeDetailPath', {value: ""});
|
|
435
|
-
this.fimeListPath = getContainerPropsValue(container, 'content.fimeListPath', {value: ""});
|
|
431
|
+
this.buyPath = getContainerPropsValue(container, 'content.buyPath', {value: ""}).value;
|
|
432
|
+
this.fimeDetailPath = getContainerPropsValue(container, 'content.fimeDetailPath', {value: ""}).value;
|
|
433
|
+
this.fimeListPath = getContainerPropsValue(container, 'content.fimeListPath', {value: ""}).value;
|
|
436
434
|
|
|
437
|
-
|
|
435
|
+
//设置标签
|
|
436
|
+
this.setShowTypeList();
|
|
438
437
|
|
|
439
|
-
onJfbShow(options) {
|
|
440
|
-
this.getList();
|
|
441
438
|
},
|
|
442
439
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
440
|
+
setShowTypeList(){
|
|
441
|
+
let list = [];
|
|
442
|
+
if(this.showHot === 'Y') list.push(this.typeList["hot"]);
|
|
443
|
+
if(this.showRightnow === 'Y') list.push(this.typeList["rightnow"]);
|
|
444
|
+
list = this.$xdUniHelper.cloneDeep(list).map(item=>{
|
|
445
|
+
if(item.value === 'hot') item.label = this.showHotName ||item.label
|
|
446
|
+
if(item.value === 'rightnow') item.label = this.showRightnowName || item.label;
|
|
447
|
+
return item
|
|
448
|
+
});
|
|
446
449
|
|
|
450
|
+
//已有选中值不设置默认值
|
|
451
|
+
if(this.type === '') {
|
|
452
|
+
if(list.length > 0){
|
|
453
|
+
this.type = list[0].value;
|
|
454
|
+
}
|
|
455
|
+
else this.type = '';
|
|
456
|
+
}
|
|
457
|
+
this.showTypeListData = this.$xdUniHelper.cloneDeep(list);
|
|
458
|
+
this.getList();
|
|
447
459
|
},
|
|
460
|
+
|
|
448
461
|
}
|
|
449
462
|
}
|
|
450
463
|
|
|
@@ -574,6 +587,7 @@
|
|
|
574
587
|
margin-top: 16rpx;
|
|
575
588
|
text-align: center;
|
|
576
589
|
line-height: 40rpx;
|
|
590
|
+
font-size: 28rpx;
|
|
577
591
|
.uni-one-cut(40)
|
|
578
592
|
}
|
|
579
593
|
|