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
@@ -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,15 @@
193
197
  validImageAPIUrl: "",
194
198
  valid_token: "",
195
199
  formRenderKey: "formRenderKey",
200
+ hasCon: "", //是否有优惠券
196
201
 
197
202
  //todo
198
203
  tips: "",
199
204
  labelWidth: 180,
200
205
  labelAlign: "left",
206
+ digitalLabelAlign: "left",
201
207
  labelPosition: "left",
208
+ digitalLabelPosition: "left",
202
209
  inputStyle: "linear", //输入框样式 linear:线性 face: 面性
203
210
  formBorderColor: "#F9F9F9", //
204
211
  formBorderWidth: 1, //表单边框宽度
@@ -252,11 +259,17 @@
252
259
  digitalCodeLabelWidth: "",
253
260
  digitalCodeRadius: 0,
254
261
  digitalCodeColor: "",
262
+ my_card_url: "",
263
+ backUrl: "",
264
+ digitalInputStyle: "",
265
+ digitalCodeLabel: "",
266
+ formBorderRadius: 16,
255
267
  }
256
268
  },
257
269
  computed: {
258
270
  ...mapState({
259
- brandInfo: state => state.brandInfo
271
+ brandInfo: state => state.brandInfo,
272
+ jwxSDK: (state) => state.jwxSDK,
260
273
  }),
261
274
  cardFormStyle(){
262
275
  let padding = `${this.checkValue(this.formPadding.top, 20)}rpx`;
@@ -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,22 @@
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
+ if (!this.$configProject.isPreview) {
382
+ jfbRootExec("getH5WxAuthorize", {
383
+ vm: this,
384
+ data: {site_id: "wx_pub"},
385
+ })
386
+ .then(res => {
387
+ console.log(0)
388
+ })
389
+ .catch(error=>{
390
+ this.$xdAlert({
391
+ content: error,
392
+ });
393
+ })
394
+ }
395
+ // #endif
366
396
  },
367
397
  methods: {
368
398
  onJfbLoad(options) {
@@ -407,21 +437,187 @@
407
437
  this.digitalCodeLabelWidth = getContainerPropsValue(value, "content.digitalCodeLabelWidth", '100');
408
438
  this.digitalCodeRadius = getContainerPropsValue(value, "content.digitalCodeRadius", '0');
409
439
  this.digitalCodeColor = getContainerPropsValue(value, "content.digitalCodeColor", '#dddddd');
440
+ this.digitalInputStyle = getContainerPropsValue(value, "content.digitalInputStyle", 'linear');
441
+ this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
442
+ this.backUrl = getContainerPropsValue(this.container, 'content.back_url', { value: "" }).value;
443
+ this.digitalLabelPosition = getContainerPropsValue(value, "content.digitalLabelPosition", 'left');
444
+ this.digitalLabelAlign = getContainerPropsValue(value, "content.digitalLabelAlign", 'left');
445
+ this.digitalCodeLabel = getContainerPropsValue(value, "content.digitalCodeLabel", '');
446
+ this.formBorderRadius = getContainerPropsValue(value, "content.formBorderRadius", 16);
410
447
 
411
448
  console.log(this.digitalCodeRadius, "digitalCodeRadius");
412
449
 
413
450
  if(this.inputStyle === 'face'){
414
451
  this.labelPosition = 'left';
415
- this.labelAlign = 'left';
452
+ // this.labelAlign = 'left';
453
+ }
454
+ if(this.digitalInputStyle === 'face'){
455
+ this.digitalLabelPosition = 'left';
456
+ // this.digitalLabelAlign = 'left';
416
457
  }
417
458
  if(this.$configProject.isPreview){
418
459
  this.menuType = this.previewCurrent;
419
460
  this.formRenderKey = Date.now();
420
461
  }
421
462
  },
422
-
463
+ toShowCouponDialog(){
464
+ if(this.info){
465
+ jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.form.card_number})
466
+ }
467
+ },
468
+ switchShowType(type){
469
+ this.menuType = type;
470
+ this.formRenderKey = Date.now();
471
+ },
472
+ handlerAfterBindCard(res){
473
+ //已绑定卡券处理
474
+ if(res.pop_info && res.pop_info.pop_code === '1001'){
475
+ this.handleBindConfirm();
476
+ return;
477
+ }
478
+ let path = this.getUrlCallback(this.my_card_url || this.backUrl);
479
+ //有优惠券处理
480
+ if(this.hasCon){
481
+ this.toShowCouponDialog();
482
+ this.$bus.$on("onCloseConDialog",(container_id) => {
483
+ if(container_id === this.hasCon){
484
+ this.$xdUniHelper.redirectTo({
485
+ url: path,
486
+ });
487
+ }
488
+ })
489
+ }
490
+
491
+ //票券绑定成功
492
+ else{
493
+ this.$xdAlert({
494
+ content: "票券绑定成功",
495
+ close: () => {
496
+ this.$xdUniHelper.redirectTo({
497
+ url: path,
498
+ });
499
+ },
500
+ });
501
+ }
502
+ },
503
+ //卡券已被自己绑定时的弹框
504
+ handleBindConfirm(){
505
+ this.$xdConfirm({
506
+ styles: this.styles,
507
+ width: '90%',
508
+ content: '您已绑定该票券,无需再次绑定',
509
+ confirmText: '我的票券',
510
+ cancelText: '返回',
511
+ showClose: false,
512
+ success: (res) => {
513
+ if (res.confirm) {
514
+ let path = this.getUrlCallback(this.my_card_url || this.backUrl);
515
+ this.$xdUniHelper.redirectTo({ url: path});
516
+ }else{
517
+ }
518
+ }
519
+ })
520
+ },
521
+ //绑定实体券
522
+ async toBindCardTicket(){
523
+ console.log(this.form, 'this.form')
524
+ const { card_password, card_number, valid_code } = this.form;
525
+ if(!valid_code) return uni.showToast({
526
+ title: '请输入验证码',
527
+ icon: "none"
528
+ })
529
+ await this.checkValidToken();
530
+
531
+ jfbRootExec("pwdCardBind", {
532
+ vm: this,
533
+ data: {
534
+ card_password: card_password,
535
+ card_number: card_number + "",
536
+ is_show_pop: "Y"
537
+ }
538
+ }).then(res => {
539
+ this.handlerAfterBindCard(res);
540
+ })
541
+ },
542
+ //绑定电子码票券
543
+ toBindCardDigital(){
544
+ const { code } = this.form;
545
+
546
+ if(!code) {
547
+ uni.showToast({
548
+ title: '请输入电子码',
549
+ icon: "none"
550
+ });
551
+ return ""
552
+ };
553
+ jfbRootExec("pwdCardBind", {
554
+ vm: this,
555
+ data: {
556
+ card_password: code,
557
+ is_show_pop: "Y"
558
+ }
559
+ }).then(res => {
560
+ this.handlerAfterBindCard(res);
561
+ })
562
+ },
563
+ checkValidToken(){
564
+ const { valid_code } = this.form;
565
+ let token = this.valid_token;
566
+ return new Promise((r,j) => {
567
+ jfbRootExec("checkValidCode", {
568
+ vm: this,
569
+ data: {
570
+ token,
571
+ valid_code
572
+ }
573
+ }).then(res => {
574
+ if(res.is_valid){
575
+ r();
576
+ }else{
577
+ uni.showToast({
578
+ title: '验证码错误',
579
+ duration: 2000,
580
+ icon: "none"
581
+ });
582
+ this.switchValidToken();
583
+ j();
584
+ }
585
+ })
586
+ })
587
+ },
588
+ switchValidToken(){
589
+ let valid_token = this.$xdUniHelper.randomChar(20);
590
+ this.valid_token = valid_token;
591
+ },
592
+ doScanCode(){
593
+ console.log("开始扫码");
594
+ // #ifdef H5
595
+ this.jwxSDK.scanQRCode({
596
+ needResult: 1,
597
+ scanType: ["qrCode"],
598
+ success: res => {
599
+ this.$set(this.form, 'card_number', res.resultStr)
600
+ },
601
+ fail: (error) => {
602
+ if (typeof error === 'string') error = {error: error}
603
+ if (window['jwxJfbSDKParams']) error = Object.assign(error, window['jwxJfbSDKParams'])
604
+ this.$xdLog.setARMSError(error)
605
+ }
606
+ })
607
+ // #endif
608
+ // #ifdef MP
609
+ uni.scanCode({
610
+ success: res => {
611
+ this.$set(this.form, 'card_number', res.result)
612
+ },
613
+ fail: (error) => {
614
+ this.$xdLog.setARMSError(error)
615
+ },
616
+ })
617
+ // #endif
618
+ },
423
619
  onJfbScroll(options) {
424
- console.log('event.onJfbScroll', options)
620
+ // console.log('event.onJfbScroll', options)
425
621
  },
