jufubao-base 1.0.169-beta2 → 1.0.169-beta21

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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
  3. package/src/components/JfbBaseLogin/Attr.js +54 -16
  4. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +3 -1
  5. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  6. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
  7. package/src/components/JfbBaseOrderDetail/Api.js +12 -7
  8. package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
  9. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +68 -18
  10. package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
  11. package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
  12. package/src/components/JfbBaseTfkCardBind/Attr.js +139 -15
  13. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +234 -20
  14. package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
  15. package/src/components/JfbBaseTfkCardDetail/Api.js +11 -0
  16. package/src/components/JfbBaseTfkCardDetail/Attr.js +158 -7
  17. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +159 -17
  18. package/src/components/JfbBaseTfkCardLogin/Attr.js +490 -4
  19. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +394 -107
  20. package/src/components/JfbBaseTfkCardLogin/Mock.js +6 -536
  21. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +75 -19
  22. package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
  23. package/src/components/JfbBaseTfkSearch/AllList.vue +337 -0
  24. package/src/components/JfbBaseTfkSearch/Api.js +11 -42
  25. package/src/components/JfbBaseTfkSearch/Attr.js +344 -32
  26. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
  27. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +218 -0
  28. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +317 -0
  29. package/src/components/JfbBaseTfkSearch/ContentShop.vue +186 -0
  30. package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
  31. package/src/components/JfbBaseTfkSearch/CustomList.vue +453 -0
  32. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +286 -35
  33. package/src/components/JfbBaseTfkSearch/Mock.js +242 -11
  34. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
  35. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
  36. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
  37. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
  38. package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
  39. package/src/components/JfbBaseTfkSearch/listMixins.js +187 -0
  40. package/src/mixins/colorCardMixins.js +71 -9
  41. package/src/mixins/componentsMixins.js +376 -23
  42. package/src/mixins/posterMixins.js +122 -0
@@ -18,70 +18,48 @@
18
18
  }">
19
19
  <view class="menu_wrap" :style="menuBoxStyle">
20
20
  <view class="menu_list">
21
- <view class="menu_item" :style="{
22
- marginRight: menuItemMargin + 'px'
23
- }">
21
+ <view class="menu_item"
22
+ :style="{
23
+ marginRight: menuItemMargin + 'px'
24
+ }"
25
+ @click="changeMenu('card')"
26
+ >
24
27
  <view class="menu_item_inner"
25
28
  :style="[menuType === 'card' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的票券包</view>
26
29
  </view>
27
- <view class="menu_item">
30
+ <view class="menu_item" @click="changeMenu('coupon')">
28
31
  <view class="menu_item_inner"
29
32
  :style="[menuType === 'coupon' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的优惠券</view>
30
33
  </view>
31
34
  </view>
32
- <view @click="toBindCard">
35
+ <view class="bind_card" :style="bindCardBoxStyle" @click="toBindCard">
33
36
  <xd-font-icon :icon="bindCardIcon.icon"
34
37
  :color="bindCardIcon.color"
35
- :style="{fontSize: bindCardIcon.fontSize}"
38
+ :size="bindCardIcon.size"
36
39
  ></xd-font-icon>
40
+ <view v-if="bindCardText" :style="getBindCardTextStyle">{{ bindCardText }}</view>
37
41
  </view>
38
42
  </view>
39
43
  <view class="JfbBaseNotice">
40
- <!--notice-->
41
- <view class="jfb-base-tfk-card-login__body-line" v-if="!notice"></view>
42
- <view :style="{marginTop: '0rpx'}" class="jfb-base-tfk-card-login__body-notice" v-if="notice">
43
- <view
44
- class="jfb-base-tfk-card-login__body-notice-in"
45
- :style="{ background: noticeBackgroundColor }"
46
- >
47
- <xd-notice-bar
48
- style="width: 100%"
49
- :showIcon="true"
50
- :scrollable="true"
51
- :speed="20"
52
- :fontSize="24"
53
- :height="70"
54
- :is-no-bgc="false"
55
- >
56
- <template>
57
- <view v-html="notice"></view>
58
- </template>
59
- </xd-notice-bar>
60
- </view>
61
- </view>
62
- <view class="jfb-base-tfk-card-login__body-notice" v-if="noticeStatus && isPreview && notice === ''">
63
- <view
64
- class="jfb-base-tfk-card-login__body-notice-in"
65
- :style="{
66
- background: noticeBackgroundColor,
67
- textAlign: 'center',
68
- color: dangerColor,
69
- fontSize: 26 + 'rpx',
70
- }">该组件未配置数据,因此改模块在正式环境将不显示</view>
71
- </view>
72
- <!--notice end-->
44
+ <xd-notice
45
+ :panelSetting="noticeSetting"
46
+ :apiGetContent="apiGetContent"
47
+ ></xd-notice>
73
48
  </view>
