jufubao-base 1.0.65 → 1.0.66-beta2
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/JfbBasePoster/JfbBasePoster.vue +3 -2
- package/src/components/JfbBasePoster/MoreScreen.vue +19 -21
- package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +16 -15
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +4 -1
- package/src/components/JfbBaseVideo/XdVideo.vue +1 -1
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<!--一分屏-->
|
|
24
24
|
<template v-if="posterType === '1'">
|
|
25
25
|
<view
|
|
26
|
-
v-if="isCarousel ===
|
|
26
|
+
v-if="isCarousel === 1"
|
|
27
27
|
class="jfb-base-poster__one notCarousel"
|
|
28
28
|
:style="{
|
|
29
29
|
width: width + 'rpx',
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
posterPosition: null,
|
|
127
127
|
posterType: '1',//分屏模式
|
|
128
128
|
showType: '', //广告显示方式
|
|
129
|
-
isCarousel:
|
|
129
|
+
isCarousel: 1, //是否轮播图
|
|
130
130
|
carouselTime: 5,//轮播图轮播周期
|
|
131
131
|
useNumber: null, //广告使用张数
|
|
132
132
|
height: 0, //广告高度
|
|
@@ -412,6 +412,7 @@
|
|
|
412
412
|
this.mS = getContainerPropsValue(container, 'content.margin', this.getDefualtValue('margin'));
|
|
413
413
|
|
|
414
414
|
//content
|
|
415
|
+
|
|
415
416
|
this.mode = getContainerPropsValue(container, 'content.dot_type', 'dot');
|
|
416
417
|
this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
|
|
417
418
|
this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime', 5)) * 1000;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view class="sreen">
|
|
3
3
|
<view
|
|
4
4
|
class="sreen__box notCarousel"
|
|
5
|
-
v-if="config.isCarousel ===
|
|
5
|
+
v-if="config.isCarousel === 1"
|
|
6
6
|
>
|
|
7
7
|
<view
|
|
8
8
|
v-for="(item,index) in list"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
></image>
|
|
27
27
|
</view>
|
|
28
28
|
</view>
|
|
29
|
-
<view class="sreen__box carousel" v-
|
|
29
|
+
<view class="sreen__box carousel" v-else>
|
|
30
30
|
<xd-swiper-dot
|
|
31
31
|
:current="current"
|
|
32
32
|
:info="list"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
<script>
|
|
79
79
|
import XdSwiperDot from "./XdSwiperDot";
|
|
80
80
|
import XdSwiper from "@/components/XdSwiper/XdSwiper";
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
export default {
|
|
83
83
|
components:{
|
|
84
84
|
XdSwiperDot,
|
|
@@ -116,13 +116,13 @@
|
|
|
116
116
|
},
|
|
117
117
|
},
|
|
118
118
|
watch: {
|
|
119
|
-
config() {
|
|
119
|
+
config(value) {
|
|
120
120
|
this.init()
|
|
121
121
|
},
|
|
122
122
|
content() {
|
|
123
123
|
this.init();
|
|
124
124
|
},
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
},
|
|
127
127
|
created() {
|
|
128
128
|
this.isPreview = this.$configProject.isPreview;
|
|
@@ -138,14 +138,14 @@
|
|
|
138
138
|
this.width = Number(this.config.width);
|
|
139
139
|
this.height = Number(this.config.height);
|
|
140
140
|
this.padding = Number(this.config.padding);
|
|
141
|
-
|
|
141
|
+
|
|
142
142
|
//静态图显示
|
|
143
|
-
if(this.config.isCarousel ===
|
|
143
|
+
if(this.config.isCarousel === 1) {
|
|
144
144
|
this.list = this.content
|
|
145
145
|
}
|
|
146
146
|
//轮播图显示
|
|
147
147
|
else {
|
|
148
|
-
let num =
|
|
148
|
+
let num = this.config.cell * this.config.rows;
|
|
149
149
|
let maxPage = Math.ceil(this.content.length / num);
|
|
150
150
|
let arr = [];
|
|
151
151
|
for(let i =1 ; i <= maxPage; i++) {
|
|
@@ -153,8 +153,6 @@
|
|
|
153
153
|
}
|
|
154
154
|
this.list = arr;
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
156
|
}, 100)
|
|
159
157
|
},
|
|
160
158
|
handleClick(item) {
|
|
@@ -214,7 +212,7 @@
|
|
|
214
212
|
.sreen {
|
|
215
213
|
width: calc(100% + 4px); /**防止宽度不够问**/
|
|
216
214
|
position: relative;
|
|
217
|
-
|
|
215
|
+
|
|
218
216
|
& .carousel-mask {
|
|
219
217
|
position: absolute;
|
|
220
218
|
left: 0;
|
|
@@ -223,7 +221,7 @@
|
|
|
223
221
|
bottom: 0;
|
|
224
222
|
background: rgba(0, 0, 0, 0);
|
|
225
223
|
}
|
|
226
|
-
|
|
224
|
+
|
|
227
225
|
&__box.notCarousel {
|
|
228
226
|
display: flex;
|
|
229
227
|
justify-content: flex-start;
|
|
@@ -231,7 +229,7 @@
|
|
|
231
229
|
flex-wrap: wrap;
|
|
232
230
|
overflow: hidden;
|
|
233
231
|
width: calc(100% + 20px); /**防止宽度不够问**/
|
|
234
|
-
|
|
232
|
+
|
|
235
233
|
& > view {
|
|
236
234
|
display: flex;
|
|
237
235
|
justify-content: center;
|
|
@@ -241,7 +239,7 @@
|
|
|
241
239
|
overflow: hidden;
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
|
-
|
|
242
|
+
|
|
245
243
|
&__box.carousel {
|
|
246
244
|
display: flex;
|
|
247
245
|
justify-content: flex-start;
|
|
@@ -249,7 +247,7 @@
|
|
|
249
247
|
flex-wrap: wrap;
|
|
250
248
|
overflow: hidden;
|
|
251
249
|
}
|
|
252
|
-
|
|
250
|
+
|
|
253
251
|
& .sreen__box-list {
|
|
254
252
|
width: calc(100% + 20px); /**防止宽度不够问**/
|
|
255
253
|
display: flex;
|
|
@@ -257,7 +255,7 @@
|
|
|
257
255
|
align-items: flex-start;
|
|
258
256
|
flex-wrap: wrap;
|
|
259
257
|
overflow: hidden;
|
|
260
|
-
|
|
258
|
+
|
|
261
259
|
& view {
|
|
262
260
|
display: flex;
|
|
263
261
|
justify-content: center;
|
|
@@ -265,17 +263,17 @@
|
|
|
265
263
|
flex-shrink: 0;
|
|
266
264
|
box-sizing: border-box;
|
|
267
265
|
overflow: hidden;
|
|
268
|
-
|
|
266
|
+
|
|
269
267
|
&:nth-child(4n) {
|
|
270
268
|
margin-right: 0 !important;
|
|
271
269
|
}
|
|
272
|
-
|
|
270
|
+
|
|
273
271
|
& > image {
|
|
274
|
-
|
|
272
|
+
|
|
275
273
|
}
|
|
276
274
|
}
|
|
277
275
|
}
|
|
278
276
|
}
|
|
279
|
-
|
|
280
|
-
|
|
277
|
+
|
|
278
|
+
|
|
281
279
|
</style>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
></image>
|
|
42
42
|
</view>
|
|
43
43
|
</view>
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
</view>
|
|
46
46
|
</view>
|
|
47
47
|
</template>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
return {
|
|
66
66
|
noData: false,
|
|
67
67
|
entry: null,
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
//style
|
|
70
70
|
type:'1',
|
|
71
71
|
width: 0,
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
right: 0
|
|
81
81
|
},
|
|
82
82
|
list: [],
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
//测试数据
|
|
85
85
|
test: {
|
|
86
86
|
"content_id": "KpBbUKdj4aBejwe7Fh1ki",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
console.error(e)
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
//外部链接
|
|
151
151
|
if(item.redirect_type === 'URL') {
|
|
152
152
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
@@ -179,9 +179,10 @@
|
|
|
179
179
|
console.error(e)
|
|
180
180
|
}
|
|
181
181
|
//#endif
|
|
182
|
-
|
|
182
|
+
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
+
|
|
185
186
|
getTestData() {
|
|
186
187
|
let temp = [];
|
|
187
188
|
for (let i = 0; i < this.useNumber; i++) {
|
|
@@ -193,7 +194,7 @@
|
|
|
193
194
|
}
|
|
194
195
|
return temp
|
|
195
196
|
},
|
|
196
|
-
|
|
197
|
+
|
|
197
198
|
onJfbLoad(options) {
|
|
198
199
|
this.params = options;
|
|
199
200
|
jfbRootExec('getListPosterContent', {
|
|
@@ -209,7 +210,7 @@
|
|
|
209
210
|
if (res.list.length === 0 && this.$configProject.isPreview) {
|
|
210
211
|
res.list = this.getTestData();
|
|
211
212
|
}
|
|
212
|
-
|
|
213
|
+
|
|
213
214
|
let list = res.list.map(item=>{
|
|
214
215
|
return {
|
|
215
216
|
...item,
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
typeEmpty: true
|
|
223
224
|
})
|
|
224
225
|
}
|
|
225
|
-
|
|
226
|
+
|
|
226
227
|
this.list = list;
|
|
227
228
|
this.noData = this.list.length === 0;
|
|
228
229
|
})
|
|
@@ -239,7 +240,7 @@
|
|
|
239
240
|
this.radius = getContainerPropsValue(container, 'content.radius', '0');
|
|
240
241
|
this.padding = getContainerPropsValue(container, 'content.padding', '0');
|
|
241
242
|
this.margin = getContainerPropsValue(container, 'content.margin', { top: 0, bottom: 0, left: 0, right: 0});
|
|
242
|
-
|
|
243
|
+
|
|
243
244
|
this.entry = getContainerPropsValue(container, 'content.entry', null);
|
|
244
245
|
if(this.entry !== null) {
|
|
245
246
|
this.width = this.entry.size.width;
|
|
@@ -247,11 +248,11 @@
|
|
|
247
248
|
this.type = this.entry.type;
|
|
248
249
|
}
|
|
249
250
|
},
|
|
250
|
-
|
|
251
|
+
|
|
251
252
|
onJfbUpdate() {
|
|
252
253
|
this.onJfbLoad(this.params)
|
|
253
254
|
},
|
|
254
|
-
|
|
255
|
+
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
258
|
|
|
@@ -267,26 +268,26 @@
|
|
|
267
268
|
display: flex;
|
|
268
269
|
align-items: center;
|
|
269
270
|
flex-wrap: wrap;
|
|
270
|
-
|
|
271
|
+
|
|
271
272
|
& > view {
|
|
272
273
|
overflow: hidden;
|
|
273
274
|
display: flex;
|
|
274
275
|
justify-content: center;
|
|
275
276
|
align-items: center;
|
|
276
|
-
|
|
277
|
+
|
|
277
278
|
& > image {
|
|
278
279
|
width: 100%;
|
|
279
280
|
height: auto;
|
|
280
281
|
}
|
|
281
282
|
}
|
|
282
|
-
|
|
283
|
+
|
|
283
284
|
&.one {
|
|
284
285
|
justify-content: center;
|
|
285
286
|
& > view:first-child {
|
|
286
287
|
margin-top: 0!important;
|
|
287
288
|
}
|
|
288
289
|
}
|
|
289
|
-
|
|
290
|
+
|
|
290
291
|
&.two {
|
|
291
292
|
justify-content: center;
|
|
292
293
|
& > view:nth-child(1), & > view:nth-child(2){
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<view class="float"></view>
|
|
18
18
|
<view class="video" v-if="video !== null">
|
|
19
19
|
<xd-video
|
|
20
|
+
:key="videoKey"
|
|
20
21
|
:margin="margin"
|
|
21
22
|
:poster="videoSetting"
|
|
22
23
|
:video="video"
|
|
@@ -55,7 +56,8 @@
|
|
|
55
56
|
videoSetting: null,
|
|
56
57
|
margin:{},
|
|
57
58
|
radius:0,
|
|
58
|
-
$vm: {}
|
|
59
|
+
$vm: {},
|
|
60
|
+
videoKey : Date.now()
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
computed: {
|
|
@@ -125,6 +127,7 @@
|
|
|
125
127
|
if(res && res.list && res.list.length > 0) {
|
|
126
128
|
this.video = res.list[0];
|
|
127
129
|
}
|
|
130
|
+
this.videoKey = Date.now()
|
|
128
131
|
})
|
|
129
132
|
.catch(error => {
|
|
130
133
|
this.$xdLog.catch(error)
|