426
622
  onJfbReachBottom(options) {
427
623
  console.log('event.onJfbReachBottom', options)
@@ -438,9 +634,12 @@
438
634
  onJfbUpdate(...data) {
439
635
  console.log('event.onJfbUpdate', data)
440
636
  },
441
- onJfbCustomEvent(options) {
442
- console.log('event.onJfbReachBottom', options)
443
- },
637
+ onJfbCustomEvent({action, data}){
638
+ if(action === 'baseConDialog@hasCon'){
639
+ this.hasCon = data;
640
+ }
641
+ console.log('onJfbCustomEvent',action, data);
642
+ }
444
643
  }
445
644
  }
446
645
 
@@ -457,6 +656,9 @@
457
656
  &__body{
458
657
  .form-item {
459
658
  ::v-deep &.uni-forms-item {
659
+ .is-required{
660
+ display: none;
661
+ }
460
662
  .uni-input-input{
461
663
  font-size: var(--content-font-size);
462
664
  color: var(--content-font-color);
@@ -478,14 +680,16 @@
478
680
  }
479
681
  &.linear{
480
682
  ::v-deep &.uni-forms-item--border{
481
- border-color: var(--form-border-color) !important;
482
- border-width: var(--form-border-width) !important;
683
+ // border-color: var(--form-border-color) !important;
684
+ // border-width: var(--form-border-width) !important;
685
+ border-top: none !important;
686
+ border-bottom: var(--form-border-width) solid var(--form-border-color) !important;
483
687
  }
484
688
  }
485
689
  &.face{
486
690
  ::v-deep .uni-forms-item__box{
487
691
  background: #F7F7F7;
488
- border-radius: 16rpx;
692
+ border-radius: var(--form-border-radius);
489
693
  padding-right: 20rpx;
490
694
  }
491
695
  ::v-deep &.uni-forms-item--border{
@@ -508,13 +712,23 @@
508
712
  }
509
713
  }
510
714
  &.digital_item{
715
+ &.linear{
716
+ ::v-deep &.uni-forms-item--border{
717
+ border-color: var(--digital-border-color) !important;
718
+ }
719
+ }
720
+ &.face{
721
+ ::v-deep .uni-forms-item__box{
722
+ border-radius: var(--digital-border-radius);
723
+ }
724
+ }
511
725
  ::v-deep .label-icon{
512
726
  font-size: var(--digital-icon-size) !important;
513
727
  }
514
728
  ::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);
729
+ // padding-bottom: 0% !important;
730
+ // border: 1px solid var(--digital-border-color);
731
+ // border-radius: var(--digital-border-radius);
518
732
  }
519
733
  }
520
734
  }
@@ -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: '获取内容',