jufubao-base 1.0.186-beta2 → 1.0.186

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.186-beta2",
3
+ "version": "1.0.186",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -122,11 +122,11 @@
122
122
  color: subTabIndex === 1 ? mainColor : '#fff',
123
123
  background: subTabIndex === 1 ? noticeBackgroundColor : '#DDDDDD',
124
124
  }" @click="subTabIndex=1" class="jfb-base-card-entry__body-sub-tab-item">可用票券</view>
125
- <view :style="{
125
+ <view v-if="isChange === 'Y'" :style="{
126
126
  color: subTabIndex === 2 ? mainColor : '#fff',
127
127
  background: subTabIndex === 2 ? noticeBackgroundColor : '#DDDDDD',
128
128
  }" @click="subTabIndex=2" class="jfb-base-card-entry__body-sub-tab-item">可转票券</view>
129
- <view :style="{
129
+ <view v-if="isTransfering === 'Y'" :style="{
130
130
  color: subTabIndex === 3 ? mainColor : '#fff',
131
131
  background: subTabIndex === 3 ? noticeBackgroundColor : '#DDDDDD',
132
132
  }" @click="subTabIndex=3" class="jfb-base-card-entry__body-sub-tab-item">赠送中</view>
@@ -217,7 +217,7 @@
217
217
  </view>
218
218
  <template v-if="subTabIndex === 1">
219
219
  <view class="card-list__entry" v-if="item.is_login==='N'&&force">
220
- <view
220
+ <view
221
221
  @click.stop="handleBindLogin(item,item['entries'][0])"
222
222
  :style="{
223
223
  background: '#fff',
