jufubao-base 1.0.436 → 1.0.437

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.
@@ -8,11 +8,11 @@
8
8
  */
9
9
  const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
10
10
  if(packname === 'gxd-commands-bussiness') {
11
- return `/Users/shiyonggao/home/root/Base-Jufubao/xd-commands-bussiness/${threePackagePath}`;
11
+ return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
12
12
  }
13
13
 
14
14
  if (packname === 'gxd-uni-library-editx') {
15
- return `/Users/shiyonggao/home/root/Base-Jufubao/xd-uni-library-editx/${threePackagePath}`;
15
+ return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
16
16
  }
17
17
 
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.436",
3
+ "version": "1.0.437",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -416,7 +416,63 @@ export default {
416
416
  buy_name: '',
417
417
  isShowBuy: 'N',
418
418
  buy_new_url: '',
419
- entryGroupId:'default'
419
+ entryGroupId:'default',
420
+
421
+ testCouponList: [
422
+ {
423
+ card_number: '10001000001168',
424
+ card_point: 5000,
425
+ card_type: '0',
426
+ card_type_name: '满50减50',
427
+ unit: '点',
428
+ end_time: '2024-11-23',
429
+ is_valid: 'Y',
430
+ main_business_code_name: '',
431
+ other_card_point: 0,
432
+ is_exchange: 'N',
433
+ card_point_type: 1,
434
+ business_codes: [
435
+ 'cake',
436
+ 'movie',
437
+ 'video',
438
+ 'market',
439
+ 'book'
440
+ ],
441
+ is_login: 'N',
442
+ consume_type: '2',
443
+ card_use_rule: '满50减1',
444
+ is_transfering: 'N',
445
+ "card_status": "F",
446
+ "card_status_name": "已冻结"
447
+
448
+ },
449
+ {
450
+ card_number: '10001000001169',
451
+ card_point: 6000,
452
+ card_type: '0',
453
+ card_type_name: '满50减50',
454
+ unit: '点',
455
+ end_time: '2024-11-23',
456
+ is_valid: 'Y',
457
+ main_business_code_name: '',
458
+ other_card_point: 0,
459
+ is_exchange: 'N',
460
+ card_point_type: 1,
461
+ business_codes: [
462
+ 'cake',
463
+ 'movie',
464
+ 'video',
465
+ 'market',
466
+ 'book'
467
+ ],
468
+ is_login: 'N',
469
+ consume_type: '2',
470
+ card_use_rule: '满50减1',
471
+ is_transfering: 'N',
472
+ "card_status": "Y",
473
+ "card_status_name": "正常"
474
+ }
475
+ ],
420
476
  };
421
477
  },
