jufubao-base 1.0.169-beta13 → 1.0.169-beta15

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.
@@ -41,39 +41,10 @@
41
41
  </view>
42
42
  </view>
43
43
  <view class="JfbBaseNotice">
44
- <!--notice-->
45
- <view class="jfb-base-tfk-card-login__body-line" v-if="!notice"></view>
46
- <view class="jfb-base-tfk-card-login__body-notice" :style="noticeWrapBoxStyle" v-if="notice">
47
- <view
48
- class="jfb-base-tfk-card-login__body-notice-in"
49
- :style="noticeBoxStyle"
50
- >
51
- <xd-notice-bar
52
- style="width: 100%"
53
- :color="noticeFont.color"
54
- :showIcon="true"
55
- :scrollable="true"
56
- :speed="20"
57
- :fontSize="noticeFont.size"
58
- :height="70"
59
- :is-no-bgc="false"
60
- >
61
- <template>
62
- <view v-html="notice"></view>
63
- </template>
64
- </xd-notice-bar>
65
- </view>
66
- </view>
67
- <view class="jfb-base-tfk-card-login__body-notice" :style="noticeWrapBoxStyle" v-if="noticeStatus && isPreview && notice === ''">
68
- <view
69
- class="jfb-base-tfk-card-login__body-notice-in"
70
- :style="[noticeBoxStyle, {
71
- textAlign: 'center',
72
- color: dangerColor,
73
- fontSize: 26 + 'rpx',
74
- }]">该组件未配置数据,因此改模块在正式环境将不显示</view>
75
- </view>
76
- <!--notice end-->
44
+ <jfb-notice
45
+ :panelSetting="noticeSetting"
46
+ :apiGetContent="apiGetContent"
47
+ ></jfb-notice>
77
48
  </view>
78
49
  <view class="card_list_wrap" :style="listBoxStyle">
79
50
 
@@ -107,7 +78,7 @@
107
78
  :price="item.card_point"
108
79
  :isOld="false"
109
80
  :unit="item.unit || ''"
110
- :colorNew="'#333333'"
81
+ :colorNew="cardFontColor"
111
82
  ></xd-unit>
112
83
  </view>
113
84
  <view v-if="item.other_card_point && item.card_point_type !== 1" class="bind_deduct">
@@ -174,6 +145,7 @@
174
145
  <script>
175
146
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
176
147
  import XdUnit from "@/components/XdUnit/XdUnit";
148
+ import JfbNotice from "./JfbNotice";
177
149
  import { jfbRootExec } from "@/utils/xd.event";
178
150
  import JfbBaseTfkCardLoginMixin from "./JfbBaseTfkCardLoginMixin";
179
151
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -190,13 +162,15 @@
190
162
  XdFontIcon,
191
163
  XdNoticeBar,
192
164
  XdCouponItem,
193
- XdUnit
165
+ XdUnit,
166
+ JfbNotice,
194
167
  },
195
168
  mixins: [
196
169
  componentsMixins, extsMixins, JfbBaseTfkCardLoginMixin
197
170
  ],
198
171
  data() {
199
172
  return {
173
+ // hideMask: true,
200
174
  menuType: "card", // card, coupon
201
175
  loadingList: true,
202
176
  cardList: [],
@@ -241,10 +215,28 @@
241
215
  couponUseBtnPadding: {},
242
216
  couponBtnRadius: 16,
243
217
  couponLeftBgColor: "",
218
+
219
+
220
+ noticeStyle: "",
221
+ notice_is_hide_dailog: "",
222
+ noticeIsTitle: "",
223
+ noticeTextAlign: "",
224
+ noticeRadius: "",
225
+ noticeBgc: "",
226
+ noticeTextColor: "",
227
+ noticeFontSize: "",
228
+ noticeNum: "",
229
+ noticeSpeed: "",
230
+ noticeScrollMargin: "",
231
+ noticeTime: "",
232
+
244
233
  noticeBgColor: "",
245
234
  noticeMargin: {},
246
235
  noticePadding: {},
247
236
  noticeFont: {},
237
+ noticeMoreFont: {},
238
+
239
+
248
240
  bindCardText: "",
249
241
  bindCardTextStyle: {},
250
242
  bindCardShowType: "",
@@ -255,6 +247,8 @@
255
247
  entryGroupId: "",
256
248
  cardHeight: 270,
257
249
  cardBtnMinWidth: 100,
250
+ menuShowType: "text",
251
+ cardFontColor: "",
258
252
  }
259
253
  },