74
49
  <view class="card_list_wrap" :style="listBoxStyle">
75
-
76
50
  <!-- 我的票券包- 已绑票券 -->
77
51
  <template v-if="menuType === 'card'">
78
52
  <view v-if="loadingList">
79
53
  <view class="bind_list skeleton-wrap">
80
54
  <view class="bind_item" v-for="i in 5" :key="i" :style="cardItemBoxStyle">
81
- <view class="bind_point"></view>
82
- <view class="bind_deduct"></view>
83
- <view class="bind_number"></view>
84
- <view class="bind_time"></view>
55
+ <view>
56
+ <view class="bind_point"></view>
57
+ <view class="bind_deduct"></view>
58
+ </view>
59
+ <view>
60
+ <view class="bind_number"></view>
61
+ <view class="bind_time"></view>
62
+ </view>
85
63
  <view class="bind_type"></view>
86
64
  <view class="bind_btn"></view>
87
65
  </view>
@@ -90,29 +68,48 @@
90
68
  <view v-else>
91
69
  <view v-if="cardList.length" class="bind_list">
92
70
  <view class="bind_item" v-for="(item, i) in cardList" :key="i"
93
- :style="cardItemBoxStyle">
94
- <view class="bind_point">120</view>
95
- <view class="bind_deduct">兑换其他商品可抵:240元宝</view>
96
- <view class="bind_number">1001000002541</view>
97
- <view class="bind_time">2029-12-31到期</view>
71
+ :style="cardItemBoxStyle" @click="toCardDetail(item)">
72
+ <view>
73
+ <view class="bind_point">
74
+ <xd-unit
75
+ :unitFontSize="24"
76
+ :fontSize="48"
77
+ :price="item.card_point"
78
+ :isOld="false"
79
+ :unit="item.unit || ''"
80
+ :colorNew="cardFontColor"
81
+ ></xd-unit>
82
+ </view>
83
+ <view v-if="item.other_card_point && item.card_point_type !== 1" class="bind_deduct">
84
+ 兑换其他商品可抵:{{ item.other_card_point }}
85
+ </view>
86
+ </view>
87
+ <view>
88
+ <view class="bind_number">{{ item.card_number }}</view>
89
+ <view class="bind_time">{{ item.end_time }}到期</view>
90
+ </view>
98
91
  <view class="bind_type" :style="{
99
92
  top: cardPadding.top + 'rpx',
100
93
  right: cardPadding.right + 'rpx',
101
94
  }">
102
- <view>兰州vip优惠券</view>
103
- <view>(可转票券)</view>
95
+ <view>{{ item.card_type_name }}</view>
96
+ <view v-if="item.is_exchange === 'Y'">(可转票券)</view>
104
97
  </view>
105
- <view class="bind_btn" :style="[{
106
- right: cardPadding.right + 'rpx',
107
- bottom: cardPadding.bottom + 'rpx',
108
- borderRadius: cardBtnRadius + 'rpx',
109
- padding: bindCardBtnPadding
110
- }, item.is_login !== 'Y' ? bindCardActiveStyle : bindCardBtnStyle]">登录</view>
98
+ <view class="bind_btn"
99
+ :style="[{
100
+ right: cardPadding.right + 'rpx',
101
+ bottom: cardPadding.bottom + 'rpx',
102
+ borderRadius: cardBtnRadius + 'rpx',
103
+ padding: bindCardBtnPadding,
104
+ minWidth: cardBtnMinWidth + 'rpx',
105
+ }, item.is_login === 'Y' ? bindCardActiveStyle : bindCardBtnStyle]"
106
+ @click.stop="doCardLogin(item)"
107
+ >{{ item.is_login === 'Y' ? '已登录' : '登录'}}</view>
111
108
  </view>
