jufubao-movie 1.0.36-beta3 → 1.0.36-beta5
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 -58
- package/src/components/JfbMovieTfkFilmList/XdQueryFilter.vue +2 -36
- package/src/components/JfbMovieTfkFilmRecommend/JfbMovieTfkFilmRecommend.vue +53 -39
- package/src/mixins/posterMixins.js +125 -0
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="{
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
circular
|
|
74
74
|
@animationfinish="handleAnimationfinish"
|
|
75
75
|
>
|
|
76
|
-
<swiper-item v-for="(item,index) in posterList" :key="index" @click.stop="
|
|
76
|
+
<swiper-item v-for="(item,index) in posterList" :key="index" @click.stop="handlePosterClick(item,index)">
|
|
77
77
|
<image :style="{width: posterSize.width + 'rpx', height: posterSize.height + 'rpx' }" :src="item['image_url']" mode="aspectFill"></image>
|
|
78
78
|
</swiper-item>
|
|
79
79
|
</swiper>
|
|
@@ -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
|
|
@@ -250,6 +253,7 @@
|
|
|
250
253
|
import getServiceUrl from '@/common/getServiceUrl'
|
|
251
254
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
252
255
|
import extsMixins from "@/mixins/extsMixins";
|
|
256
|
+
import posterMixins from "@/mixins/posterMixins";
|
|
253
257
|
import ContentItem from './ContentItem.vue'
|
|
254
258
|
import ContentCinema from "./ContentCinema.vue";
|
|
255
259
|
import XdQuerySort from "./XdQuerySort.vue";
|
|
@@ -268,29 +272,38 @@
|
|
|
268
272
|
XdQueryFilter
|
|
269
273
|
},
|
|
270
274
|
mixins: [
|
|
271
|
-
componentsMixins, extsMixins, JfbMovieTfkFilmListMixin
|
|
275
|
+
componentsMixins, extsMixins, JfbMovieTfkFilmListMixin,posterMixins
|
|
272
276
|
],
|
|
273
277
|
data() {
|
|
274
278
|
return {
|
|
275
279
|
options: {},
|
|
276
|
-
hideMask: true,
|
|
280
|
+
//hideMask: true,
|
|
277
281
|
type:'', //hot rightnow
|
|
278
282
|
typeList:{hot:{label: '热映影片', value: 'hot'},list:{label: '影院列表', value: 'list'}, rightnow:{label: '即将上映', value: 'rightnow'}},
|
|
279
283
|
showTypeListData:null,
|
|
280
284
|
backgroundColor:'',
|
|
281
285
|
isPreview: false,
|
|
282
286
|
pageToken:'1',
|
|
283
|
-
pageSize:
|
|
287
|
+
pageSize: 20,
|
|
284
288
|
total: null,
|
|
285
289
|
isFirstLoadingData: false,
|
|
286
290
|
dataList:null,
|
|
287
291
|
cinemaOrgDataList:null,
|
|
288
292
|
cinemaAreaList:null,
|
|
293
|
+
sort_consume_mode:'',//获取影院数据排序
|
|
294
|
+
sortUserList:null,
|
|
295
|
+
|
|
289
296
|
|
|
290
297
|
//filter
|
|
291
298
|
showQueryModal:false,
|
|
292
|
-
curQueryTab:'
|
|
293
|
-
sort:'
|
|
299
|
+
curQueryTab:'',
|
|
300
|
+
sort:'',
|
|
301
|
+
sortName:'排序',
|
|
302
|
+
sortCode:'default',
|
|
303
|
+
|
|
304
|
+
//区域
|
|
305
|
+
areaCode:'all',
|
|
306
|
+
areaName:'区域筛选',
|
|
294
307
|
|
|
295
308
|
//广告
|
|
296
309
|
posterList:null,
|
|
@@ -325,13 +338,23 @@
|
|
|
325
338
|
contBorder:'0',
|
|
326
339
|
contShadow:'0 0 10rpx rgba(0,0,0,.05)',
|
|
327
340
|
contBgColor:'#fff',
|
|
328
|
-
imgRradius:'10'
|
|
341
|
+
imgRradius:'10',
|
|
342
|
+
|
|
343
|
+
//链接
|
|
344
|
+
onlinePath:'',
|
|
345
|
+
codePath:'',
|
|
346
|
+
cashierPath:'',
|
|
347
|
+
|
|
348
|
+
buyPath:'',
|
|
349
|
+
fimeDetailPath:'',
|
|
350
|
+
|
|
329
351
|
|
|
330
352
|
}
|
|
331
353
|
},
|
|
332
354
|
computed:{
|
|
333
355
|
...mapState({
|
|
334
|
-
stateCity: state => state.cityLocation.city
|
|
356
|
+
stateCity: state => state.cityLocation.city,
|
|
357
|
+
stateLocation: (state) => state.cityLocation.location || {},
|
|
335
358
|
}),
|
|
336
359
|
|
|
337
360
|
dotStyleData(){
|
|
@@ -415,13 +438,13 @@
|
|
|
415
438
|
},
|
|
416
439
|
stateCity(n, o){
|
|
417
440
|
if(n && JSON.stringify(n) !== JSON.stringify(o)){
|
|
441
|
+
this.clearDataVar()
|
|
418
442
|
this.getList();
|
|
419
443
|
}
|
|
420
444
|
},
|
|
421
445
|
showTypeListData(){
|
|
422
446
|
if(this.type === '') return;
|
|
423
|
-
this.
|
|
424
|
-
this.pageToken = '1';
|
|
447
|
+
this.clearDataVar();
|
|
425
448
|
this.getList();
|
|
426
449
|
},
|
|
427
450
|
},
|
|
@@ -431,36 +454,77 @@
|
|
|
431
454
|
this.init(this.container);
|
|
432
455
|
},
|
|
433
456
|
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
|
+
|
|
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
|
-
|
|
457
|
-
},
|
|
458
|
-
handleQuerySort(sortData){
|
|
459
|
-
console.log("handleQuerySort", sortData);
|
|
460
|
-
setTimeout(()=>{
|
|
461
|
-
this.curQueryTab = '';
|
|
462
|
-
},500)
|
|
463
|
-
|
|
527
|
+
//todo
|
|
464
528
|
},
|
|
465
529
|
handleFilterTab(tab){
|
|
466
530
|
if(tab === this.curQueryTab ) {
|
|
@@ -468,11 +532,29 @@
|
|
|
468
532
|
}
|
|
469
533
|
else this.curQueryTab = tab
|
|
470
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
|
+
},
|
|
471
549
|
handleQueryFilter(sortData){
|
|
472
|
-
|
|
550
|
+
this.areaCode = sortData.area_code;
|
|
551
|
+
this.areaName = sortData.area_name;
|
|
552
|
+
this.pageToken = '1';
|
|
553
|
+
this.dataList = null;
|
|
554
|
+
this.getList();
|
|
473
555
|
setTimeout(()=>{
|
|
474
556
|
this.curQueryTab = '';
|
|
475
|
-
},
|
|
557
|
+
},200)
|
|
476
558
|
|
|
477
559
|
},
|
|
478
560
|
handleClose(){
|
|
@@ -480,19 +562,60 @@
|
|
|
480
562
|
},
|
|
481
563
|
//影院列表
|
|
482
564
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
handleClick(){
|
|
486
|
-
|
|
487
|
-
},
|
|
488
565
|
handleAnimationfinish(e){
|
|
489
566
|
this.current = e.detail.current;
|
|
490
567
|
},
|
|
568
|
+
|
|
491
569
|
getCinemaOrgData(){
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
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) + '';
|
|
495
617
|
},
|
|
618
|
+
|
|
496
619
|
handleTab(value){
|
|
497
620
|
if(value === this.type) return;
|
|
498
621
|
this.type = value;
|
|
@@ -502,8 +625,8 @@
|
|
|
502
625
|
},
|
|
503
626
|
|
|
504
627
|
getList(){
|
|
505
|
-
let fName = '
|
|
506
|
-
if(this.type === 'rightnow') fName = '
|
|
628
|
+
let fName = 'getTFKListFilmHotList';
|
|
629
|
+
if(this.type === 'rightnow') fName = 'getTFKListFilmRightnowList';
|
|
507
630
|
if(this.type === 'list') fName = 'getTFKCinemaList';
|
|
508
631
|
|
|
509
632
|
if(this.isFirstLoadingData) this.$xdShowLoading({});
|
|
@@ -511,26 +634,64 @@
|
|
|
511
634
|
this.isFirstLoadingData = true;
|
|
512
635
|
}
|
|
513
636
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
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 = {
|
|
517
654
|
city_code: this.stateCity.city_code,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
655
|
+
latitude: this.stateLocation.latitude,
|
|
656
|
+
longitude: this.stateLocation.longitude,
|
|
657
|
+
sort_consume_mode: this.sort_consume_mode || '',
|
|
658
|
+
sort_custom:this.sortCode
|
|
521
659
|
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
jfbRootExec(fName, {
|
|
665
|
+
vm: this,
|
|
666
|
+
data:params
|
|
522
667
|
}).then(res => {
|
|
668
|
+
if(this.isFirstLoadingData) this.$xdHideLoading({});
|
|
669
|
+
|
|
523
670
|
//影片列表处理
|
|
524
671
|
if(this.type === 'rightnow' || this.type==='hot'){
|
|
525
672
|
this.dataList = (this.dataList||[]).concat(res['list']);
|
|
673
|
+
this.pageToken = res.next_page_token;
|
|
674
|
+
return;
|
|
526
675
|
}
|
|
676
|
+
|
|
527
677
|
//影院列表处理
|
|
528
678
|
if(this.type === 'list') {
|
|
679
|
+
//res['list'].splice(0, 31);
|
|
529
680
|
this.cinemaOrgDataList = res['list'];
|
|
530
|
-
this.cinemaAreaList = res['area_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
|
+
}
|
|
690
|
+
|
|
691
|
+
//正常处理
|
|
531
692
|
this.getCinemaOrgData();
|
|
532
693
|
}
|
|
533
|
-
|
|
694
|
+
|
|
534
695
|
}).catch(e=>{
|
|
535
696
|
console.error(e);
|
|
536
697
|
this.$xdHideLoading({});
|
|
@@ -549,18 +710,21 @@
|
|
|
549
710
|
},
|
|
550
711
|
})
|
|
551
712
|
.then(res => {
|
|
552
|
-
|
|
713
|
+
let posterList = res.list.map((item,index) => {
|
|
553
714
|
return {
|
|
554
715
|
...item,
|
|
555
716
|
image_background_url: item.image_background_url?getServiceUrl(item.image_background_url):'',
|
|
556
717
|
image_url: item.image_url?getServiceUrl(item.image_url):''
|
|
557
718
|
}
|
|
558
719
|
});
|
|
720
|
+
this.posterList = this.posterFilterNoUseData(posterList);
|
|
559
721
|
})
|
|
560
722
|
.catch(err=>{
|
|
561
723
|
console.error(err);
|
|
562
724
|
})
|
|
563
725
|
|
|
726
|
+
this.getSortList();
|
|
727
|
+
|
|
564
728
|
},
|
|
565
729
|
|
|
566
730
|
/**
|
|
@@ -600,12 +764,25 @@
|
|
|
600
764
|
this.showHotName = getContainerPropsValue(container, 'content.showHotName', '');
|
|
601
765
|
this.showRightnowName = getContainerPropsValue(container, 'content.showRightnowName', '');
|
|
602
766
|
this.showListName = getContainerPropsValue(container, 'content.showListName', '');
|
|
603
|
-
|
|
767
|
+
|
|
604
768
|
|
|
605
769
|
this.poster = getContainerPropsValue(container, 'content.poster',{});
|
|
606
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();
|
|
607
783
|
},
|
|
608
|
-
|
|
784
|
+
|
|
785
|
+
setShowTypeList(){
|
|
609
786
|
let list = [];
|
|
610
787
|
if(this.showHot === 'Y') list.push(this.typeList["hot"]);
|
|
611
788
|
if(this.showList === 'Y') list.push(this.typeList["list"]);
|
|
@@ -616,21 +793,19 @@
|
|
|
616
793
|
if(item.value === 'rightnow') item.label = this.showRightnowName || item.label;
|
|
617
794
|
return item
|
|
618
795
|
})
|
|
619
|
-
|
|
620
|
-
|
|
796
|
+
|
|
797
|
+
//已有选中值不设置默认值
|
|
798
|
+
if(this.type === '' && list.length > 0) {
|
|
799
|
+
this.type = list[0].value;
|
|
800
|
+
}
|
|
621
801
|
this.showTypeListData = list;
|
|
622
802
|
},
|
|
623
803
|
|
|
624
804
|
onJfbReachBottom(options) {
|
|
625
|
-
|
|
805
|
+
if(!this.pageToken) return false;
|
|
806
|
+
this.getList();
|
|
626
807
|
},
|
|
627
808
|
|
|
628
|
-
onJfbShow(options) {
|
|
629
|
-
this.getList()
|
|
630
|
-
},
|
|
631
|
-
onJfbHide(options) {
|
|
632
|
-
console.log('event.onJfbHide', options)
|
|
633
|
-
},
|
|
634
809
|
onJfbBack(options) {
|
|
635
810
|
if(this.isList === 'Y') {
|
|
636
811
|
this.$xdUniHelper.navigateBack();
|
|
@@ -806,6 +981,7 @@
|
|
|
806
981
|
align-items: center;
|
|
807
982
|
height: 100rpx;
|
|
808
983
|
background: #fff;
|
|
984
|
+
font-size: 28rpx;
|
|
809
985
|
|
|
810
986
|
& > view {
|
|
811
987
|
flex: 1;
|
|
@@ -836,5 +1012,15 @@
|
|
|
836
1012
|
text-align: center;
|
|
837
1013
|
font-size: 26rpx;
|
|
838
1014
|
}
|
|
1015
|
+
|
|
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
|
+
}
|
|
839
1025
|
}
|
|
840
1026
|
</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
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
data(){
|
|
5
|
+
|
|
6
|
+
},
|
|
7
|
+
methods:{
|
|
8
|
+
/**
|
|
9
|
+
* @description 过滤不可以用
|
|
10
|
+
* 当前项目未H5时,过滤所有小程序应用
|
|
11
|
+
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
12
|
+
* 站外地址直接返回
|
|
13
|
+
* 站内地址未选值直接返回
|
|
14
|
+
* 预览模式全过
|
|
15
|
+
*/
|
|
16
|
+
posterFilterNoUseData(list = []){
|
|
17
|
+
let content = this.$xdUniHelper.cloneDeep(list).filter(item=>{
|
|
18
|
+
//预览模式
|
|
19
|
+
if( this.$configProject.isPreview) return true;
|
|
20
|
+
|
|
21
|
+
//非内部应用
|
|
22
|
+
if(item.redirect_type !== 'INN') return true
|
|
23
|
+
|
|
24
|
+
//没有配置链接
|
|
25
|
+
if(!item.redirect_data) return true;
|
|
26
|
+
|
|
27
|
+
//内部应用
|
|
28
|
+
else {
|
|
29
|
+
let redirect_data;
|
|
30
|
+
try {
|
|
31
|
+
redirect_data = JSON.parse(item.redirect_data);
|
|
32
|
+
if(!item['app_type']) item['app_type']= 'h5';
|
|
33
|
+
|
|
34
|
+
//#ifdef H5
|
|
35
|
+
return item['app_type'] !== 'wxmp';
|
|
36
|
+
//#endif
|
|
37
|
+
|
|
38
|
+
//#ifdef MP-WEIXIN
|
|
39
|
+
let actDir = this.$parent['projectAttr']['deploy_dir'];
|
|
40
|
+
let dir = this.getPosterPathDir(redirect_data.page);
|
|
41
|
+
if(item['app_type'] === 'wxmp'){
|
|
42
|
+
return actDir === dir;
|
|
43
|
+
}
|
|
44
|
+
else if(item['app_type'] === 'h5') return true;
|
|
45
|
+
else return true
|
|
46
|
+
//#endif
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
return true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
console.warn(`PostersList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
54
|
+
return content;
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
getPosterPathDir(pathDir){
|
|
59
|
+
if(pathDir.indexOf('@site_domain@/') === 0) {
|
|
60
|
+
return pathDir.replace('@site_domain@/','').split('/')[0]
|
|
61
|
+
}
|
|
62
|
+
return ''
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
handlePosterClick(item) {
|
|
66
|
+
if(!item.redirect_data) {
|
|
67
|
+
console.warn(`未配置链接地址: ${item.redirect_data}`);
|
|
68
|
+
console.error(`未配置链接地址: ${item.redirect_data}`);
|
|
69
|
+
return
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//内部链接跳转地址
|
|
73
|
+
if (item.redirect_type === 'INN') {
|
|
74
|
+
try {
|
|
75
|
+
let url = JSON.parse(item.redirect_data);
|
|
76
|
+
let params = '';
|
|
77
|
+
if(url.page) {
|
|
78
|
+
if (item['redirect_params']) params = `?${item['redirect_params']}`;
|
|
79
|
+
this.$xdUniHelper.navigateTo({url: url.page + params})
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.error(`应用链接配置错误: ${url.page}`)
|
|
83
|
+
}
|
|
84
|
+
} catch (e) {
|
|
85
|
+
console.error(`应用链接配置错误: ${item.redirect_data}`)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//外部链接
|
|
90
|
+
if (item.redirect_type === 'URL') {
|
|
91
|
+
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
92
|
+
let spReg = /(-apiuri\/v)/;
|
|
93
|
+
//#ifdef MP-WEIXIN
|
|
94
|
+
try {
|
|
95
|
+
let url = JSON.parse(item.redirect_data);
|
|
96
|
+
if (reg.test(url.url) || spReg.test(url.url)) {
|
|
97
|
+
console.warn(`广告跳转外站: ${url.url}`)
|
|
98
|
+
this.$xdUniHelper.navigateTo(url);
|
|
99
|
+
} else {
|
|
100
|
+
console.error(`广告跳转外站配置错误: ${url.url}`)
|
|
101
|
+
}
|
|
102
|
+
} catch (e) {
|
|
103
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
104
|
+
}
|
|
105
|
+
//#endif
|
|
106
|
+
//#ifdef H5
|
|
107
|
+
try {
|
|
108
|
+
let url = JSON.parse(item.redirect_data);
|
|
109
|
+
console.warn(`广告跳转外站: ${url.url}`);
|
|
110
|
+
this.$xdUniHelper.redirectTo(url, false)
|
|
111
|
+
} catch (e) {
|
|
112
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
113
|
+
}
|
|
114
|
+
//#endif
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
//无跳转地址
|
|
119
|
+
if(item.redirect_type === 'EMP') {
|
|
120
|
+
console.warn(`无跳转地址`);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
|