260
254
  computed: {
@@ -300,8 +294,13 @@
300
294
  background: this.menuTabColor['actBgColor'] || '#fff',
301
295
  fontSize: this.menuTabColor['actFontSize'] || '30rpx',
302
296
  fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
303
- borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
304
297
  }
298
+ if(this.menuShowType === 'text'){
299
+ styleActiveObj.borderBottom = `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
300
+ }else{
301
+ styleActiveObj.borderRadius = '100rpx';
302
+ }
303
+
305
304
  return this.styleObjectToString(styleActiveObj)
306
305
  },
307
306
  bindCardBtnPadding(){
@@ -402,6 +401,7 @@
402
401
  border: border,
403
402
  boxShadow: boxShadow,
404
403
  height: this.cardHeight + 'rpx',
404
+ color: this.cardFontColor
405
405
  })
406
406
  },
407
407
  listBoxStyle(){
@@ -458,6 +458,29 @@
458
458
  padding: padding,
459
459
  background: this.noticeBgColor
460
460
  })
461
+ },
462
+ noticeSetting(){
463
+
464
+ return {
465
+ style: this.noticeStyle,
466
+ is_hide_dailog: this.notice_is_hide_dailog,
467
+ isTitle: this.noticeIsTitle,
468
+ textAlign: this.noticeTextAlign,
469
+ radius: this.noticeRadius,
470
+ bgc: this.noticeBgc,
471
+ textColor: this.noticeFont.color || this.warningColor, // noticeTextColor,
472
+ fontSize: this.noticeFont.size, //noticeFontSize,
473
+ num: this.noticeNum,
474
+ speed: this.noticeSpeed,
475
+ scrollMargin: this.noticeScrollMargin,
476
+ time: this.noticeTime,
477
+ warningColor: this.warningColor,
478
+ containerId: this.containerId,
479
+ padding: this.noticePadding,
480
+ margin: this.noticeMargin,
481
+ moreTextColor: this.noticeMoreFont.color || this.warningColor,
482
+ moreFontSize: this.noticeMoreFont.size || 24,
483
+ }
461
484
  }
462
485
  },
463
486
  watch: {
@@ -490,7 +513,6 @@
490
513
  this.inCallback = inCallback || this.allEntryPath || this.settings.index;
491
514
 
492
515
  this.getCardList();
493
- this.getContent();
494
516
  },
495
517
  /**
496
518
  * @description 监听事件变化
@@ -520,10 +542,7 @@
520
542
  this.couponUseBtnPadding = getContainerPropsValue(value, "content.couponUseBtnPadding", {top: 20, left: 20, right: 20, bottom: 20});
521
543
  this.couponBtnRadius = getContainerPropsValue(value, "content.couponBtnRadius", 16);
522
544
  this.couponLeftBgColor = getContainerPropsValue(value, "content.couponLeftBgColor", "");
523
- this.noticeBgColor = getContainerPropsValue(value, "content.noticeBgColor", "");
524
- this.noticeMargin = getContainerPropsValue(value, "content.noticeMargin", {top: 20, left: 20, right: 20, bottom: 20});
525
- this.noticePadding = getContainerPropsValue(value, "content.noticePadding", {top: 20, left: 20, right: 20, bottom: 20});
526
- this.noticeFont = getContainerPropsValue(value, "content.noticeFont", {});
545
+
527
546
  this.bindCardText = getContainerPropsValue(value, "content.bindCardText", "");
528
547
  this.bindCardTextStyle = getContainerPropsValue(value, "content.bindCardTextStyle", {});
529
548
  this.bindCardShowType = getContainerPropsValue(value, "content.bindCardShowType", 'text');
@@ -537,6 +556,27 @@
537
556
  this.cardHeight = getContainerPropsValue(value, "content.cardHeight", 270);
538
557
  this.cardBtnMinWidth = getContainerPropsValue(value, "content.cardBtnMinWidth", 100);
539
558
  this.disabledPath = getContainerPropsValue(value, "content.disabledPath", {value: ""}).value;
559
+ this.menuShowType = getContainerPropsValue(value, "content.menuShowType", 'text');
560
+ this.cardFontColor = getContainerPropsValue(value, "content.cardFontColor", '#333');
561
+
562
+ this.noticeStyle = getContainerPropsValue(value, "content.noticeStyle", '1');
563
+ this.notice_is_hide_dailog = getContainerPropsValue(value, "content.notice_is_hide_dailog", 'N');
564
+ this.noticeIsTitle = getContainerPropsValue(value, "content.noticeIsTitle", '');
565
+ this.noticeTextAlign = getContainerPropsValue(value, "content.noticeTextAlign", 'left');
566
+ this.noticeRadius = getContainerPropsValue(value, "content.noticeRadius", '');
567
+ this.noticeBgc = getContainerPropsValue(value, "content.noticeBgc", '');
568
+ this.noticeTextColor = getContainerPropsValue(value, "content.noticeTextColor", this.warningColor);
569
+ this.noticeFontSize = getContainerPropsValue(value, "content.noticeFontSize", '20');
570
+ this.noticeNum = getContainerPropsValue(value, "content.noticeNum", 1);
571
+ this.noticeSpeed = getContainerPropsValue(value, "content.noticeSpeed", 30);
572
+ this.noticeScrollMargin = getContainerPropsValue(value, "content.noticeScrollMargin", '');
573
+ this.noticeTime = getContainerPropsValue(value, "content.noticeTime", 3);
574
+
575
+ this.noticeBgColor = getContainerPropsValue(value, "content.noticeBgColor", "");
576
+ this.noticeMargin = getContainerPropsValue(value, "content.noticeMargin", {top: 20, left: 20, right: 20, bottom: 20});
577
+ this.noticePadding = getContainerPropsValue(value, "content.noticePadding", {top: 20, left: 20, right: 20, bottom: 20});
578
+ this.noticeFont = getContainerPropsValue(value, "content.noticeFont", {});
579
+ this.noticeMoreFont = getContainerPropsValue(value, "content.noticeMoreFont", {});
540
580
 
541
581
  console.log(this.cardShadow, 'cardShadow')
542
582
  if(this.bindCardTextStyle && !this.bindCardTextStyle.color){
@@ -626,6 +666,9 @@
626
666
  this.couponList = list;
627
667
  }
628
668
  if(show_type === 'normal'){
669
+ if(this.$configProject.isPreview){
670
+ list = list.filter(item => item.consume_type != 2)
671
+ }
629
672
  this.cardList = list;
630
673
  }
631
674
  })
@@ -636,26 +679,22 @@
636
679
  url: this.cardBindPath
637
680
  })
638
681
  },
639
- getContent() {
640
- jfbRootExec("getListBaseNewsContent", {
641
- vm: this,
642
- data: {
643
- page_id: this.pageAttr["page_id"], //页面ID
644
- container_id: this.containerId, //组件ID
645
- limit: 1,
646
- },
647
- })
648
- .then((res) => {
649
- if (res.list.length > 0) {
650
- if(res.list && res.list.length > 0) {
651
- this.notice = this.$xdUniHelper.filterHtml(res.list[0].content);
652
- }
653
- this.noticeStatus = true;
654
- }
682
+ apiGetContent(params){
683
+ return new Promise((resolve, reject) => {
684
+ jfbRootExec("getListBaseNewsContent", {
685
+ vm: this,
686
+ data: {
687
+ page_id: this.pageAttr["page_id"], //页面ID
688
+ container_id: this.containerId, //组件ID
689
+ page_size: this.noticeNum || 1,
690
+ ...params
691
+ },
692
+ }).then(res => {
693
+ resolve(res);
694
+ }).catch(err => {
695
+ reject(err);
655
696
  })
656
- .catch((error) => {
657
- console.error(error);
658
- });
697
+ })
659
698
  },
660
699
  toDisableUrl(){
661
700
  this.$xdUniHelper.navigateTo({
@@ -761,7 +800,6 @@
761
800
  flex-direction: column;
762
801
  justify-content: space-between;
763
802
  .bind_point{
764
- color: #333333;
765
803
  font-size: 48rpx;
766
804
  ::v-deep .xd-unit{
767
805
  height: auto !important;
@@ -774,7 +812,6 @@
774
812
  }
775
813
  .bind_deduct{
776
814
  font-size: 28rpx;
777
- color: #999;
778
815
  background: rgba(51, 51, 51, 0.05);
779
816
  display: inline-block;
780
817
  padding: 4rpx 20rpx;
@@ -782,20 +819,17 @@
782
819
  }
783
820
  .bind_number{
784
821
  font-size: 28rpx;
785
- color: #999;
786
822
  margin-top: 20rpx;
787
823
  font-weight: 500;
788
824
  }
789
825
  .bind_time{
790
826
  font-size: 24rpx;
791
- color: #999;
792
827
  margin-top: 16rpx;
793
828
  font-weight: 500;
794
829
  line-height: 1;
795
830
  }
796
831
  .bind_type{
797
832
  font-size: 28rpx;
798
- color: #333333;
799
833
  position: absolute;
800
834
  top: 32rpx;
801
835
  right: 32rpx;