112
- <view v-if="!hasCardList" class="no_more_card">没有更多券了,查看失效的票券 ></view>
109
+ <view v-if="!hasCardList" class="no_more_card" @click="toDisableUrl">没有更多券了,查看失效的票券 ></view>
113
110
  </view>
114
111
  <view v-else>
115
- 暂无数据
112
+ <!-- 暂无数据 -->
116
113
  </view>
117
114
  </view>
118
115
  </template>
@@ -128,8 +125,11 @@
128
125
  :couponBtnRadius="couponBtnRadius"
129
126
  :couponBtnTextStyle="couponBtnTextStyle"
130
127
  :couponLeftBgColor="couponLeftBgColor"
128
+ :item="item"
129
+ @useCoupon="doCardLogin(item)"
130
+ @toDetail="toCardDetail(item)"
131
131
  ></xd-coupon-item>
132
- <view v-if="!hasCouponList" class="no_more_card">没有更多券了,查看失效的票券 ></view>
132
+ <view v-if="!hasCouponList" class="no_more_card" @click="toDisableUrl">没有更多券了,查看失效的票券 ></view>
133
133
  </view>
134
134
  <view v-else>
135
135
  暂无数据
@@ -137,13 +137,15 @@
137
137
 
138
138
  </template>
139
139
  </view>
140
-
140
+
141
141
  </view>
142
142
  </view>
143
143
  </template>
144
144
 
145
145
  <script>
146
146
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
147
+ import XdUnit from "@/components/XdUnit/XdUnit";
148
+ import XdNotice from "./XdNotice";
147
149
  import { jfbRootExec } from "@/utils/xd.event";
148
150
  import JfbBaseTfkCardLoginMixin from "./JfbBaseTfkCardLoginMixin";
149
151
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -153,25 +155,38 @@
153
155
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
154
156
  import XdCouponItem from "./XdCouponItem";
155
157
  import Color from "color"
