jufubao-base 1.0.159 → 1.0.161
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/common/authorize.js +201 -70
- package/src/components/JfbBaseAddress/JfbBaseAddress.vue +7 -6
- package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +5 -3
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +3 -2
- package/src/components/JfbBaseBack/JfbBaseBack.vue +10 -8
- package/src/components/JfbBaseBackground/JfbBaseBackground.vue +3 -2
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +3 -2
- package/src/components/JfbBaseCard/JfbBaseCard.vue +10 -6
- package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +57 -26
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +14 -15
- package/src/components/JfbBaseCardDetailEntry/Attr.js +22 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +393 -424
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +4 -4
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +7 -9
- package/src/components/JfbBaseCardEntry/Attr.js +22 -1
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +91 -36
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +38 -22
- package/src/components/JfbBaseCardInfoEntry/Attr.js +22 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +285 -260
- package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +4 -3
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +23 -18
- package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +4 -11
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +16 -19
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +3 -2
- package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +34 -18
- package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +14 -14
- package/src/components/JfbBaseCity/JfbBaseCity.vue +3 -2
- package/src/components/JfbBaseClear/JfbBaseClear.vue +3 -2
- package/src/components/JfbBaseConList/JfbBaseConList.vue +4 -4
- package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +3 -2
- package/src/components/JfbBaseEntry/Attr.js +22 -0
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +84 -20
- package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetail.vue +3 -4
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +33 -22
- package/src/components/JfbBaseFastLink/XdFastNav.vue +2 -2
- package/src/components/JfbBaseFooter/JfbBaseFooter.vue +0 -1
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +3 -2
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +28 -11
- package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +7 -9
- package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +9 -6
- package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +19 -5
- package/src/components/JfbBaseMapOverlay/XdMapOverlay.vue +52 -37
- package/src/components/JfbBaseMapSearch/JfbBaseMapSearch.vue +3 -2
- package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCard.vue +28 -27
- package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +5 -5
- package/src/components/JfbBaseMy/JfbBaseMy.vue +3 -3
- package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +6 -4
- package/src/components/JfbBaseNotice/Attr.js +0 -2
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +36 -14
- package/src/components/JfbBaseNotice/XdNoticeBar.vue +17 -1
- package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottom.vue +3 -2
- package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTop.vue +3 -2
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +20 -31
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +9 -4
- package/src/components/JfbBasePay/JfbBasePay.vue +3 -2
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +22 -7
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +23 -7
- package/src/components/JfbBasePoster/JfbBasePoster.vue +118 -18
- package/src/components/JfbBasePoster/MoreScreen.vue +155 -37
- package/src/components/JfbBasePosterBigSmall/Attr.js +2 -5
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +191 -67
- package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +90 -20
- package/src/components/JfbBasePosterType/FourScreen.vue +162 -18
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +0 -35
- package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +4 -4
- package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +3 -4
- package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetail.vue +4 -7
- package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccess.vue +6 -9
- package/src/components/JfbBaseSearch/JfbBaseSearch.vue +3 -2
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +5 -4
- package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +3 -2
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +5 -3
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +4 -3
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +14 -11
- package/src/components/JfbBaseVideo/XdVideo.vue +0 -4
- package/src/components/JfbBaseWallet/JfbBaseWallet.vue +3 -2
- package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetail.vue +5 -8
- package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffective.vue +5 -8
- package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +7 -17
- package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +13 -21
- package/src/components/JfbBaseWebview/JfbBaseWebview.vue +4 -3
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +5 -4
- package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeError.vue +3 -4
- package/src/mixins/colorCardMixins.js +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<script src="JfbBasePosterBigSmallMixin.js"></script>
|
|
1
2
|
<template>
|
|
2
3
|
<view
|
|
3
4
|
class="jfb-base-poster-big-small"
|
|
@@ -10,9 +11,7 @@
|
|
|
10
11
|
:class="{ editx: isEditx && active }"
|
|
11
12
|
v-if="isEditx && active"
|
|
12
13
|
>
|
|
13
|
-
<view class="jfb-base-poster-big-small__edit-icon" @click="delEdit"
|
|
14
|
-
>删除</view
|
|
15
|
-
>
|
|
14
|
+
<view class="jfb-base-poster-big-small__edit-icon" @click="delEdit">删除</view>
|
|
16
15
|
</view>
|
|
17
16
|
<!-- #endif -->
|
|
18
17
|
<view class="jfb-base-poster-big-small__body">
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
margin: margin,
|
|
23
22
|
flexDirection: position === 1 ? 'row' : 'row-reverse',
|
|
24
23
|
}"
|
|
24
|
+
v-if="isShowAd"
|
|
25
25
|
>
|
|
26
26
|
<view
|
|
27
27
|
v-if="isCarousel === 1"
|
|
@@ -60,6 +60,26 @@
|
|
|
60
60
|
:mode="dot_type"
|
|
61
61
|
:dots-styles="dotStyleData"
|
|
62
62
|
>
|
|
63
|
+
<!--#ifdef MP-WEIXIN-->
|
|
64
|
+
<swiper
|
|
65
|
+
:style="{width: bigWidth + 'rpx', height: bigHeight + 'rpx'}"
|
|
66
|
+
:indicator-dots="false"
|
|
67
|
+
:autoplay="carouselTime>0"
|
|
68
|
+
:interval="carouselTime"
|
|
69
|
+
:duration="500"
|
|
70
|
+
:current="current"
|
|
71
|
+
circular
|
|
72
|
+
@animationfinish="handleBigAnimationfinish"
|
|
73
|
+
>
|
|
74
|
+
<swiper-item v-for="(item,index) in bigList" :key="index" @click.stop="handleClick(item)">
|
|
75
|
+
<image
|
|
76
|
+
:style="{borderRadius: radius + 'rpx',width: bigWidth + 'rpx',height: bigHeight + 'rpx',}"
|
|
77
|
+
:src="item['image_url']"
|
|
78
|
+
mode="aspectFill"></image>
|
|
79
|
+
</swiper-item>
|
|
80
|
+
</swiper>
|
|
81
|
+
<!--#endif-->
|
|
82
|
+
<!--#ifdef H5-->
|
|
63
83
|
<xd-swiper
|
|
64
84
|
:indicator-dots="false"
|
|
65
85
|
:list="bigList"
|
|
@@ -71,15 +91,10 @@
|
|
|
71
91
|
@animationfinish="handleBigAnimationfinish"
|
|
72
92
|
>
|
|
73
93
|
<template slot-scope="{ item, index }">
|
|
74
|
-
<image
|
|
75
|
-
:style="{
|
|
76
|
-
borderRadius: radius + 'rpx',
|
|
77
|
-
}"
|
|
78
|
-
:src="item['image_url']"
|
|
79
|
-
mode="aspectFill"
|
|
80
|
-
></image>
|
|
94
|
+
<image :style="{borderRadius: radius + 'rpx',}" :src="item['image_url']" mode="aspectFill"></image>
|
|
81
95
|
</template>
|
|
82
96
|
</xd-swiper>
|
|
97
|
+
<!--#endif-->
|
|
83
98
|
</xd-swiper-dot>
|
|
84
99
|
<view v-if="isPreview" class="carousel-mask"></view>
|
|
85
100
|
</view>
|
|
@@ -112,7 +127,7 @@
|
|
|
112
127
|
}"
|
|
113
128
|
:src="topList[0].image_url"
|
|
114
129
|
mode="aspectFill"
|
|
115
|
-
></image
|
|
130
|
+
></image></view
|
|
116
131
|
></view>
|
|
117
132
|
<view
|
|
118
133
|
v-else
|
|
@@ -129,6 +144,26 @@
|
|
|
129
144
|
:mode="top_dot_type"
|
|
130
145
|
:dots-styles="topDotStyleData"
|
|
131
146
|
>
|
|
147
|
+
<!--#ifdef MP-WEIXIN-->
|
|
148
|
+
<swiper
|
|
149
|
+
:style="{width: bigWidth + 'rpx', height: smallHeight + 'rpx'}"
|
|
150
|
+
:indicator-dots="false"
|
|
151
|
+
:autoplay="topCarouselTime>0"
|
|
152
|
+
:interval="topCarouselTime"
|
|
153
|
+
:duration="500"
|
|
154
|
+
:current="current"
|
|
155
|
+
circular
|
|
156
|
+
@animationfinish="handleBigAnimationfinish"
|
|
157
|
+
>
|
|
158
|
+
<swiper-item v-for="(item,index) in topList" :key="index" @click.stop="handleClick(item)">
|
|
159
|
+
<image
|
|
160
|
+
:style="{borderRadius: radius + 'rpx',width: bigWidth + 'rpx',height: smallHeight + 'rpx',}"
|
|
161
|
+
:src="item['image_url']"
|
|
162
|
+
mode="aspectFill"></image>
|
|
163
|
+
</swiper-item>
|
|
164
|
+
</swiper>
|
|
165
|
+
<!--#endif-->
|
|
166
|
+
<!--#ifdef H5-->
|
|
132
167
|
<xd-swiper
|
|
133
168
|
:indicator-dots="false"
|
|
134
169
|
:list="topList"
|
|
@@ -140,17 +175,11 @@
|
|
|
140
175
|
@animationfinish="handleTopAnimationfinish"
|
|
141
176
|
>
|
|
142
177
|
<template slot-scope="{ item, index }">
|
|
143
|
-
<image
|
|
144
|
-
:style="{
|
|
145
|
-
borderRadius: topRadius + 'rpx',
|
|
146
|
-
}"
|
|
147
|
-
:src="item['image_url']"
|
|
148
|
-
mode="aspectFill"
|
|
149
|
-
></image>
|
|
178
|
+
<image :style="{borderRadius: topRadius + 'rpx',}" :src="item['image_url']" mode="aspectFill"></image>
|
|
150
179
|
</template>
|
|
151
180
|
</xd-swiper>
|
|
181
|
+
<!--#endif-->
|
|
152
182
|
</xd-swiper-dot>
|
|
153
|
-
|
|
154
183
|
<view v-if="isPreview" class="carousel-mask"></view>
|
|
155
184
|
</view>
|
|
156
185
|
</view>
|
|
@@ -193,6 +222,26 @@
|
|
|
193
222
|
:mode="bottom_dot_type"
|
|
194
223
|
:dots-styles="bottomDotStyleData"
|
|
195
224
|
>
|
|
225
|
+
<!--#ifdef MP-WEIXIN-->
|
|
226
|
+
<swiper
|
|
227
|
+
:style="{width: bigWidth + 'rpx', height: smallHeight + 'rpx'}"
|
|
228
|
+
:indicator-dots="false"
|
|
229
|
+
:autoplay="bottomCarouselTime>0"
|
|
230
|
+
:interval="bottomCarouselTime"
|
|
231
|
+
:duration="500"
|
|
232
|
+
:current="current"
|
|
233
|
+
circular
|
|
234
|
+
@animationfinish="handleBigAnimationfinish"
|
|
235
|
+
>
|
|
236
|
+
<swiper-item v-for="(item,index) in bottomList" :key="index" @click.stop="handleClick(item)">
|
|
237
|
+
<image
|
|
238
|
+
:style="{borderRadius: radius + 'rpx',width: bigWidth + 'rpx',height: smallHeight + 'rpx',}"
|
|
239
|
+
:src="item['image_url']"
|
|
240
|
+
mode="aspectFill"></image>
|
|
241
|
+
</swiper-item>
|
|
242
|
+
</swiper>
|
|
243
|
+
<!--#endif-->
|
|
244
|
+
<!--#ifdef H5-->
|
|
196
245
|
<xd-swiper
|
|
197
246
|
:indicator-dots="false"
|
|
198
247
|
:list="bottomList"
|
|
@@ -213,8 +262,8 @@
|
|
|
213
262
|
></image>
|
|
214
263
|
</template>
|
|
215
264
|
</xd-swiper>
|
|
265
|
+
<!--#endif-->
|
|
216
266
|
</xd-swiper-dot>
|
|
217
|
-
|
|
218
267
|
<view v-if="isPreview" class="carousel-mask"></view>
|
|
219
268
|
</view>
|
|
220
269
|
</view>
|
|
@@ -246,6 +295,7 @@ export default {
|
|
|
246
295
|
mixins: [componentsMixins, extsMixins, JfbBasePosterBigSmallMixin],
|
|
247
296
|
data() {
|
|
248
297
|
return {
|
|
298
|
+
params:{},
|
|
249
299
|
height: 0, //组件高度
|
|
250
300
|
mS: {
|
|
251
301
|
top: 0,
|
|
@@ -280,6 +330,7 @@ export default {
|
|
|
280
330
|
//大图
|
|
281
331
|
current: 0,
|
|
282
332
|
carouselTime: 5, //轮播图轮播周期
|
|
333
|
+
|
|
283
334
|
bigList: [],
|
|
284
335
|
number: null,
|
|
285
336
|
dot_type: "dot",
|
|
@@ -295,6 +346,7 @@ export default {
|
|
|
295
346
|
bottomRadius: 0, //小图上圆角
|
|
296
347
|
bottomCurrent: 0, //小图上
|
|
297
348
|
bottomIsCarousel: 1,
|
|
349
|
+
bottomCarouselTime:0,
|
|
298
350
|
|
|
299
351
|
//小图上
|
|
300
352
|
topList: [],
|
|
@@ -304,6 +356,7 @@ export default {
|
|
|
304
356
|
topCurrent: 0, //小图上
|
|
305
357
|
topIsCarousel: 1,
|
|
306
358
|
smallHeight: 0,
|
|
359
|
+
topCarouselTime:0,
|
|
307
360
|
|
|
308
361
|
timer: null,
|
|
309
362
|
|
|
@@ -467,6 +520,9 @@ export default {
|
|
|
467
520
|
};
|
|
468
521
|
return style[this.bottom_dot_type];
|
|
469
522
|
},
|
|
523
|
+
isShowAd(){
|
|
524
|
+
return !(this.bigList.length === 0 && this.topList.length === 0 && this.bottomList.length === 0);
|
|
525
|
+
},
|
|
470
526
|
},
|
|
471
527
|
watch: {
|
|
472
528
|
container(value,oloValue) {
|
|
@@ -499,20 +555,19 @@ export default {
|
|
|
499
555
|
if (res.list.length === 0 && this.isPreview) {
|
|
500
556
|
res.list = this.getTestData("big");
|
|
501
557
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
res.list.
|
|
506
|
-
|
|
507
|
-
item.image_url = item.image_url
|
|
508
|
-
? getServiceUrl(item.image_url)
|
|
509
|
-
: "";
|
|
558
|
+
|
|
559
|
+
res.list = this.filterItem(res.list);
|
|
560
|
+
if(res.list && res.list.length > 0 ) {
|
|
561
|
+
this.bigList = res.list.map((item) => {
|
|
562
|
+
item.image_url = item.image_url ? getServiceUrl(item.image_url) : "";
|
|
510
563
|
return item;
|
|
511
564
|
});
|
|
565
|
+
}
|
|
512
566
|
})
|
|
513
567
|
.catch((error) => {
|
|
514
568
|
console.error(error);
|
|
515
569
|
});
|
|
570
|
+
|
|
516
571
|
//获取小图上列表
|
|
517
572
|
jfbRootExec("getListPosterContent", {
|
|
518
573
|
vm: this,
|
|
@@ -527,20 +582,18 @@ export default {
|
|
|
527
582
|
if (res.list.length === 0 && this.isPreview) {
|
|
528
583
|
res.list = this.getTestData("top");
|
|
529
584
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
res.list
|
|
533
|
-
|
|
534
|
-
res.list.map((item) => {
|
|
535
|
-
item.image_url = item.image_url
|
|
536
|
-
? getServiceUrl(item.image_url)
|
|
537
|
-
: "";
|
|
585
|
+
res.list = this.filterItem(res.list);
|
|
586
|
+
if(res.list && res.list.length > 0 ){
|
|
587
|
+
this.topList = res.list.map((item) => {
|
|
588
|
+
item.image_url = item.image_url ? getServiceUrl(item.image_url) : "";
|
|
538
589
|
return item;
|
|
539
|
-
})
|
|
590
|
+
})
|
|
591
|
+
}
|
|
540
592
|
})
|
|
541
593
|
.catch((error) => {
|
|
542
594
|
console.error(error);
|
|
543
595
|
});
|
|
596
|
+
|
|
544
597
|
//获取小图下列表
|
|
545
598
|
jfbRootExec("getListPosterContent", {
|
|
546
599
|
vm: this,
|
|
@@ -555,16 +608,13 @@ export default {
|
|
|
555
608
|
if (res.list.length === 0 && this.isPreview) {
|
|
556
609
|
res.list = this.getTestData("bottom");
|
|
557
610
|
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
res.list
|
|
561
|
-
|
|
562
|
-
res.list.map((item) => {
|
|
563
|
-
item.image_url = item.image_url
|
|
564
|
-
? getServiceUrl(item.image_url)
|
|
565
|
-
: "";
|
|
611
|
+
res.list = this.filterItem(res.list);
|
|
612
|
+
if(res.list && res.list.length > 0){
|
|
613
|
+
this.bottomList = res.list.map((item) => {
|
|
614
|
+
item.image_url = item.image_url ? getServiceUrl(item.image_url) : "";
|
|
566
615
|
return item;
|
|
567
616
|
});
|
|
617
|
+
}
|
|
568
618
|
})
|
|
569
619
|
.catch((error) => {
|
|
570
620
|
console.error(error);
|
|
@@ -579,65 +629,137 @@ export default {
|
|
|
579
629
|
handleBottomAnimationfinish(e) {
|
|
580
630
|
this.bottomCurrent = e.detail.current;
|
|
581
631
|
},
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* @description 过滤不可以用
|
|
635
|
+
* 当前项目未H5时,过滤所有小程序应用
|
|
636
|
+
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
637
|
+
* 站外地址直接返回
|
|
638
|
+
* 站内地址未选值直接返回
|
|
639
|
+
* 预览模式全过
|
|
640
|
+
*/
|
|
641
|
+
filterItem(list = []){
|
|
642
|
+
let content = list.filter(item=>{
|
|
643
|
+
//预览模式
|
|
644
|
+
if( this.$configProject.isPreview) return true;
|
|
645
|
+
|
|
646
|
+
//非内部应用
|
|
647
|
+
if(item.redirect_type !== 'INN') return true
|
|
648
|
+
|
|
649
|
+
//没有配置链接
|
|
650
|
+
if(!item.redirect_data) return true;
|
|
651
|
+
|
|
652
|
+
//内部应用
|
|
653
|
+
else {
|
|
654
|
+
let redirect_data;
|
|
655
|
+
try {
|
|
656
|
+
redirect_data = JSON.parse(item.redirect_data);
|
|
657
|
+
if(!item['app_type']) item['app_type']= 'h5';
|
|
658
|
+
|
|
659
|
+
//#ifdef H5
|
|
660
|
+
return item['app_type'] !== 'wxmp';
|
|
661
|
+
//#endif
|
|
662
|
+
|
|
663
|
+
//#ifdef MP-WEIXIN
|
|
664
|
+
let actDir = this.$parent.projectAttr.deploy_dir;
|
|
665
|
+
let dir = this.getPathDir(redirect_data.page);
|
|
666
|
+
if(item['app_type'] === 'wxmp'){
|
|
667
|
+
return actDir === dir;
|
|
668
|
+
}
|
|
669
|
+
else if(item['app_type'] === 'h5') return true;
|
|
670
|
+
else return true
|
|
671
|
+
//#endif
|
|
672
|
+
}
|
|
673
|
+
catch (e) {
|
|
674
|
+
return true
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
console.warn(`PostersList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
679
|
+
return content;
|
|
680
|
+
|
|
681
|
+
},
|
|
682
|
+
|
|
683
|
+
getPathDir(pathDir){
|
|
684
|
+
if(pathDir.indexOf('@site_domain@/') === 0) {
|
|
685
|
+
return pathDir.replace('@site_domain@/','').split('/')[0]
|
|
686
|
+
}
|
|
687
|
+
return ''
|
|
688
|
+
},
|
|
689
|
+
|
|
582
690
|
handleClick(item) {
|
|
691
|
+
if(!item.redirect_data) {
|
|
692
|
+
console.warn(`未配置链接地址: ${item.redirect_data}`);
|
|
693
|
+
console.error(`未配置链接地址: ${item.redirect_data}`);
|
|
694
|
+
return
|
|
695
|
+
}
|
|
696
|
+
|
|
583
697
|
//内部链接跳转地址
|
|
584
|
-
if (item.redirect_type ===
|
|
698
|
+
if (item.redirect_type === 'INN') {
|
|
585
699
|
try {
|
|
586
700
|
let url = JSON.parse(item.redirect_data);
|
|
587
|
-
let params =
|
|
588
|
-
if
|
|
589
|
-
|
|
590
|
-
url: url.page + params
|
|
591
|
-
}
|
|
701
|
+
let params = '';
|
|
702
|
+
if(url.page) {
|
|
703
|
+
if (item['redirect_params']) params = `?${item['redirect_params']}`;
|
|
704
|
+
this.$xdUniHelper.navigateTo({url: url.page + params})
|
|
705
|
+
}
|
|
706
|
+
else {
|
|
707
|
+
console.error(`应用链接配置错误: ${url.page}`)
|
|
708
|
+
}
|
|
592
709
|
} catch (e) {
|
|
593
|
-
console.error(
|
|
710
|
+
console.error(`应用链接配置错误: ${item.redirect_data}`)
|
|
594
711
|
}
|
|
595
712
|
}
|
|
596
713
|
|
|
597
714
|
//外部链接
|
|
598
|
-
if (item.redirect_type ===
|
|
715
|
+
if (item.redirect_type === 'URL') {
|
|
599
716
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
717
|
+
let spReg = /(-apiuri\/v)/;
|
|
600
718
|
//#ifdef MP-WEIXIN
|
|
601
719
|
try {
|
|
602
720
|
let url = JSON.parse(item.redirect_data);
|
|
603
|
-
if (reg.test(url.url)
|
|
604
|
-
console.warn(`广告跳转外站: ${url.url}`)
|
|
605
|
-
this.$xdUniHelper.navigateTo(
|
|
606
|
-
url: `${
|
|
607
|
-
this.$configProject.extras.webview
|
|
608
|
-
}?seatUrl=${Base64.encodeURI(url.url)}`,
|
|
609
|
-
});
|
|
721
|
+
if (reg.test(url.url) || spReg.test(url.url)) {
|
|
722
|
+
console.warn(`广告跳转外站: ${url.url}`)
|
|
723
|
+
this.$xdUniHelper.navigateTo(url);
|
|
610
724
|
} else {
|
|
611
|
-
|
|
725
|
+
console.error(`广告跳转外站配置错误: ${url.url}`)
|
|
612
726
|
}
|
|
613
727
|
} catch (e) {
|
|
614
|
-
console.error(
|
|
728
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
615
729
|
}
|
|
616
730
|
//#endif
|
|
617
731
|
//#ifdef H5
|
|
618
732
|
try {
|
|
619
733
|
let url = JSON.parse(item.redirect_data);
|
|
620
734
|
console.warn(`广告跳转外站: ${url.url}`);
|
|
621
|
-
this.$xdUniHelper.
|
|
735
|
+
this.$xdUniHelper.redirectTo(url, false)
|
|
622
736
|
} catch (e) {
|
|
623
|
-
console.error(
|
|
737
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
624
738
|
}
|
|
625
739
|
//#endif
|
|
740
|
+
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
//无跳转地址
|
|
744
|
+
if(item.redirect_type === 'EMP') {
|
|
745
|
+
console.warn(`无跳转地址`);
|
|
626
746
|
}
|
|
627
747
|
},
|
|
748
|
+
|
|
749
|
+
|
|
628
750
|
getTestData(type) {
|
|
629
751
|
let width;
|
|
630
752
|
let height;
|
|
631
753
|
// 根据type参数,设置width和height
|
|
632
|
-
if (type
|
|
754
|
+
if (type === "big") {
|
|
633
755
|
width = this.bigWidth;
|
|
634
756
|
height = this.bigHeight;
|
|
635
757
|
}
|
|
636
|
-
if (type
|
|
758
|
+
if (type === "top") {
|
|
637
759
|
width = this.bigWidth;
|
|
638
760
|
height = this.smallHeight;
|
|
639
761
|
}
|
|
640
|
-
if (type
|
|
762
|
+
if (type === "bottom") {
|
|
641
763
|
width = this.bigWidth;
|
|
642
764
|
height = this.smallHeight;
|
|
643
765
|
}
|
|
@@ -658,6 +780,7 @@ export default {
|
|
|
658
780
|
// 返回临时数组
|
|
659
781
|
return temp;
|
|
660
782
|
},
|
|
783
|
+
|
|
661
784
|
/**
|
|
662
785
|
* @description 监听事件变化
|
|
663
786
|
* @param container {object} 业务组件对象自己
|
|
@@ -744,6 +867,7 @@ export default {
|
|
|
744
867
|
getContainerPropsValue(container, "content.bottomCarouselTime", 5)
|
|
745
868
|
) * 1000;
|
|
746
869
|
},
|
|
870
|
+
|
|
747
871
|
onJfbUpdate(data) {
|
|
748
872
|
this.onJfbLoad(this.params);
|
|
749
873
|
}
|
|
@@ -122,50 +122,121 @@
|
|
|
122
122
|
this.init(this.container);
|
|
123
123
|
},
|
|
124
124
|
methods: {
|
|
125
|
-
|
|
125
|
+
/**
|
|
126
|
+
* @description 过滤不可以用
|
|
127
|
+
* 当前项目未H5时,过滤所有小程序应用
|
|
128
|
+
* 当前项目未小程序时,过滤所有非当前小程序应用
|
|
129
|
+
* 站外地址直接返回
|
|
130
|
+
* 站内地址未选值直接返回
|
|
131
|
+
* 预览模式全过
|
|
132
|
+
*/
|
|
133
|
+
filterItem(list){
|
|
134
|
+
let content = list.filter(item=>{
|
|
135
|
+
//预览模式
|
|
136
|
+
if( this.$configProject.isPreview) return true;
|
|
137
|
+
|
|
138
|
+
//非内部应用
|
|
139
|
+
if(item.redirect_type !== 'INN') return true
|
|
140
|
+
|
|
141
|
+
//没有配置链接
|
|
142
|
+
if(!item.redirect_data) return true;
|
|
143
|
+
|
|
144
|
+
//内部应用
|
|
145
|
+
else {
|
|
146
|
+
let redirect_data;
|
|
147
|
+
try {
|
|
148
|
+
redirect_data = JSON.parse(item.redirect_data);
|
|
149
|
+
if(!item['app_type']) item['app_type']= 'h5';
|
|
150
|
+
|
|
151
|
+
//#ifdef H5
|
|
152
|
+
return item['app_type'] !== 'wxmp';
|
|
153
|
+
//#endif
|
|
154
|
+
|
|
155
|
+
//#ifdef MP-WEIXIN
|
|
156
|
+
let actDir = this.projectAttr.deploy_dir;
|
|
157
|
+
let dir = this.getPathDir(redirect_data.page);
|
|
158
|
+
if(item['app_type'] === 'wxmp'){
|
|
159
|
+
return actDir === dir;
|
|
160
|
+
}
|
|
161
|
+
else if(item['app_type'] === 'h5') return true;
|
|
162
|
+
else return true
|
|
163
|
+
//#endif
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
return true
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
console.warn(`PostTypeList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
171
|
+
return content;
|
|
172
|
+
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
getPathDir(pathDir){
|
|
176
|
+
if(pathDir.indexOf('@site_domain@/') === 0) {
|
|
177
|
+
return pathDir.replace('@site_domain@/','').split('/')[0]
|
|
178
|
+
}
|
|
179
|
+
return ''
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
handleClick(item) {
|
|
184
|
+
if(!item.redirect_data) {
|
|
185
|
+
console.warn(`未配置链接地址: ${item.redirect_data}`);
|
|
186
|
+
console.error(`未配置链接地址: ${item.redirect_data}`);
|
|
187
|
+
return
|
|
188
|
+
}
|
|
189
|
+
|
|
126
190
|
//内部链接跳转地址
|
|
127
|
-
if(item.redirect_type === 'INN') {
|
|
128
|
-
try{
|
|
191
|
+
if (item.redirect_type === 'INN') {
|
|
192
|
+
try {
|
|
129
193
|
let url = JSON.parse(item.redirect_data);
|
|
130
194
|
let params = '';
|
|
131
|
-
if(
|
|
132
|
-
|
|
133
|
-
url: url.page + params
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
195
|
+
if(url.page) {
|
|
196
|
+
if (item['redirect_params']) params = `?${item['redirect_params']}`;
|
|
197
|
+
this.$xdUniHelper.navigateTo({url: url.page + params})
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
console.error(`应用链接配置错误: ${url.page}`)
|
|
201
|
+
}
|
|
202
|
+
} catch (e) {
|
|
203
|
+
console.error(`应用链接配置错误: ${item.redirect_data}`)
|
|
137
204
|
}
|
|
138
205
|
}
|
|
139
206
|
|
|
140
207
|
//外部链接
|
|
141
|
-
if(item.redirect_type === 'URL') {
|
|
208
|
+
if (item.redirect_type === 'URL') {
|
|
142
209
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
210
|
+
let spReg = /(-apiuri\/v)/;
|
|
143
211
|
//#ifdef MP-WEIXIN
|
|
144
212
|
try {
|
|
145
213
|
let url = JSON.parse(item.redirect_data);
|
|
146
|
-
if(reg.test(url.url)
|
|
214
|
+
if (reg.test(url.url) || spReg.test(url.url)) {
|
|
147
215
|
console.warn(`广告跳转外站: ${url.url}`)
|
|
148
|
-
this.$xdUniHelper.navigateTo(
|
|
149
|
-
url: `${this.$configProject.extras.webview}?seatUrl=${Base64.encodeURI(url.url)}`
|
|
150
|
-
});
|
|
216
|
+
this.$xdUniHelper.navigateTo(url);
|
|
151
217
|
} else {
|
|
152
|
-
|
|
218
|
+
console.error(`广告跳转外站配置错误: ${url.url}`)
|
|
153
219
|
}
|
|
154
220
|
} catch (e) {
|
|
155
|
-
console.error(
|
|
221
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
156
222
|
}
|
|
157
223
|
//#endif
|
|
158
224
|
//#ifdef H5
|
|
159
225
|
try {
|
|
160
226
|
let url = JSON.parse(item.redirect_data);
|
|
161
227
|
console.warn(`广告跳转外站: ${url.url}`);
|
|
162
|
-
this.$xdUniHelper.
|
|
228
|
+
this.$xdUniHelper.redirectTo(url, false)
|
|
163
229
|
} catch (e) {
|
|
164
|
-
console.error(
|
|
230
|
+
console.error(`广告跳转外站配置错误: ${item.redirect_data}`)
|
|
165
231
|
}
|
|
166
232
|
//#endif
|
|
167
233
|
|
|
168
234
|
}
|
|
235
|
+
|
|
236
|
+
//无跳转地址
|
|
237
|
+
if(item.redirect_type === 'EMP') {
|
|
238
|
+
console.warn(`无跳转地址`);
|
|
239
|
+
}
|
|
169
240
|
},
|
|
170
241
|
|
|
171
242
|
getTestData() {
|
|
@@ -212,8 +283,7 @@
|
|
|
212
283
|
}
|
|
213
284
|
}
|
|
214
285
|
|
|
215
|
-
|
|
216
|
-
this.list = list;
|
|
286
|
+
this.list = this.filterItem(list);
|
|
217
287
|
this.noData = this.list.length === 0;
|
|
218
288
|
})
|
|
219
289
|
.catch(error => {
|