jufubao-base 1.0.64-beta301 → 1.0.64-beta303
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
|
@@ -47,7 +47,10 @@
|
|
|
47
47
|
autoplay
|
|
48
48
|
>
|
|
49
49
|
<swiper-item v-for="(item) in contentList" :key="item.content_id">
|
|
50
|
-
<view>
|
|
50
|
+
<view class="content-list">
|
|
51
|
+
{{item.title}}
|
|
52
|
+
<text v-if="contentList&&contentList.length>0">{{contentList.length}}个</text>
|
|
53
|
+
</view>
|
|
51
54
|
</swiper-item>
|
|
52
55
|
</swiper>
|
|
53
56
|
<xd-notice-bar v-else :key="speedKey" scrollable :speed="speed" background-color="rgba(0,0,0,0)">
|
|
@@ -395,6 +398,11 @@
|
|
|
395
398
|
|
|
396
399
|
.jfb-base-notice {
|
|
397
400
|
&__body{
|
|
401
|
+
.content-list {
|
|
402
|
+
display: flex;
|
|
403
|
+
justify-content: space-between;
|
|
404
|
+
align-items: center;
|
|
405
|
+
}
|
|
398
406
|
&-line {
|
|
399
407
|
height: 0px;
|
|
400
408
|
overflow: hidden;
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
:current="current"
|
|
65
65
|
:width=" width + 'rpx'"
|
|
66
66
|
:height="height + 'rpx'"
|
|
67
|
+
:interval="carouselTime"
|
|
67
68
|
@onClickItem="handleClick"
|
|
68
69
|
@animationfinish="handleAnimationfinish"
|
|
69
70
|
>
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
import XdSwiper from "@/components/XdSwiper/XdSwiper";
|
|
103
104
|
import MoreScreen from "./MoreScreen";
|
|
104
105
|
import XdSwiperDot from "./XdSwiperDot";
|
|
105
|
-
|
|
106
|
+
|
|
106
107
|
export default {
|
|
107
108
|
name: "JfbBasePoster",
|
|
108
109
|
components: {
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
return {
|
|
118
119
|
selfMask: true,
|
|
119
120
|
params: {},
|
|
120
|
-
|
|
121
|
+
|
|
121
122
|
//Swiper 配置
|
|
122
123
|
mode:'round', //default 、round 、nav 、dot, indexes
|
|
123
124
|
current: 0,
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
},
|
|
146
147
|
isPreview: false,
|
|
147
148
|
noData:false,
|
|
148
|
-
|
|
149
|
+
|
|
149
150
|
test: {
|
|
150
151
|
"content_id": "KpBbUKdj4aBejwe7Fh1ki",
|
|
151
152
|
"position_id": "QCk3PmoyQmOWRP1SxnYR3",
|
|
@@ -205,7 +206,7 @@
|
|
|
205
206
|
dotStyleData(){
|
|
206
207
|
let alpha = 1;
|
|
207
208
|
if(this.posterType === '1') alpha = 0.6;
|
|
208
|
-
|
|
209
|
+
|
|
209
210
|
let selectedColor = `rgba(${color(this.mainColor).alpha(alpha).array().join(',')})`;
|
|
210
211
|
console.log('selectedColor',selectedColor, this.mode, this.posterType);
|
|
211
212
|
let style = {
|
|
@@ -308,11 +309,11 @@
|
|
|
308
309
|
}
|
|
309
310
|
return temp
|
|
310
311
|
},
|
|
311
|
-
handleAnimationfinish(e) {
|
|
312
|
+
handleAnimationfinish(e) {
|
|
312
313
|
this.currentImage = this.info[e.detail.current]['image_background_url']
|
|
313
314
|
if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
|
|
314
315
|
this.$xdRoot.$emit("setLayoutPageBg", this.info[e.detail.current]['image_background_url']);
|
|
315
|
-
}
|
|
316
|
+
}
|
|
316
317
|
this.current = e.detail.current;
|
|
317
318
|
},
|
|
318
319
|
handleClick(item) {
|
|
@@ -368,26 +369,26 @@
|
|
|
368
369
|
return list.map((item,index) => {
|
|
369
370
|
return {
|
|
370
371
|
...item,
|
|
371
|
-
image_background_url: getServiceUrl(item.image_background_url),
|
|
372
|
-
image_url: getServiceUrl(item.image_url)
|
|
372
|
+
image_background_url: item.image_background_url?getServiceUrl(item.image_background_url):'',
|
|
373
|
+
image_url: item.image_url?getServiceUrl(item.image_url):''
|
|
373
374
|
}
|
|
374
375
|
})
|
|
375
376
|
},
|
|
376
377
|
handleOne(list){
|
|
377
378
|
this.info = this.handleImage(list);
|
|
378
379
|
let current = this.current || 0;
|
|
379
|
-
this.currentImage = this.info[current]['image_background_url']
|
|
380
|
+
this.currentImage = this.info[current]['image_background_url']
|
|
380
381
|
if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
|
|
381
382
|
this.$xdRoot.$emit("setLayoutPageBg", this.currentImage);
|
|
382
383
|
}
|
|
383
384
|
},
|
|
384
|
-
|
|
385
|
+
|
|
385
386
|
getDefualtValue(key){
|
|
386
387
|
if (key === 'margin') {
|
|
387
388
|
return {top: 0, bottom: 0, left: 0, right: 0}
|
|
388
389
|
}
|
|
389
390
|
},
|
|
390
|
-
|
|
391
|
+
|
|
391
392
|
/**
|
|
392
393
|
* @description 监听事件变化
|
|
393
394
|
* @param container {object} 业务组件对象自己
|
|
@@ -397,7 +398,7 @@
|
|
|
397
398
|
if (this.poster.type) {
|
|
398
399
|
this.posterType = this.poster.type
|
|
399
400
|
}
|
|
400
|
-
if(this.poster.position) {
|
|
401
|
+
if(this.poster.position) {
|
|
401
402
|
this.posterPosition = this.poster.position
|
|
402
403
|
}
|
|
403
404
|
this.radius = getContainerPropsValue(container, 'content.radius', 0);
|
|
@@ -405,13 +406,13 @@
|
|
|
405
406
|
this.rows = getContainerPropsValue(container, 'content.rows', 1);
|
|
406
407
|
this.isSupport = getContainerPropsValue(container, 'content.isSupport', 'Y');
|
|
407
408
|
this.mS = getContainerPropsValue(container, 'content.margin', this.getDefualtValue('margin'));
|
|
408
|
-
|
|
409
|
+
|
|
409
410
|
//content
|
|
410
411
|
this.mode = getContainerPropsValue(container, 'content.dot_type', 'dot');
|
|
411
412
|
this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
|
|
412
413
|
this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime', 5)) * 1000;
|
|
413
414
|
this.useNumber = getContainerPropsValue(container, 'content.number', 1);
|
|
414
|
-
|
|
415
|
+
|
|
415
416
|
if(this.poster.size) {
|
|
416
417
|
this.width = this.poster.size.width;
|
|
417
418
|
this.height = this.poster.size.height;
|
|
@@ -429,11 +430,11 @@
|
|
|
429
430
|
},
|
|
430
431
|
})
|
|
431
432
|
.then(res => {
|
|
432
|
-
|
|
433
|
+
|
|
433
434
|
if(res.list.length === 0 && this.isPreview) {
|
|
434
435
|
res.list = this.getTestData();
|
|
435
436
|
}
|
|
436
|
-
|
|
437
|
+
|
|
437
438
|
if (this.posterType === '1') this.handleOne(res.list);
|
|
438
439
|
if (this.posterType === '2') this.handleOne(res.list);
|
|
439
440
|
if (this.posterType === '3') this.handleOne(res.list);
|
|
@@ -445,12 +446,22 @@
|
|
|
445
446
|
console.error(error)
|
|
446
447
|
})
|
|
447
448
|
},
|
|
448
|
-
|
|
449
|
+
|
|
450
|
+
destroyed() {
|
|
451
|
+
this.$xdRoot.$emit('setLayoutPageBg',null)
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
onJfbShow(){
|
|
455
|
+
if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
|
|
456
|
+
this.$xdRoot.$emit("setLayoutPageBg", this.currentImage);
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
|
|
449
460
|
onJfbUpdate(data) {
|
|
450
461
|
this.onJfbLoad(this.params);
|
|
451
462
|
}
|
|
452
|
-
|
|
453
|
-
|
|
463
|
+
|
|
464
|
+
|
|
454
465
|
}
|
|
455
466
|
}
|
|
456
467
|
|
|
@@ -474,19 +485,19 @@
|
|
|
474
485
|
justify-content: center;
|
|
475
486
|
align-items: center;
|
|
476
487
|
overflow: hidden;
|
|
477
|
-
|
|
478
|
-
|
|
488
|
+
|
|
489
|
+
|
|
479
490
|
& > view {
|
|
480
491
|
width: 100%;
|
|
481
492
|
height: 100%;
|
|
482
493
|
box-sizing: border-box;
|
|
483
|
-
|
|
494
|
+
|
|
484
495
|
& > image {
|
|
485
|
-
|
|
496
|
+
|
|
486
497
|
}
|
|
487
498
|
}
|
|
488
499
|
}
|
|
489
|
-
|
|
500
|
+
|
|
490
501
|
&__one.carousel {
|
|
491
502
|
position: relative;
|
|
492
503
|
box-sizing: border-box;
|
|
@@ -494,7 +505,7 @@
|
|
|
494
505
|
justify-content: center;
|
|
495
506
|
align-items: center;
|
|
496
507
|
overflow: hidden;
|
|
497
|
-
|
|
508
|
+
|
|
498
509
|
& .carousel-mask {
|
|
499
510
|
position: absolute;
|
|
500
511
|
left: 0;
|
|
@@ -504,6 +515,6 @@
|
|
|
504
515
|
background: rgba(0,0,0,0);
|
|
505
516
|
}
|
|
506
517
|
}
|
|
507
|
-
|
|
518
|
+
|
|
508
519
|
}
|
|
509
520
|
</style>
|