158
+ import { mapState, mapActions } from "vuex";
156
159
  export default {
157
160
  name: "JfbBaseTfkCardLogin",
158
161
  components: {
159
162
  XdFontIcon,
160
163
  XdNoticeBar,
161
164
  XdCouponItem,
165
+ XdUnit,
166
+ XdNotice,
162
167
  },
163
168
  mixins: [
164
169
  componentsMixins, extsMixins, JfbBaseTfkCardLoginMixin
165
170
  ],
166
171
  data() {
167
172
  return {
168
- menuType: "coupon", // card, coupon
169
- loadingList: false,
170
- cardList: [{id: 1}, {id: 2}],
171
- couponList: [{id: 1}, {id: 2}],
173
+ // hideMask: true,
174
+ menuType: "card", // card, coupon
175
+ loadingList: true,
176
+ cardList: [],
177
+ couponList: [],
172
178
  hasCardList: false,
173
179
  hasCouponList: false,
174
180
 
181
+ inCallbackUrlOrg:'',//是否带有回调地址
182
+ inCallback: null, //内部跳转地址
183
+ allEntryPath: "", //综合福利入口页
184
+ cardDetailPath: "", //我的票券包详情页
185
+ disabledPath: "", //禁用票券包详情页
186
+
187
+ options: {},
188
+ showDisabled: 'Y',
189
+
175
190
  //todo
176
191
  previewCurrent: "",
177
192
  isPreview: false,
@@ -200,9 +215,47 @@
200
215
  couponUseBtnPadding: {},
201
216
  couponBtnRadius: 16,
202
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
+
233
+ noticeBgColor: "",
234
+ noticeMargin: {},
235
+ noticePadding: {},
236
+ noticeFont: {},
237
+ noticeMoreFont: {},
238
+
239
+
240
+ bindCardText: "",
241
+ bindCardTextStyle: {},
242
+ bindCardShowType: "",
243
+ bindCardBtnRadius: 16,
244
+ cardBorder: {},
245
+ cardShadow: {},
246
+ cardImageMode: "",
247
+ entryGroupId: "",
248
+ cardHeight: 270,
249
+ cardBtnMinWidth: 100,
250
+ menuShowType: "text",
251
+ cardFontColor: "",
203
252
  }
204
253
  },
205
254
  computed: {
255
+ ...mapState({
256
+ jwxSDK: (state) => state.jwxSDK,
257
+ jfbAuthorize: (state) => state.jfbAuthorize,
258
+ }),
206
259
  menuBoxStyle(){
207
260
  let padding = `${this.checkValue(this.menuPadding.top, 20)}rpx`;
208
261
  padding = `${padding} ${this.checkValue(this.menuPadding.right, 20)}rpx`;
@@ -241,8 +294,13 @@
241
294
  background: this.menuTabColor['actBgColor'] || '#fff',
242
295
  fontSize: this.menuTabColor['actFontSize'] || '30rpx',
243
296
  fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
244
- borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
245
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
+
246
304
  return this.styleObjectToString(styleActiveObj)
247
305
  },
248
306
  bindCardBtnPadding(){
@@ -287,6 +345,21 @@
287
345
  }
288
346
  return this.styleObjectToString(styleObj)
289
347
  },
348
+ bindCardBoxStyle(){
349
+ return this.styleObjectToString({
350
+ border: `1px solid ${this.bindCardShowType == 'button' ? this.bindCardTextStyle.color : 'transparent'}`,
351
+ borderRadius: this.bindCardBtnRadius + 'rpx',
352
+ })
353
+ },
354
+ getBindCardTextStyle(){
355
+ let styleObj = {
356
+ color: this.bindCardTextStyle['color'] || '#333',
357
+ fontSize: this.bindCardTextStyle['fontSize'] || '30rpx',
358
+ fontWeight: this.bindCardTextStyle['fontWeight'] || 'normal',
359
+ marginLeft: this.bindCardIcon.icon ? '10rpx' : 0,
360
+ }
361
+ return this.styleObjectToString(styleObj)
362
+ },
290
363
  getCardBgImage(){
291
364
  let bg = '';
292
365
  if(this.$xdUniHelper.checkVarType(this.cardImageUrl) === 'object'
@@ -300,18 +373,36 @@
300
373
  },
301
374
  cardItemBoxStyle(){
302
375
  let image = {};
376
+ let border = "none";
377
+ let boxShadow = "none";
378
+ if(this.cardBorder && this.cardBorder.type === 'Y'){
379
+ let { width, color } = this.cardBorder.value;
380
+ border = `${width}rpx solid ${color}`;
381
+ }
382
+ if(this.cardShadow && this.cardShadow.type === 'Y'){
383
+ let { width, color } = this.cardShadow.value;
384
+ boxShadow = `0 0 ${width}rpx ${color}`;
385
+ }
303
386
  if(this.cardImageUrl) image = {
304
387
  backgroundImage: `url(${this.getCardBgImage})`,
305
388
  backgroundSize: '100%',
306
389
  backgroundRepeat: 'no-repeat',
307
390
  }
391
+ if(this.cardImageMode) image['backgroundSize'] = this.cardImageMode;
392
+
308
393
  let padding = `${this.checkValue(this.cardPadding.top, 20)}rpx`;
309
394
  padding = `${padding} ${this.checkValue(this.cardPadding.right, 20)}rpx`;
310
395
  padding = `${padding} ${this.checkValue(this.cardPadding.bottom, 20)}rpx`;
311
396
  padding = `${padding} ${this.checkValue(this.cardPadding.left, 20)}rpx`;
312
- image['padding'] = padding;
313
- image['borderRadius'] = this.cardRadius + 'rpx';
314
- return this.styleObjectToString(image)
397
+ return this.styleObjectToString({
398
+ ...image,
399
+ padding: padding,
400
+ borderRadius: this.cardRadius + 'rpx',
401
+ border: border,
402
+ boxShadow: boxShadow,
403
+ height: this.cardHeight + 'rpx',
404
+ color: this.cardFontColor
405
+ })
315
406
  },
316
407
  listBoxStyle(){
317
408
  let padding = `${this.checkValue(this.cardListPadding.top, 20)}rpx`;
@@ -348,6 +439,49 @@
348
439
  borderRadius: this.couponRadius + 'rpx',
349
440
  })
350
441
  },
