jufubao-movie 1.0.69 → 1.0.70-beta1
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
CHANGED
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
</view>
|
|
35
35
|
</view>
|
|
36
36
|
<view v-if="loadingFilm" class="ticket_notice skeleton-wrap"></view>
|
|
37
|
-
<view
|
|
37
|
+
<view
|
|
38
|
+
v-else-if="notice"
|
|
39
|
+
class="ticket_notice"
|
|
40
|
+
:style="{
|
|
38
41
|
background: noticeBgColor,
|
|
39
42
|
color: mainColorview
|
|
40
43
|
}">
|
|
@@ -101,6 +104,7 @@
|
|
|
101
104
|
</view>
|
|
102
105
|
</view>
|
|
103
106
|
<view class="schedule_wrap">
|
|
107
|
+
<!--排期日期列表-->
|
|
104
108
|
<view v-if="loadingList" class="schedule_date skeleton-wrap">
|
|
105
109
|
<scroll-view class="tab-scroll" scroll-x>
|
|
106
110
|
<view class="tab_box">
|
|
@@ -116,9 +120,13 @@
|
|
|
116
120
|
:scroll-into-view="toView"
|
|
117
121
|
>
|
|
118
122
|
<view class="tab_box">
|
|
119
|
-
<view
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
<view
|
|
124
|
+
v-for="dd in scheduleTabList"
|
|
125
|
+
:key="dd.key"
|
|
126
|
+
class="_date"
|
|
127
|
+
:id="`toView-${dd.index}`"
|
|
128
|
+
:class="{active: curTab===dd.index}"
|
|
129
|
+
@click="handleTabDate(dd)"
|
|
122
130
|
>
|
|
123
131
|
<view>{{dd.month}}</view>
|
|
124
132
|
<view>{{dd.week}}</view>
|
|
@@ -133,7 +141,8 @@
|
|
|
133
141
|
:color="warningColor"
|
|
134
142
|
>{{popNoticeReplace}}</xd-notice-bar>
|
|
135
143
|
</view>
|
|
136
|
-
|
|
144
|
+
<!--排期日期列表-->
|
|
145
|
+
<!--排期列表-->
|
|
137
146
|
<view v-if="loadingList" class="schedule_list skeleton-wrap">
|
|
138
147
|
<view class="_item" v-for="ii in 5" :key="ii">
|
|
139
148
|
<view class="flex-sub">
|
|
@@ -175,6 +184,7 @@
|
|
|
175
184
|
</view>
|
|
176
185
|
<view v-else class="empty_data">暂无排期</view>
|
|
177
186
|
</template>
|
|
187
|
+
<!--排期列表-->
|
|
178
188
|
</view>
|
|
179
189
|
</view>
|
|
180
190
|
</view>
|
|
@@ -234,12 +244,8 @@
|
|
|
234
244
|
scheduleTabList: [],
|
|
235
245
|
scheduleList: [],
|
|
236
246
|
curTab: 0,
|
|
237
|
-
toView: null
|
|
238
|
-
list: [
|
|
239
|
-
// {"film_id":581,"show_name_en":"聚福宝-万里归途1","remark":"9.6","show_name":"聚福宝-万里归途1","poster":"https:\/\/p0.pipi.cn\/mmdb\/25bfd6ddb53c7e5015d23c5bc24d876c03d41.jpg?imageMogr2\/thumbnail\/1246x1246%3E","type":"剧情|战争","open_time":1664532000,"show_version_list":"IMAX 2D","language":"汉语普通话","leading_role":"张译 王俊凯 殷桃 成泰燊 张子贤 陈昊宇 王迅 万茜","director":"饶晓志"},
|
|
240
|
-
// {"film_id":582,"show_name_en":"聚福宝-万里归途2","remark":"9.6","show_name":"聚福宝-万里归途2","poster":"https:\/\/p0.pipi.cn\/mmdb\/25bfd6ddb53c7e5015d23c5bc24d876c03d41.jpg?imageMogr2\/thumbnail\/1246x1246%3E","type":"剧情|战争","open_time":1664532000,"show_version_list":"IMAX 2D","language":"汉语普通话","leading_role":"张译 王俊凯 殷桃 成泰燊 张子贤 陈昊宇 王迅 万茜","director":"饶晓志"},
|
|
241
|
-
// {"film_id":583,"show_name_en":"聚福宝-万里归途2","remark":"9.6","show_name":"聚福宝-万里归途3","poster":"https:\/\/p0.pipi.cn\/mmdb\/25bfd6ddb53c7e5015d23c5bc24d876c03d41.jpg?imageMogr2\/thumbnail\/1246x1246%3E","type":"剧情|战争","open_time":1664532000,"show_version_list":"IMAX 2D","language":"汉语普通话","leading_role":"张译 王俊凯 殷桃 成泰燊 张子贤 陈昊宇 王迅 万茜","director":"饶晓志"}
|
|
242
|
-
],
|
|
247
|
+
toView: null,//无功能
|
|
248
|
+
list: [],
|
|
243
249
|
loading: true,
|
|
244
250
|
timer: null,
|
|
245
251
|
cinema_id: "",
|
|
@@ -266,11 +272,7 @@
|
|
|
266
272
|
return this.filmInfo['film_id']
|
|
267
273
|
},
|
|
268
274
|
play_list(){
|
|
269
|
-
|
|
270
|
-
return this.$xdUniHelper.cloneDeep(this.scheduleList)[this.curTab].map(item => {
|
|
271
|
-
// item['sale_price'] = this.$xdUniHelper.divisionFloatNumber(item['sale_price'], 100);
|
|
272
|
-
return item;
|
|
273
|
-
})
|
|
275
|
+
return this.scheduleList;
|
|
274
276
|
},
|
|
275
277
|
filmInfo(){
|
|
276
278
|
if(!this.filmList.length) return {};
|
|
@@ -307,9 +309,8 @@
|
|
|
307
309
|
},
|
|
308
310
|
},
|
|
309
311
|
created() {
|
|
310
|
-
// console.log("layoutInfo.", this.layoutInfo, this.siteMap)
|
|
311
312
|
this.is_plus_site = this.projectAttr.headers['X-Site-Group']==="vip";
|
|
312
|
-
this.is_vip = this
|
|
313
|
+
this.is_vip = this['getTokenForKey']('user_level') && this['getTokenForKey']('user_level')==='VIP'
|
|
313
314
|
this.init(this.container);
|
|
314
315
|
this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
315
316
|
},
|
|
@@ -317,15 +318,16 @@
|
|
|
317
318
|
async onJfbLoad(options) {
|
|
318
319
|
const { cinema_id, film_id } = options;
|
|
319
320
|
this.cinema_id = cinema_id;
|
|
320
|
-
await this.
|
|
321
|
+
await this.getCinemaInfo();
|
|
321
322
|
|
|
322
323
|
//根据options.film_id选中当前的影片
|
|
323
324
|
if(film_id){
|
|
324
|
-
let curIndex = this.list.findIndex(item => item.film_id
|
|
325
|
-
this.curFilmIndex = curIndex
|
|
325
|
+
let curIndex = this.list.findIndex(item => item.film_id === Number(film_id));
|
|
326
|
+
this.curFilmIndex = curIndex === -1 ? 0 : curIndex;
|
|
326
327
|
}
|
|
328
|
+
|
|
327
329
|
this.loading = false;
|
|
328
|
-
this.
|
|
330
|
+
this.getCinemaScheduleData();
|
|
329
331
|
},
|
|
330
332
|
/**
|
|
331
333
|
* @description 监听事件变化
|
|
@@ -346,13 +348,12 @@
|
|
|
346
348
|
toMapNav(){
|
|
347
349
|
const { latitude, longitude, address,cinema_name } = this.cinemaInfo;
|
|
348
350
|
console.warn(`toMapNav: ${JSON.stringify({latitude,longitude,address,cinema_name})}`);
|
|
349
|
-
|
|
350
351
|
this.handleOpenLocation({
|
|
351
352
|
latitude: latitude,
|
|
352
353
|
longitude: longitude,
|
|
353
354
|
name: cinema_name || address,
|
|
354
355
|
address: address
|
|
355
|
-
})
|
|
356
|
+
},()=>{})
|
|
356
357
|
},
|
|
357
358
|
toChooseSeat(scheduleId){
|
|
358
359
|
this.$xdUniHelper.navigateTo({
|
|
@@ -362,23 +363,38 @@
|
|
|
362
363
|
touchStart(index){
|
|
363
364
|
this.$refs.zSwiper.swiper.slideTo(index, 300, false);
|
|
364
365
|
},
|
|
366
|
+
/**
|
|
367
|
+
* @description 切换排期日期菜单
|
|
368
|
+
*/
|
|
369
|
+
handleTabDate(item){
|
|
370
|
+
if(item.index === this.curTab) return;
|
|
371
|
+
this.getCinemaScheduleData(item.value,item.index);
|
|
372
|
+
},
|
|
373
|
+
// #ifdef H5
|
|
365
374
|
onChange(swiper){
|
|
366
|
-
console.log("onChange", swiper.activeIndex)
|
|
367
375
|
this.curFilmIndex = swiper.activeIndex;
|
|
368
|
-
this.
|
|
376
|
+
this.getCinemaScheduleData();
|
|
369
377
|
},
|
|
378
|
+
//#endif
|
|
379
|
+
|
|
380
|
+
// #ifdef MP-WEIXIN
|
|
370
381
|
handleChange(e){
|
|
371
382
|
this.curFilmIndex = e.detail.current;
|
|
372
|
-
this.
|
|
383
|
+
this.getCinemaScheduleData();
|
|
373
384
|
},
|
|
374
|
-
|
|
375
|
-
|
|
385
|
+
//#endif
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @description 获取影片排期
|
|
389
|
+
* @param search_date {string} now=>为首次加载排期接口(此时获取排期时间列表) !now=>值获取影片排期
|
|
390
|
+
* @param tabIndex {number} 选择排期索引值
|
|
391
|
+
* @return {boolean}
|
|
392
|
+
*/
|
|
393
|
+
getCinemaScheduleData(search_date='now',tabIndex = 0){
|
|
376
394
|
const { film_id,cinema_id, un_show_seconds,is_show_overtime_schedule } = this;
|
|
377
|
-
console.log(this.$configProject.isPreview, film_id, '1111')
|
|
378
395
|
if(!this.$configProject.isPreview){
|
|
379
396
|
if(!film_id) return false;
|
|
380
397
|
}
|
|
381
|
-
console.log(this.$configProject.isPreview)
|
|
382
398
|
this.$xdShowLoading({});
|
|
383
399
|
jfbRootExec("getCinemaSchedule", {
|
|
384
400
|
vm: this,
|
|
@@ -386,32 +402,55 @@
|
|
|
386
402
|
film_id,
|
|
387
403
|
cinema_id,
|
|
388
404
|
un_show_seconds,
|
|
389
|
-
is_show_overtime_schedule
|
|
405
|
+
is_show_overtime_schedule,
|
|
406
|
+
search_date: search_date
|
|
390
407
|
}
|
|
391
408
|
}).then(res => {
|
|
392
409
|
this.loadingList = false;
|
|
393
410
|
this.$xdHideLoading();
|
|
394
411
|
this.is_not_show_price = res.is_not_show_price;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
412
|
+
|
|
413
|
+
//首次生产排期日期
|
|
414
|
+
if(search_date === 'now') {
|
|
415
|
+
this.toView = '';
|
|
416
|
+
this.scheduleTabList = res['schedule_date_list'].map((item, index) => {
|
|
417
|
+
let date_name = item.label;
|
|
418
|
+
let week = date_name.match(/星期./)[0];
|
|
419
|
+
let month = date_name.match(/\d+月\d+日/)[0];
|
|
420
|
+
return {
|
|
421
|
+
label: item.label,
|
|
422
|
+
name: item.label,
|
|
423
|
+
value: item.value,
|
|
424
|
+
index,
|
|
425
|
+
week,
|
|
426
|
+
month,
|
|
427
|
+
key: this.$xdUniHelper.randomChar(20)
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
if(this.scheduleTabList.length > 0) {
|
|
431
|
+
setTimeout(()=>{
|
|
432
|
+
this.toView = `toView-${tabIndex}`
|
|
433
|
+
},50)
|
|
404
434
|
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
this.
|
|
435
|
+
}
|
|
436
|
+
//设置数据
|
|
437
|
+
if(res.schedule_data.length > 0) this.scheduleList = res.schedule_data[0].paiqi;
|
|
438
|
+
else this.scheduleList = [];
|
|
439
|
+
this.curTab = tabIndex;
|
|
440
|
+
|
|
408
441
|
}).catch(err => {
|
|
409
442
|
this.$xdHideLoading();
|
|
410
443
|
this.scheduleTabList = [];
|
|
411
444
|
this.scheduleList = [];
|
|
445
|
+
this.curTab = tabIndex;
|
|
412
446
|
})
|
|
413
447
|
},
|
|
414
|
-
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @description 获取影片列表信息
|
|
451
|
+
* @return {Promise<unknown>}
|
|
452
|
+
*/
|
|
453
|
+
getCinemaInfo(){
|
|
415
454
|
return new Promise((resolve, reject) => {
|
|
416
455
|
jfbRootExec("getCinemaFilm", {
|
|
417
456
|
vm: this,
|