jufubao-base 1.0.169-beta2 → 1.0.169-beta20

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 +217 -19
  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 +393 -106
  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 +350 -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
@@ -16,6 +16,7 @@
16
16
  <view class="jfb-base-tfk-card-bind__body" :style="{
17
17
  '--form-border-color': formBorderColor,
18
18
  '--form-border-width': formBorderWidth + 'px',
19
+ '--form-border-radius': ($rpxNum * Number(formBorderRadius)) + 'px',
19
20
  '--form-input-padding': inputPadding + 'px',
20
21
  '--label-font-size': ($rpxNum * parseInt(labelFont.fontSize)) + 'px',
21
22
  '--label-font-color': labelFont.color,
@@ -35,11 +36,11 @@
35
36
  }">
36
37
  <view class="menu_wrap" :style="menuBoxStyle">
37
38
  <view class="menu_list">
38
- <view class="menu_item">
39
+ <view class="menu_item" @click="switchShowType('ticket')">
39
40
  <view class="menu_inner" :class="menuShowType"
40
41
  :style="[menuType == 'ticket' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">实体券</view>
41
42
  </view>
42
- <view class="menu_item">
43
+ <view class="menu_item" @click="switchShowType('code')">
43
44
  <view class="menu_inner" :class="menuShowType"
44
45
  :style="[menuType == 'code' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">电子码</view>
45
46
  </view>
@@ -67,7 +68,7 @@
67
68
  v-model="form.card_number"
68
69
  placeholder="请输入票券号"
69
70
  />
70
- <view>
71
+ <view @click="doScanCode">
71
72
  <xd-font-icon :icon="scanIcon.icon || 'iconsaoma'"
72
73
  :color="scanIcon.color"
73
74
  :style="{fontSize: scanIcon.fontSize}"
@@ -114,6 +115,7 @@
114
115
  <view :style="btnWrapStyle">
115
116
  <xd-button type="primary"
116
117
  :radius="btnRadius + 'rpx'"
118
+ @click="toBindCardTicket"
117
119
  >
118
120
  <xd-font-icon :icon="btnIcon.icon"
119
121
  style="display: inline-flex;margin-right: 12rpx;"
@@ -127,24 +129,26 @@
127
129
  </view>
128
130
  <view v-else class="form_wrap" :style="digitalFormStyle">
129
131
  <xd-form :key="formRenderKey"
130
- label-align="left"
131
- labelPosition="left"
132
+ :label-align="digitalLabelAlign"
133
+ :labelPosition="digitalLabelPosition"
132
134
  :border="true"
133
135
  paddingBetween="0"
134
136
  >
135
137
  <xd-form-item class="form-item digital_item"
136
- label=""
138
+ :class="[digitalInputStyle]"
139
+ :label="digitalCodeLabel"
137
140
  :labelWidth="digitalCodeLabelWidth"
138
141
  :leftIcon="digitalCodeIcon.icon"
139
142
  :iconColor="digitalCodeIcon.color"
140
143
  content-align="left"
141
144
  >
142
- <xd-form-input placeholder="请输入票券号" v-model="form.code" />
145
+ <xd-form-input prefixIcon="1" placeholder="请输入票券号" v-model="form.code" />
143
146
  </xd-form-item>
144
147
  </xd-form>
145
148
  <view :style="digitalBtnWrapStyle">
146
149
  <xd-button type="primary"
147
150
  :radius="btnRadius + 'rpx'"
151
+ @click="toBindCardDigital"
148
152
  >
149
153
  <xd-font-icon :icon="btnIcon.icon"
150
154
  style="display: inline-flex;margin-right: 12rpx;"
@@ -193,12 +197,16 @@
193
197
  validImageAPIUrl: "",
194
198
  valid_token: "",
195
199
  formRenderKey: "formRenderKey",
200
+ hasCon: "", //是否有优惠券
201
+ jwxSDK: null,
196
202
 
197
203
  //todo
198
204
  tips: "",
199
205
  labelWidth: 180,
200
206
  labelAlign: "left",
207
+ digitalLabelAlign: "left",
201
208
  labelPosition: "left",
209
+ digitalLabelPosition: "left",
202
210
  inputStyle: "linear", //输入框样式 linear:线性 face: 面性