442
+ noticeWrapBoxStyle(){
443
+ let padding = `${this.checkValue(this.noticeMargin.top, 20)}rpx`;
444
+ padding = `${padding} ${this.checkValue(this.noticeMargin.right, 20)}rpx`;
445
+ padding = `${padding} ${this.checkValue(this.noticeMargin.bottom, 20)}rpx`;
446
+ padding = `${padding} ${this.checkValue(this.noticeMargin.left, 20)}rpx`;
447
+
448
+ return this.styleObjectToString({
449
+ padding: padding,
450
+ })
451
+ },
452
+ noticeBoxStyle(){
453
+ let padding = `${this.checkValue(this.noticePadding.top, 20)}rpx`;
454
+ padding = `${padding} ${this.checkValue(this.noticePadding.right, 20)}rpx`;
455
+ padding = `${padding} ${this.checkValue(this.noticePadding.bottom, 20)}rpx`;
456
+ padding = `${padding} ${this.checkValue(this.noticePadding.left, 20)}rpx`;
457
+ return this.styleObjectToString({
458
+ padding: padding,
459
+ background: this.noticeBgColor
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
+ }
484
+ }
351
485
  },
352
486
  watch: {
353
487
  container(value, oldValue) {
@@ -363,7 +497,22 @@
363
497
  },
364
498
  methods: {
365
499
  onJfbLoad(options) {
366
- this.getContent();
500
+ this.options = options;
501
+ let { inCallback } = options;
502
+ if(!inCallback) this.$storage.remove("inCallback"); //作为入口
503
+ else {
504
+ this.$storage.set("inCallback", inCallback);
505
+ try{
506
+ inCallback = Base64.decode(inCallback);
507
+ this.inCallbackUrlOrg = options.inCallback;
508
+ }catch (e){
509
+ inCallback = null;
510
+ }
511
+ }
512
+ //登录成功调整地址优先级
513
+ this.inCallback = inCallback || this.allEntryPath || this.settings.index;
514
+
515
+ this.getCardList();
367
516
  },
368
517
  /**
369
518
  * @description 监听事件变化
@@ -394,40 +543,166 @@
394
543
  this.couponBtnRadius = getContainerPropsValue(value, "content.couponBtnRadius", 16);
395
544
  this.couponLeftBgColor = getContainerPropsValue(value, "content.couponLeftBgColor", "");
396
545
 
397
- console.log(this.couponLeftBgColor, 'couponLeftBgColor')
546
+ this.bindCardText = getContainerPropsValue(value, "content.bindCardText", "");
547
+ this.bindCardTextStyle = getContainerPropsValue(value, "content.bindCardTextStyle", {});
548
+ this.bindCardShowType = getContainerPropsValue(value, "content.bindCardShowType", 'text');
549
+ this.bindCardBtnRadius = getContainerPropsValue(value, "content.bindCardBtnRadius", 16);
550
+ this.cardBorder = getContainerPropsValue(value, "content.cardBorder", {});
551
+ this.cardShadow = getContainerPropsValue(value, "content.cardShadow", {});
552
+ this.cardImageMode = getContainerPropsValue(value, "content.cardImageMode", '');
553
+ this.allEntryPath = getContainerPropsValue(value, "content.allEntryPath", {value: ""}).value;
554
+ this.cardDetailPath = getContainerPropsValue(value, "content.cardDetailPath", {value: ""}).value;
555
+ // this.entryGroupId = getContainerPropsValue(value,"content.entryGroupId","default");
556
+ this.cardHeight = getContainerPropsValue(value, "content.cardHeight", 270);
557
+ this.cardBtnMinWidth = getContainerPropsValue(value, "content.cardBtnMinWidth", 100);
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", {});
580
+
581
+ console.log(this.cardShadow, 'cardShadow')
582
+ if(this.bindCardTextStyle && !this.bindCardTextStyle.color){
583
+ this.bindCardTextStyle.color = this.mainColor;
584
+ }
585
+ if(this.bindCardIcon && !this.bindCardIcon.color){
586
+ this.bindCardIcon.color = this.mainColor;
587
+ }
588
+ if(this.menuTabColor && !this.menuTabColor.actColor){
589
+ this.menuTabColor.actColor = this.mainColor;
590
+ }
591
+ if(this.cardBtnTextStyle){
592
+ if(!this.cardBtnTextStyle.actBgColor){
593
+ this.cardBtnTextStyle.actBgColor = this.mainColor;
594
+ }
595
+ if(!this.cardBtnTextStyle.bgColor){
596
+ this.cardBtnTextStyle.bgColor = this.mainColor;
597
+ }
598
+ }
398
599
 
399
600
  if(this.$configProject.isPreview){
400
601
  this.menuType = this.previewCurrent;
602
+ this.getCardList();
401
603
  }
402
604
  },
403
- toBindCard(){
605
+ toCardDetail(item){
404
606
  this.$xdUniHelper.navigateTo({
405
- url: this.cardBindPath
406
- })
607
+ url: this.cardDetailPath + `?card_number=${item["card_number"]}`
608
+ },false)
407
609
  },
408
- getContent() {
409
- jfbRootExec("getListBaseNewsContent", {
610
+ doCardLogin(item){
611
+ this.$xdShowLoading({});
612
+ jfbRootExec("loginTfkCardBind", {
410
613
  vm: this,
411
614
  data: {
412
- page_id: this.pageAttr["page_id"], //页面ID
413
- container_id: this.containerId, //组件ID
414
- limit: 1,
415
- },
416
- })
417
- .then((res) => {
418
- if (res.list.length > 0) {
419
- if(res.list && res.list.length > 0) {
420
- this.notice = this.$xdUniHelper.filterHtml(res.list[0].content);
421
- }
422
- this.noticeStatus = true;
615
+ card_number: item["card_number"]
616
+ }
617
+ }).then(res => {
618
+ this.$xdHideLoading();
619
+ //#ifdef MP-WEIXIN
620
+ if (this.jfbAuthorize !== null) {
621
+ this.jfbAuthorize.setCardToken(res);
622
+ }
623
+ //#endif
624
+
625
+ if (this.$configProject.isPreview) {
626
+ console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
627
+ } else {
628
+ this.$xdUniHelper.redirectTo({
629
+ url: this.inCallback,
630
+ });
631
+ }
632
+ }).catch((res) => {
633
+ this.$xdHideLoading();
634
+ });
635
+ },
636
+ changeMenu(menu){
637
+ this.menuType = menu;
638
+ this.getCardList();
639
+ },
640
+ getCardList(){
641
+ let show_type = this.menuType === 'coupon' ? 'coupon' : 'normal';
642
+ let params = {show_type};
643
+
644
+ // let params = {is_all: 'Y', is_show_entry_settings: 'Y'};
645
+ // if(options['jfb_business_code']) {
646
+ // params['card_business_code'] = options['jfb_business_code'];
647
+ // }
648
+ // if(this.entryGroupId) params['group_id'] = this.entryGroupId;
649
+ this.$xdShowLoading({});
650
+ jfbRootExec("getTfkListCardBind", {
651
+ vm: this,
652
+ data: params,
653
+ }).then(res => {
654
+ this.loadingList = false;
655
+ this.$xdHideLoading();
656
+ this.showDisabled = res.is_show_invalid_card_entrance;
657
+
658
+ let list = res.list.map(item => {
659
+ item.other_card_point = item.other_card_point ? this.$xdUniHelper.divisionFloatNumber(item.other_card_point, 100) : 0
660
+ return item;
661
+ })
662
+ if(show_type === 'coupon'){
663
+ if(this.$configProject.isPreview){
664
+ list = list.filter(item => item.consume_type == 2)
665
+ }
666
+ this.couponList = list;
667
+ }
668
+ if(show_type === 'normal'){
669
+ if(this.$configProject.isPreview){
670
+ list = list.filter(item => item.consume_type != 2)
423
671
  }
672
+ this.cardList = list;
673
+ }
674
+ })
675
+ .catch(() => this.$xdHideLoading());
676
+ },
677
+ toBindCard(){
678
+ this.$xdUniHelper.navigateTo({
679
+ url: this.cardBindPath
680
+ })
681
+ },
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);
424
696
  })
425
- .catch((error) => {
426
- console.error(error);
427
- });
697
+ })
698
+ },
699
+ toDisableUrl(){
700
+ this.$xdUniHelper.navigateTo({
701
+ url: this.disabledPath
702
+ })
428
703
  },
429
704
  onJfbScroll(options) {
430
- console.log('event.onJfbScroll', options)
705
+ // console.log('event.onJfbScroll', options)
431
706
  },
432
707
  onJfbReachBottom(options) {
433
708
  console.log('event.onJfbReachBottom', options)
@@ -469,22 +744,21 @@
469
744
  border-bottom: 1px solid transparent;
470
745
  }
471
746
  }
747
+ .bind_card{
748
+ display: flex;
749
+ align-items: center;
750
+ padding: 8rpx 20rpx;
751
+ border-radius: 16rpx;
752
+ }
472
753
  }
473
754
  &-notice {
474
755
  width: 100%;
475
- margin-top: unit(30, rpx);
476
- height: unit(80, rpx);
477
- position: relative;
756
+ box-sizing: border-box;
478
757
  &-in {
479
- position: absolute;
480
- left: unit(-30, rpx);
481
- top: unit(0, rpx);
482
- right: unit(-30, rpx);
483
- bottom: 0;
484
758
  display: flex;
485
- padding: 0 unit(30, rpx);
486
759
  overflow: hidden;
487
760
  align-items: center;
761
+ box-sizing: border-box;
488
762
  }
489
763
 
490
764
  }
@@ -519,16 +793,25 @@
519
793
  padding: 32rpx;
520
794
  background: #fff;
521
795
  border-radius: 16rpx;
522
- border: 1px solid #eeeeee;
796
+ box-sizing: border-box;
523
797
  margin: var(--card-list-margin) 0;
524
798
  position: relative;
799
+ display: flex;
800
+ flex-direction: column;
801
+ justify-content: space-between;
525
802
  .bind_point{
526
- color: #000;
527
803
  font-size: 48rpx;
804
+ ::v-deep .xd-unit{
805
+ height: auto !important;
806
+ font-weight: bold;
807
+ align-items: flex-end;
808
+ .xd-unit__unit{
809
+ line-height: 1.7 !important;
810
+ }
811
+ }
528
812
  }
529
813
  .bind_deduct{
530
814
  font-size: 28rpx;
531
- color: #999;
532
815
  background: rgba(51, 51, 51, 0.05);
533
816
  display: inline-block;
534
817
  padding: 4rpx 20rpx;
@@ -536,20 +819,17 @@
536
819
  }
537
820
  .bind_number{
538
821
  font-size: 28rpx;
539
- color: #999;
540
822
  margin-top: 20rpx;
541
823
  font-weight: 500;
542
824
  }
543
825
  .bind_time{
544
826
  font-size: 24rpx;
545
- color: #999;
546
827
  margin-top: 16rpx;
547
828
  font-weight: 500;
548
829
  line-height: 1;
549
830
  }
550
831
  .bind_type{
551
832
  font-size: 28rpx;
552
- color: #333333;
553
833
  position: absolute;
554
834
  top: 32rpx;
555
835
  right: 32rpx;
@@ -566,10 +846,17 @@
566
846
  background: #ddd;
567
847
  padding: 16rpx 60rpx;
568
848
  border-radius: 12rpx;
849
+ display: flex;
850
+ align-items: center;
851
+ justify-content: center;
569
852
  }
570
853
  }
571
854
  }
572
- .coupon_list{}
855
+ .coupon_list{
856
+ ::v-deep .xd-coupon_item{
857
+ margin: var(--card-list-margin) 0;
858
+ }
859
+ }
573
860
  .no_more_card{
574
861
  text-align: center;
575
862
  padding: 20rpx 0;