jufubao-base 1.0.157-beta4 → 1.0.157-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/JfbBaseBack/JfbBaseBack.vue +6 -7
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +7 -1
- package/src/components/JfbBaseEntry/Attr.js +0 -22
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +13 -76
- package/src/components/JfbBaseNotice/Attr.js +2 -0
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +8 -7
- package/src/components/JfbBasePoster/JfbBasePoster.vue +18 -117
- package/src/components/JfbBasePoster/MoreScreen.vue +37 -154
- package/src/components/JfbBasePosterBigSmall/Attr.js +4 -1
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +42 -183
- package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +20 -89
- package/src/components/JfbBasePosterType/FourScreen.vue +18 -155
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +35 -0
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +7 -8
- package/src/components/JfbBaseVideo/XdVideo.vue +4 -0
|
@@ -37,54 +37,8 @@
|
|
|
37
37
|
field="content_name"
|
|
38
38
|
:mode="config.mode"
|
|
39
39
|
:dots-styles="config.dotStyleData"
|
|
40
|
-
:style="{height: (getHeight) + 'px'
|
|
40
|
+
:style="{height: (getHeight) + 'px'}"
|
|
41
41
|
>
|
|
42
|
-
<!--#ifdef MP-WEIXIN-->
|
|
43
|
-
<swiper
|
|
44
|
-
class="swiper xd-swiper-content"
|
|
45
|
-
:style="{width: '100%', height: getHeight + 'px'}"
|
|
46
|
-
:indicator-dots="false"
|
|
47
|
-
:autoplay="config.carouselTime > 0"
|
|
48
|
-
:interval="config.carouselTime"
|
|
49
|
-
:duration="500"
|
|
50
|
-
:current="current"
|
|
51
|
-
circular
|
|
52
|
-
@animationfinish="handleAnimationfinish"
|
|
53
|
-
>
|
|
54
|
-
<swiper-item
|
|
55
|
-
v-for="(item,index) in list"
|
|
56
|
-
:key="index"
|
|
57
|
-
:style="{width: '100%', height: getHeight + 'px'}"
|
|
58
|
-
>
|
|
59
|
-
<view
|
|
60
|
-
class="sreen__box-list"
|
|
61
|
-
:class="{
|
|
62
|
-
cell4: config.cells === 4,
|
|
63
|
-
cell5: config.cells === 5,
|
|
64
|
-
}"
|
|
65
|
-
:style="{ height: getHeight + 'px'}"
|
|
66
|
-
>
|
|
67
|
-
<view
|
|
68
|
-
v-for="it in item"
|
|
69
|
-
:key="it['content_id']"
|
|
70
|
-
:style="{height: boxHeight + 'px'}"
|
|
71
|
-
@click="handleClick(it)"
|
|
72
|
-
>
|
|
73
|
-
<view :style="{ height: height + 'px'}">
|
|
74
|
-
<view :style="{
|
|
75
|
-
borderRadius: config.radius + 'rpx',
|
|
76
|
-
boxShadow: config.shadow === 1? `0 0 10rpx rgba(0, 0, 0, .5)` : '',
|
|
77
|
-
}">
|
|
78
|
-
<image :src="it.image_url"></image>
|
|
79
|
-
</view>
|
|
80
|
-
</view>
|
|
81
|
-
<view v-if="it['content_name']" :style="{color: config.textColor}">{{it['content_name']}}</view>
|
|
82
|
-
</view>
|
|
83
|
-
</view>
|
|
84
|
-
</swiper-item>
|
|
85
|
-
</swiper>
|
|
86
|
-
<!--#endif-->
|
|
87
|
-
<!--#ifdef H5-->
|
|
88
42
|
<xd-swiper
|
|
89
43
|
:indicator-dots="false"
|
|
90
44
|
:interval="config.carouselTime"
|
|
@@ -127,7 +81,6 @@
|
|
|
127
81
|
</view>
|
|
128
82
|
</template>
|
|
129
83
|
</xd-swiper>
|
|
130
|
-
<!--#endif-->
|
|
131
84
|
</xd-swiper-dot>
|
|
132
85
|
</view>
|
|
133
86
|
</view>
|
|
@@ -162,22 +115,12 @@
|
|
|
162
115
|
padding: 0,
|
|
163
116
|
status: false,
|
|
164
117
|
list: [],
|
|
165
|
-
filterContentList:[],
|
|
166
118
|
isPreview: false,
|
|
167
119
|
current: 0,
|
|
168
120
|
}
|
|
169
121
|
},
|
|
170
122
|
computed:{
|
|
171
123
|
getHeight() {
|
|
172
|
-
let len = this.filterContentList.length
|
|
173
|
-
//不足一行数量,设置高度
|
|
174
|
-
if(len > 0 && len <= this.config.cells * 1){
|
|
175
|
-
return this.height + this.rpxText
|
|
176
|
-
}
|
|
177
|
-
//不足二行数量,设置高度
|
|
178
|
-
if(len > this.config.cells && len <= this.config.cells * 2 && this.config.jdRows >=2){
|
|
179
|
-
return this.height * 2 + this.rpxText * 2
|
|
180
|
-
}
|
|
181
124
|
return this.height * this.config.jdRows + this.rpxText * this.config.jdRows;
|
|
182
125
|
},
|
|
183
126
|
rpxText(){
|
|
@@ -204,65 +147,6 @@
|
|
|
204
147
|
handleAnimationfinish(e) {
|
|
205
148
|
this.current = e.detail.current;
|
|
206
149
|
},
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* @description 过滤不可以用
|
|
210
|
-
* 当前项目未H5时,过滤所有小程序应用
|
|
211
|
-
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
212
|
-
* 站外地址直接返回
|
|
213
|
-
* 站内地址未选值直接返回
|
|
214
|
-
* 预览模式全过
|
|
215
|
-
*/
|
|
216
|
-
filterItem(){
|
|
217
|
-
let content = this.content.filter(item=>{
|
|
218
|
-
//预览模式
|
|
219
|
-
if( this.$configProject.isPreview) return true;
|
|
220
|
-
|
|
221
|
-
//非内部应用
|
|
222
|
-
if(item.redirect_type !== 'INN') return true
|
|
223
|
-
|
|
224
|
-
//没有配置链接
|
|
225
|
-
if(!item.redirect_data) return true;
|
|
226
|
-
|
|
227
|
-
//内部应用
|
|
228
|
-
else {
|
|
229
|
-
let redirect_data;
|
|
230
|
-
try {
|
|
231
|
-
redirect_data = JSON.parse(item.redirect_data);
|
|
232
|
-
if(!item['app_type']) item['app_type']= 'h5';
|
|
233
|
-
|
|
234
|
-
//#ifdef H5
|
|
235
|
-
return item['app_type'] !== 'wxmp';
|
|
236
|
-
//#endif
|
|
237
|
-
|
|
238
|
-
//#ifdef MP-WEIXIN
|
|
239
|
-
let actDir = this.$parent.projectAttr.deploy_dir;
|
|
240
|
-
let dir = this.getPathDir(redirect_data.page);
|
|
241
|
-
if(item['app_type'] === 'wxmp'){
|
|
242
|
-
return actDir === dir;
|
|
243
|
-
}
|
|
244
|
-
else if(item['app_type'] === 'h5') return true;
|
|
245
|
-
else return true
|
|
246
|
-
//#endif
|
|
247
|
-
}
|
|
248
|
-
catch (e) {
|
|
249
|
-
return true
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
console.warn(`PostTypeLists:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
254
|
-
this.filterContentList = this.$xdUniHelper.checkVarType(content);
|
|
255
|
-
return content;
|
|
256
|
-
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
getPathDir(pathDir){
|
|
260
|
-
if(pathDir.indexOf('@site_domain@/') === 0) {
|
|
261
|
-
return pathDir.replace('@site_domain@/','').split('/')[0]
|
|
262
|
-
}
|
|
263
|
-
return ''
|
|
264
|
-
},
|
|
265
|
-
|
|
266
150
|
init() {
|
|
267
151
|
if (this.timer) clearTimeout(this.timer);
|
|
268
152
|
this.timer = setTimeout(() => {
|
|
@@ -270,22 +154,19 @@
|
|
|
270
154
|
this.height = this.config.height;
|
|
271
155
|
this.padding = 0;
|
|
272
156
|
|
|
273
|
-
//过滤不可以用
|
|
274
|
-
const content = this.filterItem();
|
|
275
|
-
|
|
276
157
|
//静态图显示
|
|
277
158
|
if(this.config.isCarousel === false) {
|
|
278
|
-
this.list = content.filter((item,index)=>{
|
|
159
|
+
this.list = this.content.filter((item,index)=>{
|
|
279
160
|
return index < (this.config.cells * this.config.jdRows);
|
|
280
161
|
})
|
|
281
162
|
}
|
|
282
163
|
//轮播图显示
|
|
283
164
|
else {
|
|
284
165
|
let num = this.config.cells * this.config.jdRows;
|
|
285
|
-
let maxPage = Math.ceil(content.length / num);
|
|
166
|
+
let maxPage = Math.ceil(this.content.length / num);
|
|
286
167
|
let arr = [];
|
|
287
168
|
for(let i =1 ; i <= maxPage; i++) {
|
|
288
|
-
arr.push(this.$xdUniHelper.getLocalPaginationData(content, i, num))
|
|
169
|
+
arr.push(this.$xdUniHelper.getLocalPaginationData(this.content, i, num))
|
|
289
170
|
}
|
|
290
171
|
this.list = arr;
|
|
291
172
|
}
|
|
@@ -293,28 +174,19 @@
|
|
|
293
174
|
|
|
294
175
|
}, 100)
|
|
295
176
|
},
|
|
296
|
-
|
|
297
177
|
handleClick(item) {
|
|
298
|
-
|
|
299
|
-
console.warn(`未配置链接地址: ${item.redirect_data}`);
|
|
300
|
-
console.error(`未配置链接地址: ${item.redirect_data}`);
|
|
301
|
-
return
|
|
302
|
-
}
|
|
303
|
-
|
|
178
|
+
debugger
|
|
304
179
|
//内部链接跳转地址
|
|
305
180
|
if (item.redirect_type === 'INN') {
|
|
306
181
|
try {
|
|
307
182
|
let url = JSON.parse(item.redirect_data);
|
|
308
183
|
let params = '';
|
|
309
|
-
if(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
console.error(`应用链接配置错误: ${url.page}`)
|
|
315
|
-
}
|
|
184
|
+
if (item['redirect_params']) params = `?${item['redirect_params']}`;
|
|
185
|
+
this.$xdUniHelper.navigateTo({
|
|
186
|
+
url: url.page + params
|
|
187
|
+
})
|
|
316
188
|
} catch (e) {
|
|
317
|
-
console.error(
|
|
189
|
+
console.error(e)
|
|
318
190
|
}
|
|
319
191
|
}
|
|
320
192
|
|
|
@@ -324,32 +196,29 @@
|
|
|
324
196
|
//#ifdef MP-WEIXIN
|
|
325
197
|
try {
|
|
326
198
|
let url = JSON.parse(item.redirect_data);
|
|
327
|
-
if (reg.test(url.url)) {
|
|
199
|
+
if (reg.test(url.url) && this.$configProject.extras.webview) {
|
|
328
200
|
console.warn(`广告跳转外站: ${url.url}`)
|
|
329
|
-
this.$xdUniHelper.navigateTo(
|
|
201
|
+
this.$xdUniHelper.navigateTo({
|
|
202
|
+
url: `${this.$configProject.extras.webview}?seatUrl=${Base64.encodeURI(url.url)}`
|
|
203
|
+
});
|
|
330
204
|
} else {
|
|
331
|
-
|
|
205
|
+
throw Error('地址错误')
|
|
332
206
|
}
|
|
333
207
|
} catch (e) {
|
|
334
|
-
console.error(
|
|
208
|
+
console.error(e)
|
|
335
209
|
}
|
|
336
210
|
//#endif
|
|
337
211
|
//#ifdef H5
|
|
338
212
|
try {
|
|
339
213
|
let url = JSON.parse(item.redirect_data);
|
|
340
214
|
console.warn(`广告跳转外站: ${url.url}`);
|
|
341
|
-
this.$xdUniHelper.
|
|
215
|
+
this.$xdUniHelper.navigateTo(url)
|
|
342
216
|
} catch (e) {
|
|
343
|
-
console.error(
|
|
217
|
+
console.error(e)
|
|
344
218
|
}
|
|
345
219
|
//#endif
|
|
346
220
|
|
|
347
221
|
}
|
|
348
|
-
|
|
349
|
-
//无跳转地址
|
|
350
|
-
if(item.redirect_type === 'EMP') {
|
|
351
|
-
console.warn(`无跳转地址`);
|
|
352
|
-
}
|
|
353
222
|
},
|
|
354
223
|
}
|
|
355
224
|
}
|
|
@@ -358,7 +227,6 @@
|
|
|
358
227
|
<style scoped lang="less">
|
|
359
228
|
.sreen {
|
|
360
229
|
width: calc(100% + 2px); /**防止宽度不够问**/
|
|
361
|
-
height: 100%;
|
|
362
230
|
position: relative;
|
|
363
231
|
|
|
364
232
|
& .carousel-mask {
|
|
@@ -373,7 +241,6 @@
|
|
|
373
241
|
|
|
374
242
|
&__box.notCarousel {
|
|
375
243
|
width: 100%;
|
|
376
|
-
height: 100%;
|
|
377
244
|
display: flex;
|
|
378
245
|
justify-content: flex-start;
|
|
379
246
|
align-items: flex-start;
|
|
@@ -466,8 +333,6 @@
|
|
|
466
333
|
}
|
|
467
334
|
|
|
468
335
|
&__box.carousel {
|
|
469
|
-
width: 100%;
|
|
470
|
-
height: 100%;
|
|
471
336
|
display: flex;
|
|
472
337
|
justify-content: flex-start;
|
|
473
338
|
align-items: flex-start;
|
|
@@ -476,8 +341,6 @@
|
|
|
476
341
|
}
|
|
477
342
|
|
|
478
343
|
& .sreen__box-list {
|
|
479
|
-
width: 100%;
|
|
480
|
-
height: 100%;
|
|
481
344
|
display: flex;
|
|
482
345
|
justify-content: flex-start;
|
|
483
346
|
align-items: flex-start;
|
|
@@ -131,6 +131,41 @@
|
|
|
131
131
|
handleAnimationfinish(e) {
|
|
132
132
|
this.current = e.detail.current;
|
|
133
133
|
},
|
|
134
|
+
handleClick(item, index){
|
|
135
|
+
this.current = index;
|
|
136
|
+
const handle = (data) => {
|
|
137
|
+
try {
|
|
138
|
+
return JSON.parse(data);
|
|
139
|
+
} catch (e) {
|
|
140
|
+
return {}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
if(this.$configProject.isPreview) {
|
|
144
|
+
console.log(item)
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
if (item['redirect_type'] === 'EMP') return;
|
|
148
|
+
let url = '';
|
|
149
|
+
|
|
150
|
+
if (item['redirect_type'] === 'URL') {
|
|
151
|
+
url = handle(item['redirect_data']).url || ''
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (item['redirect_type'] === 'INN') {
|
|
155
|
+
url = handle(item['redirect_data']).page || ''
|
|
156
|
+
}
|
|
157
|
+
if (item['redirect_type'] === 'APP') {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (url === '') {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if(url.indexOf('?') === -1) url = `${url}?vs=${new Date().getTime()}`;
|
|
165
|
+
else url = `${url}&vs=${new Date().getTime()}`;
|
|
166
|
+
this.$xdUniHelper.navigateTo({url})
|
|
167
|
+
}
|
|
168
|
+
},
|
|
134
169
|
handleImage(list){
|
|
135
170
|
return list.map(item => {
|
|
136
171
|
return {
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
<view class="jfb-base-video__body">
|
|
17
17
|
<view class="x-line"></view>
|
|
18
18
|
<view
|
|
19
|
-
v-if="isShow"
|
|
20
19
|
class="x-video"
|
|
21
20
|
:style="{
|
|
22
21
|
backgroundColor:bgColor,
|
|
@@ -27,13 +26,15 @@
|
|
|
27
26
|
height:contentHeight + 'rpx'
|
|
28
27
|
}"
|
|
29
28
|
>
|
|
29
|
+
|
|
30
30
|
<xd-video
|
|
31
31
|
v-if="video !== null && video !== ''"
|
|
32
32
|
:key="videoKey"
|
|
33
33
|
:poster="videoSetting"
|
|
34
34
|
:video="video"
|
|
35
|
+
:pack-this="$vm"
|
|
35
36
|
></xd-video>
|
|
36
|
-
<view class="not-video" v-if="
|
|
37
|
+
<view class="not-video" v-if="video === ''">
|
|
37
38
|
<image :src="getVideoSrc"></image>
|
|
38
39
|
</view>
|
|
39
40
|
</view>
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
mixins: [componentsMixins,extsMixins,JfbBaseVideoMixin],
|
|
60
61
|
data() {
|
|
61
62
|
return {
|
|
62
|
-
|
|
63
|
+
selfMask: true,
|
|
63
64
|
page_size: 1,
|
|
64
65
|
options:{},
|
|
65
66
|
|
|
@@ -72,14 +73,11 @@
|
|
|
72
73
|
width:750,
|
|
73
74
|
bgColor:'',
|
|
74
75
|
radius:0,
|
|
75
|
-
|
|
76
|
+
$vm: {},
|
|
77
|
+
videoKey : Date.now()
|
|
76
78
|
}
|
|
77
79
|
},
|
|
78
80
|
computed: {
|
|
79
|
-
isShow(){
|
|
80
|
-
if(this.isPreview) return true;
|
|
81
|
-
else return this.video
|
|
82
|
-
},
|
|
83
81
|
iconFont(){
|
|
84
82
|
if(this.autoplay === 'N') return 'iconplayright'
|
|
85
83
|
if(this.autoplay === 'E') return 'iconshibai';
|
|
@@ -128,6 +126,7 @@
|
|
|
128
126
|
}
|
|
129
127
|
},
|
|
130
128
|
created() {
|
|
129
|
+
this.$vm = this;
|
|
131
130
|
this.isPreview = this.$configProject.isPreview;
|
|
132
131
|
this.init(this.container);
|
|
133
132
|
},
|