203
211
  formBorderColor: "#F9F9F9", //
204
212
  formBorderWidth: 1, //表单边框宽度
@@ -252,6 +260,11 @@
252
260
  digitalCodeLabelWidth: "",
253
261
  digitalCodeRadius: 0,
254
262
  digitalCodeColor: "",
263
+ my_card_url: "",
264
+ backUrl: "",
265
+ digitalInputStyle: "",
266
+ digitalCodeLabel: "",
267
+ formBorderRadius: 16,
255
268
  }
256
269
  },
257
270
  computed: {
@@ -316,6 +329,7 @@
316
329
  return this.styleObjectToString({
317
330
  background: this.tipBgColor,
318
331
  padding: padding,
332
+ fontSize: '24rpx',
319
333
  })
320
334
  },
321
335
  menuItemBoxStyle(){
@@ -363,6 +377,16 @@
363
377
  this.validImageAPIUrl = this.brandInfo['api_host'] + '/common/v1/valid_code/image/show'
364
378
  this.valid_token = this.$xdUniHelper.randomChar(20);
365
379
  //todo
380
+ // #ifdef H5
381
+ jfbRootExec("getH5WxAuthorize", {
382
+ vm: this,
383
+ data: {
384
+ jsApiList: ["chooseWXPay"],
385
+ }
386
+ }).then(res => {
387
+ this.jwxSDK = res.jwxSDK;
388
+ })
389
+ // #endif
366
390
  },
