jufubao-base 1.0.159-beta9 → 1.0.159

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