422
478
  created() {
@@ -513,6 +569,7 @@ export default {
513
569
  this.show_type = show_type;
514
570
  this.getCardList(this.options);
515
571
  },
572
+
516
573
  getContent() {
517
574
  jfbRootExec("getListBaseNewsContent", {
518
575
  vm: this,
@@ -583,9 +640,10 @@ export default {
583
640
 
584
641
  handleToDisabled() {
585
642
  if (this.$configProject['isPreview']) return;
643
+ if(!this.disabledUrl) return;
586
644
 
587
645
  this.$xdUniHelper.navigateTo({
588
- url: `${this.disabledUrl}`,
646
+ url: `${this.disabledUrl}?show-type=${this.show_type}`,
589
647
  });
590
648
  },
591
649
 
@@ -704,6 +762,7 @@ export default {
704
762
  },
705
763
 
706
764
  getCardList(options) {
765
+
707
766
  let params = {is_all: 'Y',is_show_entry_settings: 'Y'};
708
767
  if(options['jfb_business_code']) {
709
768
  params['card_business_code'] = options['jfb_business_code'];
@@ -720,6 +779,14 @@ export default {
720
779
  .then((res) => {
721
780
  this.loadingCardList = false;
722
781
  this.showDisabled = res.is_show_invalid_card_entrance;
782
+
783
+ //优惠券 - 预览模式测试数据
784
+ if(this.show_type === 'coupon') {
785
+ if(this.$configProject.isPreview) {
786
+ res.list = this.testCouponList;
787
+ }
788
+ }
789
+
723
790
  res.list = res.list.map((item) => {
724
791
  return {
725
792
  ...item,
@@ -112,6 +112,9 @@ export default {
112
112
  disableList: [],
113
113
  isShowUnbind: true,
114
114
  loadingList: true,
115
+
116
+ //普通卡|优惠券
117
+ showType:'',
115
118
  };
116
119
  },
117
120
  watch: {
@@ -126,15 +129,20 @@ export default {
126
129
  },
127
130
  methods: {
128
131
  onJfbLoad(options) {
132
+ if(['normal','coupon'].includes(options['show-type'])) {
133
+ this.showType = options['show-type']
134
+ }
129
135
  this.getCardList();
130
136
  },
137
+
131
138
  getCardList() {
132
139
  this.$xdShowLoading({});
140
+ let params = { is_all: "Y" }
141
+ if(this.showType) params.show_type = this.showType;
142
+
133
143
  jfbRootExec("getDisableCardList", {
134
144
  vm: this,
135
- data: {
136
- is_all: "Y",
137
- },
145
+ data: params,
138
146
  })
139
147
  .then((res) => {
140
148
  this.loadingList = false;
@@ -175,6 +175,9 @@ export default {
175
175
  return {
176
176
  isShowUnbind: true,
177
177
  isShowIndex:false,
178
+
179
+ //普通卡|优惠券
180
+ showType:'',
178
181
  };
179
182
  },
180
183
  computed:{
@@ -197,12 +200,21 @@ export default {
197
200
  methods: {
198
201
  onJfbLoad(options) {
199
202
  this.isShowIndex = options['show_index'] === '1';
203
+
204
+ //普通卡|优惠券
205
+ if(['normal','coupon'].includes(options['show-type'])) {
206
+ this.showType = options['show-type']
207
+ }
200
208
  this.getCardList();
201
209
  },
202
210
 
203
211
  getCardList() {
204
212
  this.$xdShowLoading({});
205
- jfbRootExec("getDisableCardListEntry", {vm: this, data: {is_all: "Y", is_show_entry_settings: 'Y'},})
213
+
214
+ let params = {is_all: "Y", is_show_entry_settings: 'Y'};
215
+ if(this.showType) params.show_type = this.showType;
216
+
217
+ jfbRootExec("getDisableCardListEntry", {vm: this, data: params,})
206
218
  .then((res) => {
207
219
  res.list = res.list.map((item) => {
208
220
  return {
@@ -563,6 +563,11 @@ export default {
563
563
  emptyBg() {
564
564
  return this.getNoData();
565
565
  },
566
+ showTypeComp(){
567
+ if( this.tabIndex === 1) return 'normal'
568
+ if( this.tabIndex === 2) return 'coupon'
569
+ return 'all'
570
+ }
566
571
  },
567
572
  filters:{
568
573
  cutstr(val){
@@ -930,10 +935,12 @@ export default {
930
935
 
931
936
  handleToDisabled() {
932
937
  if (this.$configProject['isPreview']) return;
938
+ if(!this.disabledUrl) return;
933
939
 
934
- this.$xdUniHelper.navigateTo({
935
- url: `${this.disabledUrl}`,
936
- });
940
+ //设置URL
941
+ let url = this.disabledUrl;
942
+ if(!['all'].includes(this.showTypeComp)) url += `?show-type=${this.showTypeComp}`;
943
+ this.$xdUniHelper.navigateTo({url});
937
944
  },
938
945
 
939
946
  checkTabStatus(res){
@@ -1117,18 +1124,18 @@ export default {
1117
1124
  data: params
1118
1125
  }).then(res=>{
1119
1126
  this.loadingCardList = false;
1127
+ this.showDisabled = res.is_show_invalid_card_entrance;
1128
+ if(this.isPreview) {
1129
+ res.list = this.testCouponList
1130
+ }
1120
1131
  this.totalCouponCardNum = res.list.length || 0;
1121
- this.showDisabled = res.is_show_invalid_card_entrance;
1122
- if(this.isPreview) {
1123
- res.list = this.testCouponList
1124
- }
1125
- //过滤入口配置
1126
- res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
1127
- let newCardList = this.$xdUniHelper.cloneDeep(res.list);
1128
- this.couponList = this.getCardGroupItem(newCardList, res['site_entry_settings']);
1129
- console.log(this.couponList,'this.couponList');
1132
+ //过滤入口配置
1133
+ res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
1134
+ let newCardList = this.$xdUniHelper.cloneDeep(res.list);
1135
+ this.couponList = this.getCardGroupItem(newCardList, res['site_entry_settings']);
1136
+ console.log(this.couponList,'this.couponList');
1130
1137
 
1131
- this.$xdHideLoading({});
1138
+ this.$xdHideLoading({});
1132
1139
 
1133
1140
  }) .catch(() => this.$xdHideLoading());
1134
1141