367
391
  methods: {
368
392
  onJfbLoad(options) {
@@ -407,21 +431,177 @@
407
431
  this.digitalCodeLabelWidth = getContainerPropsValue(value, "content.digitalCodeLabelWidth", '100');
408
432
  this.digitalCodeRadius = getContainerPropsValue(value, "content.digitalCodeRadius", '0');
409
433
  this.digitalCodeColor = getContainerPropsValue(value, "content.digitalCodeColor", '#dddddd');
434
+ this.digitalInputStyle = getContainerPropsValue(value, "content.digitalInputStyle", 'linear');
435
+ this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
436
+ this.backUrl = getContainerPropsValue(this.container, 'content.back_url', { value: "" }).value;
437
+ this.digitalLabelPosition = getContainerPropsValue(value, "content.digitalLabelPosition", 'left');
438
+ this.digitalLabelAlign = getContainerPropsValue(value, "content.digitalLabelAlign", 'left');
439
+ this.digitalCodeLabel = getContainerPropsValue(value, "content.digitalCodeLabel", '');
440
+ this.formBorderRadius = getContainerPropsValue(value, "content.formBorderRadius", 16);
410
441
 
411
442
  console.log(this.digitalCodeRadius, "digitalCodeRadius");
412
443
 
413
444
  if(this.inputStyle === 'face'){
414
445
  this.labelPosition = 'left';
415
- this.labelAlign = 'left';
446
+ // this.labelAlign = 'left';
447
+ }
448
+ if(this.digitalInputStyle === 'face'){
449
+ this.digitalLabelPosition = 'left';
450
+ // this.digitalLabelAlign = 'left';
416
451
  }
417
452
  if(this.$configProject.isPreview){
418
453
  this.menuType = this.previewCurrent;
419
454
  this.formRenderKey = Date.now();
420
455
  }
421
456
  },
422
-
457
+ toShowCouponDialog(){
458
+ if(this.info){
459
+ jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.form.card_number})
460
+ }
461
+ },
462
+ switchShowType(type){
463
+ this.menuType = type;
464
+ },
465
+ handlerAfterBindCard(res){
466
+ //已绑定卡券处理
467
+ if(res.pop_info && res.pop_info.pop_code === '1001'){
468
+ this.handleBindConfirm();
469
+ return;
470
+ }
471
+ let path = this.getUrlCallback(this.my_card_url || this.backUrl);
472
+ //有优惠券处理
473
+ if(this.hasCon){
474
+ this.toShowCouponDialog();
475
+ this.$bus.$on("onCloseConDialog",(container_id) => {
476
+ if(container_id === this.hasCon){
477
+ this.$xdUniHelper.redirectTo({
478
+ url: path,
479
+ });
480
+ }
481
+ })
482
+ }
483
+
484
+ //票券绑定成功
485
+ else{
486
+ this.$xdAlert({
487
+ content: "票券绑定成功",
488
+ close: () => {
489
+ this.$xdUniHelper.redirectTo({
490
+ url: path,
491
+ });
492
+ },
493
+ });
494
+ }
495
+ },
496
+ //卡券已被自己绑定时的弹框
497
+ handleBindConfirm(){
498
+ this.$xdConfirm({
499
+ styles: this.styles,
500
+ width: '90%',
501
+ content: '您已绑定该票券,无需再次绑定',
502
+ confirmText: '我的票券',
503
+ cancelText: '返回',
504
+ showClose: false,
505
+ success: (res) => {
506
+ if (res.confirm) {
507
+ let path = this.getUrlCallback(this.my_card_url || this.backUrl);
508
+ this.$xdUniHelper.redirectTo({ url: path});
509
+ }else{
510
+ }
511
+ }
512
+ })
513
+ },
514
+ //绑定实体券
515
+ async toBindCardTicket(){
516
+ console.log(this.form, 'this.form')
517
+ const { card_password, card_number, valid_code } = this.form;
518
+ if(!valid_code) return uni.showToast({
519
+ title: '请输入验证码',
520
+ icon: "none"
521
+ })
522
+ await this.checkValidToken();
523
+
524
+ jfbRootExec("pwdCardBind", {
525
+ vm: this,
526
+ data: {
527
+ card_password: card_password,
528
+ card_number: card_number + "",
529
+ is_show_pop: "Y"
530
+ }
531
+ }).then(res => {
532
+ this.handlerAfterBindCard(res);
533
+ })
534
+ },
535
+ //绑定电子码票券
536
+ toBindCardDigital(){
537
+ const { code } = this.form;
538
+
539
+ if(!code) {
540
+ uni.showToast({
541
+ title: '请输入电子码',
542
+ icon: "none"
543
+ });
544
+ return ""
545
+ };
546
+ jfbRootExec("pwdCardBind", {
547
+ vm: this,
548
+ data: {
549
+ card_password: code,
550
+ is_show_pop: "Y"
551
+ }
552
+ }).then(res => {
553
+ this.handlerAfterBindCard(res);
554
+ })
555
+ },
556
+ checkValidToken(){
557
+ const { valid_code } = this.form;
558
+ let token = this.valid_token;
559
+ return new Promise((r,j) => {
560
+ jfbRootExec("checkValidCode", {
561
+ vm: this,
562
+ data: {
563
+ token,
564
+ valid_code
565
+ }
566
+ }).then(res => {
567
+ if(res.is_valid){
568
+ r();
569
+ }else{
570
+ uni.showToast({
571
+ title: '验证码错误',
572
+ duration: 2000,
573
+ icon: "none"
574
+ });
575
+ this.switchValidToken();
576
+ j();
577
+ }
578
+ })
579
+ })
580
+ },
581
+ switchValidToken(){
582
+ let valid_token = this.$xdUniHelper.randomChar(20);
583
+ this.valid_token = valid_token;
584
+ },
585
+ doScanCode(){
586
+ console.log("开始扫码");
587
+ // #ifdef H5
588
+ this.jwxSDK.scanQRCode({
589
+ needResult: 1,
590
+ success: res => {
591
+ this.$set(this.form, 'card_number', res.resultStr)
592
+ }
593
+ })
594
+ // #endif
595
+ // #ifdef MP
596
+ uni.scanCode({
597
+ success: res => {
598
+ this.$set(this.form, 'card_number', res.result)
599
+ }
600
+ })
601
+ // #endif
602
+ },
423
603
  onJfbScroll(options) {
424
- console.log('event.onJfbScroll', options)
604
+ // console.log('event.onJfbScroll', options)
425
605
  },
426
606
  onJfbReachBottom(options) {
427
607
  console.log('event.onJfbReachBottom', options)
@@ -438,9 +618,12 @@
438
618
  onJfbUpdate(...data) {
439
619
  console.log('event.onJfbUpdate', data)
440
620
  },
441
- onJfbCustomEvent(options) {
442
- console.log('event.onJfbReachBottom', options)
443
- },
621
+ onJfbCustomEvent({action, data}){
622
+ if(action === 'baseConDialog@hasCon'){
623
+ this.hasCon = data;
624
+ }
625
+ console.log('onJfbCustomEvent',action, data);
626
+ }
444
627
  }