@@ -485,6 +485,8 @@ export default {
485
485
  return {
486
486
  options:{},
487
487
  inCallbackUrlOrg:'',//是否带有回调地址
488
+ isChange:'N',
489
+ isTransfering:'N',
488
490
 
489
491
  //提示文案
490
492
  noticeBackgroundColor: "",
@@ -614,6 +616,7 @@ export default {
614
616
  },
615
617
 
616
618
  handleToLink(path) {
619
+ if (this.$configProject['isPreview']) return
617
620
  path = this.getUrlCallback(path)
618
621
  this.$xdUniHelper.navigateTo({
619
622
  url: path,
@@ -689,6 +692,13 @@ export default {
689
692
  });
690
693
  },
691
694
 
695
+ checkTabStatus(res){
696
+ this.$xdUniHelper.cloneDeep(res.list).filter(item=>item.is_valid === 'Y').map(item=>{
697
+ if(item.is_transfering === 'Y') this.isTransfering = 'Y'
698
+ if(item.is_exchange === 'Y') this.isChange = 'Y'
699
+ });
700
+ },
701
+
692
702
  /**
693
703
  * @description 已绑定卡登录
694
704
  * @param item
@@ -765,6 +775,8 @@ export default {
765
775
  },
766
776
 
767
777
  handleClick(entry){
778
+ if (this.$configProject['isPreview']) return
779
+
768
780
  const {dir, path, host, appType} = entry['redirect_data'];
769
781
  let regHttp = /^(\/\/|http:\/\/|https:\/\/).+$/;
770
782
  let regSp = /(-apiuri\/v)/;
@@ -817,6 +829,7 @@ export default {
817
829
  },
818
830
 
819
831
  toDetail(item, out=true) {
832
+ if (this.$configProject['isPreview']) return
820
833
  if(this.subTabIndex===3) {
821
834
  this.$xdUniHelper.navigateTo({
822
835
  url: `${this.give_url}?card_number=${item["card_number"]}`,
@@ -872,16 +885,16 @@ export default {
872
885
  if(this.isPreview) {
873
886
  res.list = this.testCouponList
874
887
  }
875
- //过滤入口配置
888
+ //过滤入口配置
876
889
  res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
877
890
  let newCardList = this.$xdUniHelper.cloneDeep(res.list);
878
891
  this.couponList = this.getCardGroupItem(newCardList, res['site_entry_settings']);
879
892
  console.log(this.couponList,'this.couponList');
880
-
893
+
881
894
  this.$xdHideLoading({});
882
895
 
883
896
  }) .catch(() => this.$xdHideLoading());
884
-
897
+
885
898
  },
886
899
 
887
900
  getCardList(options) {
@@ -912,6 +925,8 @@ export default {
912
925
  };
913
926
  });
914
927
 
928
+ this.checkTabStatus(res);
929
+
915
930
  //过滤入口配置
916
931
  res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
917
932
 
@@ -928,7 +943,7 @@ export default {
928
943
  type = 'is_transfering'
929
944
  }
930
945
  console.log(this.ajaxCardList, type, 'this.ajaxCardList, type');
931
-
946
+
932
947
  this.handleCardInit(this.ajaxCardList, type);
933
948
  this.cardPageNum = 1;
934
949
  this.$xdHideLoading();
@@ -2,125 +2,136 @@
2
2
 
3
3
  module.exports = {
4
4
  getListEntryCardBind: {
5
- "list": [{
6
- "card_number": "101001000008422",
7
- "card_point": 100000,
8
- "card_type": "27",
9
- "card_type_name": "聚福宝福",
10
- "unit": "",
11
- "end_time": "2025-04-30",
12
- "is_valid": "Y",
13
- "main_business_code_name": "",
14
- "other_card_point": 0,
15
- "is_exchange": "N",
16
- "card_point_type": 1,
17
- "is_login":'Y',
18
- "business_codes": ["health"]
19
- }, {
20
- "card_number": "121000100000028",
21
- "card_point": 10000,
22
- "card_type": "44",
23
- "card_type_name": "抵扣券测试",
24
- "unit": "",
25
- "end_time": "2024-10-31",
26
- "is_valid": "Y",
27
- "main_business_code_name": "",
28
- "other_card_point": 0,
29
- "is_exchange": "N",
30
- "card_point_type": 1,
31
- "business_codes": ["health"]
32
- }, {
33
- "card_number": "101001000005192",
34
- "card_point": 100000000,
35
- "card_type": "27",
36
- "card_type_name": "聚福宝福",
37
- "unit": "点",
38
- "end_time": "2024-10-31",
39
- "is_valid": "Y",
40
- "main_business_code_name": "",
41
- "other_card_point": 0,
42
- "is_exchange": "N",
43
- "card_point_type": 1,
44
- "business_codes": ["movie", "market", "cake", "book", "video", "play", "health", "small", "travel", "supermarket", "food"]
45
- }, {
46
- "card_number": "101001000008421",
47
- "card_point": 100000,
48
- "card_type": "27",
49
- "card_type_name": "聚福宝福",
50
- "unit": "",
51
- "end_time": "2024-12-31",
52
- "is_valid": "Y",
53
- "main_business_code_name": "",
54
- "other_card_point": 0,
55
- "is_exchange": "N",
56
- "card_point_type": 1,
57
- "business_codes": ["cake"]
58
- }, {
59
- "card_number": "171003500000385",
60
- "card_point": 10000,
61
- "card_type": "39",
62
- "card_type_name": "一对一次卡(无限制)",
63
- "unit": "次",
64
- "end_time": "2024-08-31",
65
- "is_valid": "Y",
66
- "main_business_code_name": "",
67
- "other_card_point": 0,
68
- "is_exchange": "Y",
69
- "card_point_type": 1,
70
- "business_codes": ["movie", "market", "cake"]
71
- }, {
72
- "card_number": "101001000007175",
73
- "card_point": 9998700,
74
- "card_type": "27",
75
- "card_type_name": "聚福宝福",
76
- "unit": "",
77
- "end_time": "2023-10-31",
78
- "is_valid": "Y",
79
- "main_business_code_name": "",
80
- "other_card_point": 0,
81
- "is_exchange": "N",
82
- "card_point_type": 1,
83
- "business_codes": ["movie", "market", "cake", "video", "play", "health"]
84
- }, {
85
- "card_number": "261001000002666",
86
- "card_point": 0,
87
- "card_type": "35",
88
- "card_type_name": "大礼包测试",
89
- "unit": "次",
90
- "end_time": "2025-02-28",
91
- "is_valid": "N",
92
- "main_business_code_name": "",
93
- "other_card_point": 0,
94
- "is_exchange": "N",
95
- "card_point_type": 1,
96
- "business_codes": ["gift"]
97
- }, {
98
- "card_number": "261001000002518",
99
- "card_point": 100000,
100
- "card_type": "31",
101
- "card_type_name": "加盟商福卡",
102
- "unit": "",
103
- "end_time": "2023-08-29",
104
- "is_valid": "N",
105
- "main_business_code_name": "",
106
- "other_card_point": 0,
107
- "is_exchange": "N",
108
- "card_point_type": 1,
109
- "business_codes": ["movie", "market", "cake", "book", "video", "play", "health", "small", "travel", "supermarket", "food"]
110
- }, {
111
- "card_number": "261001000000344",
112
- "card_point": 100,
113
- "card_type": "35",
114
- "card_type_name": "大礼包测试",
115
- "unit": "",
116
- "end_time": "2023-07-21",
117
- "is_valid": "N",
118
- "main_business_code_name": "",
119
- "other_card_point": 0,
120
- "is_exchange": "N",
121
- "card_point_type": 1,
122
- "business_codes": ["movie", "market", "cake", "book", "gift", "video", "play", "health", "small", "travel"]
123
- }],
5
+ "list": [
6
+ {
7
+ "card_number": "101001000008422",
8
+ "card_point": 100000,
9
+ "card_type": "27",
10
+ "card_type_name": "聚福宝福",
11
+ "unit": "",
12
+ "end_time": "2025-04-30",
13
+ "is_valid": "Y",
14
+ "main_business_code_name": "",
15
+ "other_card_point": 0,
16
+ "is_exchange": "N",
17
+ "is_transfering":"Y",
18
+ "card_point_type": 1,
19
+ "is_login":'Y',
20
+ "business_codes": ["health"]
21
+ }, {
22
+ "card_number": "121000100000028",
23
+ "card_point": 10000,
24
+ "card_type": "44",
25
+ "card_type_name": "抵扣券测试",
26
+ "unit": "",
27
+ "end_time": "2024-10-31",
28
+ "is_valid": "Y",
29
+ "main_business_code_name": "",
30
+ "other_card_point": 0,
31
+ "is_exchange": "N",
32
+ "is_transfering":"Y",
33
+ "card_point_type": 1,
34
+ "business_codes": ["health"]
35
+ }, {
36
+ "card_number": "101001000005192",
37
+ "card_point": 100000000,
38
+ "card_type": "27",
39
+ "card_type_name": "聚福宝福",
40
+ "unit": "",
41
+ "end_time": "2024-10-31",
42
+ "is_valid": "Y",
43
+ "main_business_code_name": "",
44
+ "other_card_point": 0,
45
+ "is_exchange": "N",
46
+ "is_transfering":"Y",
47
+ "card_point_type": 1,
48
+ "business_codes": ["movie", "market", "cake", "book", "video", "play", "health", "small", "travel", "supermarket", "food"]
49
+ }, {
50
+ "card_number": "101001000008421",
51
+ "card_point": 100000,
52
+ "card_type": "27",
53
+ "card_type_name": "聚福宝福",
54
+ "unit": "点",
55
+ "end_time": "2024-12-31",
56
+ "is_valid": "Y",
57
+ "main_business_code_name": "",
58
+ "other_card_point": 0,
59
+ "is_exchange": "N",
60
+ "is_transfering":"N",
61
+ "card_point_type": 1,
62
+ "business_codes": ["cake"]
63
+ }, {
64
+ "card_number": "171003500000385",
65
+ "card_point": 10000,
66
+ "card_type": "39",
67
+ "card_type_name": "一对一次卡(无限制)",
68
+ "unit": "",
69
+ "end_time": "2024-08-31",
70
+ "is_valid": "Y",
71
+ "main_business_code_name": "",
72
+ "other_card_point": 0,
73
+ "is_exchange": "Y",
74
+ "is_transfering":"N",
75
+ "card_point_type": 1,
76
+ "business_codes": ["movie", "market", "cake"]
77
+ }, {
78
+ "card_number": "101001000007175",
79
+ "card_point": 9998700,
80
+ "card_type": "27",
81
+ "card_type_name": "聚福宝福",
82
+ "unit": "点",
83
+ "end_time": "2023-10-31",
84
+ "is_valid": "Y",
85
+ "main_business_code_name": "",
86
+ "other_card_point": 0,
87
+ "is_exchange": "N",
88
+ "is_transfering":"N",
89
+ "card_point_type": 1,
90
+ "business_codes": ["movie", "market", "cake", "video", "play", "health"]
91
+ }, {
92
+ "card_number": "261001000002666",
93
+ "card_point": 0,
94
+ "card_type": "35",
95
+ "card_type_name": "大礼包测试",
96
+ "unit": "",
97
+ "end_time": "2025-02-28",
98
+ "is_valid": "N",
99
+ "main_business_code_name": "",
100
+ "other_card_point": 0,
101
+ "is_exchange": "N",
102
+ "is_transfering":"N",
103
+ "card_point_type": 1,
104
+ "business_codes": ["gift"]
105
+ }, {
106
+ "card_number": "261001000002518",
107
+ "card_point": 100000,
108
+ "card_type": "31",
109
+ "card_type_name": "加盟商福卡",
110
+ "unit": "点",
111
+ "end_time": "2023-08-29",
112
+ "is_valid": "N",
113
+ "main_business_code_name": "",
114
+ "other_card_point": 0,
115
+ "is_exchange": "N",
116
+ "is_transfering":"N",
117
+ "card_point_type": 1,
118
+ "business_codes": ["movie", "market", "cake", "book", "video", "play", "health", "small", "travel", "supermarket", "food"]
119
+ }, {
120
+ "card_number": "261001000000344",
121
+ "card_point": 100,
122
+ "card_type": "35",
123
+ "card_type_name": "大礼包测试",
124
+ "unit": "次",
125
+ "end_time": "2023-07-21",
126
+ "is_valid": "N",
127
+ "main_business_code_name": "",
128
+ "other_card_point": 0,
129
+ "is_exchange": "N",
130
+ "is_transfering":"N",
131
+ "card_point_type": 1,
132
+ "business_codes": ["movie", "market", "cake", "book", "gift", "video", "play", "health", "small", "travel"]
133
+ }
134
+ ],
124
135
  "is_show_invalid_card_entrance": "Y",
125
136
  "is_can_unbind": "Y",
126
137
  "site_entry_settings": [{
@@ -12,7 +12,6 @@ module.exports = [
12
12
  isRule: false,
13
13
  params: {
14
14
  main_order_id: ['id', 'Number', '必选'],
15
- is_show_product: ['是否显示商品 1=显示,0=隐藏 仅电子码商品', 'Number', '非必选'],
16
15
  },
17
16
  isConsole: true,
18
17
  disabled: true,
@@ -489,60 +489,6 @@ export default {
489
489
  },
490
490
  inline: false,
491
491
  },
492
- {
493
- label: '是否展开票券信息:',
494
- ele: 'xd-radio',
495
- valueKey: 'is_open',
496
- value: data['is_open'] || 'N',
497
- groupKey:'content',
498
- placeholder: '请选择是否展开票券信息',
499
- multiple: false,
500
- className: 'input80',
501
- list: [
502
- { label: '展开', value: 'Y' },
503
- { label: '收起', value: 'N' },
504
- ]
505
- },
506
- {
507
- label: '是否显示商品信息:',
508
- ele: 'xd-radio',
509
- valueKey: 'is_show_product',
510
- groupKey:'content',
511
- value:data['is_show_product']|| 'Y',
512
- placeholder: '请选择',
513
- list: [
514
- {"label": "是", "value": "Y"},
515
- {"label": "否", "value": "N"},
516
- ],
517
- },
518
- {
519
- label: '是否展开商品详情:',
520
- ele: 'xd-radio',
521
- valueKey: 'is_show_all_detail',
522
- value: data['is_show_all_detail'] || 'N',
523
- groupKey:'content',
524
- placeholder: '请选择是否展开商品详情',
525
- multiple: false,
526
- className: 'input80',
527
- list: [
528
- { label: '展开', value: 'Y' },
529
- { label: '收起', value: 'N' },
530
- ]
531
- },
532
- {
533
- label: '提货码展示/隐藏:',
534
- ele: 'xd-radio',
535
- valueKey: 'is_show',
536
- value: data['is_show'] || '1',
537
- groupKey:'content',
538
- placeholder: '请选择提货码展示/隐藏',
539
- multiple: false,
540
- className: 'input80',
541
- list: [
542
- { label: '显示', value: '1' },
543
- { label: '隐藏', value: '0' },
544
- ]
545
- },
546
492
  ].filter(i=>i)
547
493
  },
548
494
  }
@@ -259,7 +259,7 @@
259
259
  class="jfb-base-order-detail__body-card jfb-base-order-detail__body-cashier"
260
260
  >
261
261
  <view class="jfb-base-order-detail__body-cashier-text">{{info.codes[0].show_type === "qrcode" ? "二维码" : "条形码" }}</view>
262
- <view v-if="showPreviewCode" style="position: relative">
262
+ <view style="position: relative">
263
263
  <image
264
264
  :style="{
265
265
  height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
@@ -556,18 +556,20 @@
556
556
  ></view>
557
557
  </view>
558
558
  <view v-if="info.pay_info.cards && info.pay_info.cards.length > 0">
559
- <view @click="showPayCard = true" class="jfb-base-order-detail__body-show" v-if="!showPayCard">
559
+ <view class="jfb-base-order-detail__body-show" v-if="!showPayCard">
560
560
  <text>使用 {{ info.pay_info.cards.length }} 张票券 展开</text>
561
561
  <xd-font-icon
562
562
  style="margin-left: 8rpx"
563
+ @click="showPayCard = true"
563
564
  size="28"
564
565
  icon="iconxia_down"
565
566
  ></xd-font-icon>
566
567
  </view>
567
- <view @click="showPayCard = false" class="jfb-base-order-detail__body-show" v-else>
568
+ <view class="jfb-base-order-detail__body-show" v-else>
568
569
  <text>使用{{ info.pay_info.cards.length }}张票券 收起</text>
569
570
  <xd-font-icon
570
571
  style="margin-left: 8rpx"
572
+ @click="showPayCard = false"
571
573
  size="28"
572
574
  icon="iconshang_up"
573
575
  ></xd-font-icon>
@@ -651,26 +653,8 @@
651
653
  <view class="jfb-base-order-detail__body-shop-title">
652
654
  <view :style="{ background: mainColor }"></view>
653
655
  <view>商品详情</view>
654
- <view @click="showAllProductDetail=!showAllProductDetail" v-if="!showAllProductDetail" class="jfb-base-order-detail__body-product-show">
655
- <text> 展开</text>
656
- <xd-font-icon
657
- style="margin-left: 8rpx"
658
- size="28"
659
- icon="iconxia_down"
660
- ></xd-font-icon>
661
- </view>
662
- <view @click="showAllProductDetail=!showAllProductDetail" v-if="showAllProductDetail" class="jfb-base-order-detail__body-product-show">
663
- <text> 收起</text>
664
- <xd-font-icon
665
- style="margin-left: 8rpx"
666
- size="28"
667
- icon="iconxia_down"
668
- ></xd-font-icon>
669
- </view>
670
- </view>
671
- <view class="jfb-base-order-detail__body-html" v-if="showAllProductDetail">
672
- <view v-html="info.productDetail"></view>
673
656
  </view>
657
+ <view v-html="info.productDetail"></view>
674
658
  </view>
675
659
  <view
676
660
  v-if="info.custom_content"
@@ -851,12 +835,6 @@ export default {
851
835
  logo: "",
852
836
 
853
837
  noticeBgc:'',
854
- is_open: '',
855
- is_show: '',
856
- showAllProductDetail: false,
857
- is_show_all_detail: '',
858
- showPreviewCode: true,
859
- is_show_product: "",
860
838
  };
861
839
  },
862
840
  watch: {
@@ -936,15 +914,13 @@ export default {
936
914
  this.getCountDown();
937
915
  }
938
916
  },
939
- getOrderDetail() {
917
+ getOrderDetail() {
940
918
  jfbRootExec("getBaseOrderDetail", {
941
919
  vm: this,
942
920
  data: {
943
921
  main_order_id: this.main_order_id,
944
922
  custom_content_page_id: this.pageAttr.page_id,
945
923
  custom_content_container_id: this.cid,
946
- is_show_jhd_code: Number(this.is_show),
947
- is_show_product: this.is_show_product === "Y" ? 1 : 0,
948
924
  },
949
925
  })
950
926
  .then((res) => {
@@ -1071,7 +1047,7 @@ export default {
1071
1047
  }
1072
1048
 
1073
1049
  //增加删除订单按钮
1074
- if(this.is_show_delete_order === 'Y') {
1050
+ if(this.is_show_delete_order === 'Y') {
1075
1051
  let pay = (res.buttons||[]).filter(item => item.action === 'pay');
1076
1052
  let del = [{action:'delete', text:'删除订单', type: 'info'}];
1077
1053
  if(pay.length === 1) del = []
@@ -1084,12 +1060,11 @@ export default {
1084
1060
  }
1085
1061
 
1086
1062
  if (res.product) {
1087
- try {
1088
- jfbRootExec("getBaseProductDetail", {
1063
+ jfbRootExec("getBaseProductDetail", {
1089
1064
  vm: this,
1090
1065
  data: {
1091
- xnamespace: res.product.business_code,
1092
- product_id: res.product.product_id,
1066
+ xnamespace: info.product.business_code,
1067
+ product_id: info.product.product_id,
1093
1068
  },
1094
1069
  })
1095
1070
  .then((result) => {
@@ -1102,11 +1077,6 @@ export default {
1102
1077
  .catch((err) => {
1103
1078
  console.log(err, "err");
1104
1079
  });
1105
- } catch (error) {
1106
- console.log(error,'apapapa');
1107
-
1108
- }
1109
-
1110
1080
  }
1111
1081
  else {
1112
1082
  this.info = res;
@@ -1149,19 +1119,6 @@ export default {
1149
1119
  this.viewStatus = getContainerPropsValue(container, "content.viewStatus", "mall");
1150
1120
  this.is_show_support_shop = getContainerPropsValue(container, "content.is_show_support_shop", "N");
1151
1121
  this.is_show_delete_order = getContainerPropsValue(container, "content.is_show_delete_order", "N");
1152
- this.is_open = getContainerPropsValue(container, "content.is_open", "N");
1153
- this.is_show = getContainerPropsValue(container, "content.is_show", '1');
1154
- this.showPayCard = this.is_open==='Y'
1155
- this.is_show_all_detail = getContainerPropsValue(container, "content.is_show_all_detail", "N");
1156
- this.is_show_product = getContainerPropsValue(container, "content.is_show_product", "Y");
1157
- this.showAllProductDetail = this.is_show_all_detail==='Y'
1158
- if(this.isPreview) {
1159
- if(this.is_show==='0') {
1160
- this.showPreviewCode = false;
1161
- } else {
1162
- this.showPreviewCode = true;
1163
- }
1164
- }
1165
1122
  },
1166
1123
  getCountDown() {
1167
1124
  this.timer = setInterval(() => {
@@ -1816,24 +1773,6 @@ export default {
1816
1773
  }
1817
1774
  }
1818
1775
 
1819
- &-product {
1820
- &-show {
1821
- display: flex;
1822
- justify-content: center;
1823
- align-items: center;
1824
- padding: unit(16, rpx);
1825
- border-radius: unit(4, rpx);
1826
- color: #999999;
1827
- font-size: unit(24, rpx);
1828
- margin-left:10px
1829
- }
1830
- }
1831
-
1832
- &-html {
1833
- padding: unit(20, rpx) 0;
1834
- color: #999;
1835
- }
1836
-
1837
1776
  }
1838
1777
  .dialog_password{
1839
1778
  text-align: center;