445
628
  }
446
629
 
@@ -457,6 +640,9 @@
457
640
  &__body{
458
641
  .form-item {
459
642
  ::v-deep &.uni-forms-item {
643
+ .is-required{
644
+ display: none;
645
+ }
460
646
  .uni-input-input{
461
647
  font-size: var(--content-font-size);
462
648
  color: var(--content-font-color);
@@ -478,14 +664,16 @@
478
664
  }
479
665
  &.linear{
480
666
  ::v-deep &.uni-forms-item--border{
481
- border-color: var(--form-border-color) !important;
482
- border-width: var(--form-border-width) !important;
667
+ // border-color: var(--form-border-color) !important;
668
+ // border-width: var(--form-border-width) !important;
669
+ border-top: none !important;
670
+ border-bottom: var(--form-border-width) solid var(--form-border-color) !important;
483
671
  }
484
672
  }
485
673
  &.face{
486
674
  ::v-deep .uni-forms-item__box{
487
675
  background: #F7F7F7;
488
- border-radius: 16rpx;
676
+ border-radius: var(--form-border-radius);
489
677
  padding-right: 20rpx;
490
678
  }
491
679
  ::v-deep &.uni-forms-item--border{
@@ -508,13 +696,23 @@
508
696
  }
509
697
  }
510
698
  &.digital_item{
699
+ &.linear{
700
+ ::v-deep &.uni-forms-item--border{
701
+ border-color: var(--digital-border-color) !important;
702
+ }
703
+ }
704
+ &.face{
705
+ ::v-deep .uni-forms-item__box{
706
+ border-radius: var(--digital-border-radius);
707
+ }
708
+ }
511
709
  ::v-deep .label-icon{
512
710
  font-size: var(--digital-icon-size) !important;
513
711
  }
514
712
  ::v-deep .uni-forms-item__inner{
515
- padding-bottom: 0% !important;
516
- border: 1px solid var(--digital-border-color);
517
- border-radius: var(--digital-border-radius);
713
+ // padding-bottom: 0% !important;
714
+ // border: 1px solid var(--digital-border-color);
715
+ // border-radius: var(--digital-border-radius);
518
716
  }
519
717
  }
520
718
  }
@@ -1,13 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
-
5
- getTfkByIdFilmSquate:{},
6
-
7
- updateTfkFilmPaiqiDate:{},
8
-
9
- removeTfkFilmAddress:{},
10
-
11
- addTfkFilmcart:{},
12
-
4
+ getByPwdCardDetail: {
5
+ "card_number": "101001000005195",
6
+ "card_point": 0,
7
+ "card_type_name": "聚福宝",
8
+ "end_time": "2024-10-31 23:59:59",
9
+ "card_status": "Y",
10
+ "card_status_name": "开启",
11
+ "unit": "点",
12
+ "main_product_name": "",
13
+ "is_exchange": "N",
14
+ "is_expired":'Y',
15
+ "request_id": "741c41d86c5ae0cf",
16
+ "main_business_code_name": "蛋糕(勿改)",
17
+ "other_card_point": 4073,
18
+ },
19
+ pwdCardBind: { "id": 20, "request_id": "91f76bd11d5889be" },
20
+ qrcodeCardBind: {},
21
+ getByQrCardDetail: {},
22
+ qrCardBind: {},
13
23
  }
@@ -16,6 +16,17 @@ module.exports = [
16
16
  },
17
17
  disabled: true,
18
18
  },
19
+ {
20
+ mapFnName: 'loginTfkCardBind',
21
+ isRule: false,
22
+ title: '登录卡',
23
+ prefix: 'login',
24
+ path: '/card/v1/card-bind/login-card',
25
+ data: {
26
+ card_number: ['卡号', 'String', '必选'],
27
+ },
28
+ disabled: true,
29
+ },
19
30
  {
20
31
  mapFnName: 'getListBaseNewsContent', //自定义方法名字(必选)
21
32
  title: '获取内容',