jufubao-base 1.0.401-beta1 → 1.0.401

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.
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 第三方库
5
+ * @param threePackagePath {String} 第三方库所在项目路径存放路径路
6
+ * @param packname {String} 包名字
7
+ * @returns {string|*}
8
+ */
9
+ const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
10
+ if(packname === 'gxd-commands-bussiness') {
11
+ return `/Users/shiyonggao/home/root/Base-Jufubao/xd-commands-bussiness/${threePackagePath}`;
12
+ }
13
+
14
+ if (packname === 'gxd-uni-library-editx') {
15
+ return `/Users/shiyonggao/home/root/Base-Jufubao/xd-uni-library-editx/${threePackagePath}`;
16
+ }
17
+
18
+ };
19
+
20
+ module.exports = {
21
+ getPackagePath
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.401-beta1",
3
+ "version": "1.0.401",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -51,12 +51,4 @@ module.exports = [
51
51
  },
52
52
  disabled: true,
53
53
  },
54
- {
55
- mapFnName: 'getListPlusCouponRights',
56
- isRule: false,
57
- title: '获得绑定的卡的优惠券权益列表',
58
- path: '/card/v1/card-bind/list-plus-coupon-rights',
59
- params: {},
60
- disabled: true,
61
- },
62
54
  ];
@@ -320,17 +320,6 @@ export default {
320
320
  { label: "一行滑块展示", value: "one" }
321
321
  ]
322
322
  },
323
- {
324
- label: "是否展示plus权益:",
325
- ele: "xd-radio",
326
- valueKey: "isShowPlus",
327
- groupKey:'content',
328
- value: data.isShowPlus || "N",
329
- list: [
330
- { label: "展示", value: "Y" },
331
- { label: "隐藏", value: "N" }
332
- ]
333
- },
334
323
  {
335
324
  label: "二维码文案",
336
325
  ele: "el-input",
@@ -572,68 +561,6 @@ export default {
572
561
  });
573
562
  },
574
563
  },
575
- {
576
- ele: "title",
577
- label: "plus权益样式配置",
578
- size: "small",
579
- groupKey: "style",
580
- hidden: data.isShowPlus !== 'Y',
581
- },
582
- {
583
- label: "列表项背景图:",
584
- ele: "xd-upload",
585
- valueKey: "plusItemBgImage",
586
- groupKey:'style',
587
- value: data.plusItemBgImage || {},
588
- defaultValue: data.plusItemBgImage || null,
589
- slot: true,
590
- type: ['jpg', 'png', 'jpeg'],
591
- styleType: 'one',
592
- uploadType: 'aliyun',
593
- size: 5,
594
- action: 'action',
595
- oneWidth: 375,
596
- oneHeight: 120,
597
- sort: true,
598
- hidden: data.isShowPlus !== 'Y',
599
- inline: true,
600
- },
601
- {
602
- label: "套餐名称颜色:",
603
- ele: "xd-color",
604
- valueKey: "plusPackageNameColor",
605
- groupKey:'style',
606
- value: data.plusPackageNameColor || '#8C530D',
607
- hidden: data.isShowPlus !== 'Y',
608
- inline: true,
609
- },
610
- {
611
- label: "兑换有效期颜色:",
612
- ele: "xd-color",
613
- valueKey: "plusValidDateColor",
614
- groupKey:'style',
615
- value: data.plusValidDateColor || '#A8630D',
616
- hidden: data.isShowPlus !== 'Y',
617
- inline: true,
618
- },
619
- {
620
- label: "按钮文字颜色:",
621
- ele: "xd-color",
622
- valueKey: "plusBtnTextColor",
623
- groupKey:'style',
624
- value: data.plusBtnTextColor || '#A8630D',
625
- hidden: data.isShowPlus !== 'Y',
626
- inline: true,
627
- },
628
- {
629
- label: "按钮背景颜色:",
630
- ele: "xd-gradient-color",
631
- valueKey: "plusBtnBgColor",
632
- groupKey:'style',
633
- value: data.plusBtnBgColor || 'linear-gradient(90deg, #FFF6E5 0%, #FEE4AA 100%)',
634
- hidden: data.isShowPlus !== 'Y',
635
- inline: true,
636
- },
637
564
  ]
638
565
  },
639
566
  };
@@ -116,14 +116,6 @@
116
116
  background: tabIndex === 2 ? mainColor : '#fff',
117
117
  }"
118
118
  >优惠券</view>
119
- <view
120
- v-if="isShowPlus === 'Y'"
121
- @click="tabIndex = 3"
122
- :style="{
123
- color: tabIndex === 3 ? '#fff' : '#B8B7BE',
124
- background: tabIndex === 3 ? mainColor : '#fff',
125
- }"
126
- >plus权益</view>
127
119
  </view>
128
120
  <view class="jfb-base-card-entry__body-sub-tab" v-if="tabIndex === 1">
129
121
  <view :style="{
@@ -343,35 +335,6 @@
343
335
  <view v-else>暂无数据</view>
344
336
  </view>
345
337
  <!--content coupon-->
346
- <!--content plus-->
347
- <view v-if="tabIndex === 3 && plusList && plusList.length > 0" class="jfb-base-card-entry__body-plus">
348
- <view class="jfb-base-card-entry__body-plus-list">
349
- <view
350
- class="jfb-base-card-entry__body-plus-item"
351
- v-for="(item, idx) in plusList"
352
- :key="idx"
353
- @click="handlePlusClick(item)"
354
- :style="{
355
- backgroundImage: plusItemBgImageUrl ? 'url(' + plusItemBgImageUrl + ')' : '',
356
- backgroundSize: '100% 100%',
357
- }"
358
- >
359
- <view class="jfb-base-card-entry__body-plus-item-top">
360
- <view class="jfb-base-card-entry__body-plus-item-name" :style="{ color: plusPackageNameColor }">{{ item.plus_product_name }}</view>
361
- <view
362
- class="jfb-base-card-entry__body-plus-item-btn"
363
- :class="{ redeemed: item.button_text === '去使用' }"
364
- :style="{
365
- color: plusBtnTextColor,
366
- background: item.button_text === '去使用' ? '' : plusBtnBgColor,
367
- }"
368
- >{{ item.button_text }}</view>
369
- </view>
370
- <view class="jfb-base-card-entry__body-plus-item-date" :style="{ color: plusValidDateColor }">兑换有效期:{{ item.end_time | formatTimestamp }}</view>
371
- </view>
372
- </view>
373
- </view>
374
- <!--content plus-->
375
338
  <!--no data-->
376
339
  <view v-else-if="cardList !== null && cardList.length === 0">
377
340
  <view class="jfb-base-card-entry__body-empty">
@@ -559,14 +522,6 @@ export default {
559
522
  cutstr(val){
560
523
  if(typeof val.entry_name === 'string') return val.entry_name.slice(0,4);
561
524
  return ''
562
- },
563
- formatTimestamp(val) {
564
- if (!val) return '';
565
- const date = new Date(Number(val) * 1000);
566
- const y = date.getFullYear();
567
- const m = String(date.getMonth() + 1).padStart(2, '0');
568
- const d = String(date.getDate()).padStart(2, '0');
569
- return `${y}-${m}-${d}`;
570
525
  }
571
526
  },
572
527
  watch: {
@@ -672,14 +627,6 @@ export default {
672
627
  buy_name: "",
673
628
  code_name: "",
674
629
  bussShowType: "",
675
- isShowPlus: 'N',
676
- plusList: [],
677
- plusItemBgImage: {},
678
- plusItemBgImageUrl: '',
679
- plusPackageNameColor: '',
680
- plusValidDateColor: '',
681
- plusBtnTextColor: '',
682
- plusBtnBgColor: '',
683
630
  };
684
631
  },
685
632
  created() {
@@ -743,18 +690,11 @@ export default {
743
690
  let bussShowType = getContainerPropsValue(container, "content.bussShowType", "one");
744
691
  if(this.isPreview) {
745
692
  this.tabIndex = this.isShowCoupon==='Y'?2:1;
746
- }
747
- this.isShowPlus = getContainerPropsValue(container, "content.isShowPlus", "N");
748
- let plusItemBgImage = getContainerPropsValue(container, "content.plusItemBgImage", '');
749
- this.plusItemBgImageUrl = plusItemBgImage ? getServiceUrl(plusItemBgImage.url) : '';
750
- this.plusPackageNameColor = getContainerPropsValue(container, "content.plusPackageNameColor", '#8C530D');
751
- this.plusValidDateColor = getContainerPropsValue(container, "content.plusValidDateColor", '#A8630D');
752
- this.plusBtnTextColor = getContainerPropsValue(container, "content.plusBtnTextColor", '#A8630D');
753
- this.plusBtnBgColor = getContainerPropsValue(container, "content.plusBtnBgColor", 'linear-gradient(90deg, #FFF6E5 0%, #FEE4AA 100%)');
754
- if(this.bussShowType !== bussShowType){
755
- this.clearDefault();
756
- this.cardPageNum = 0;
757
- this.onJfbLoad(this.options);
693
+ if(this.bussShowType !== bussShowType){
694
+ this.clearDefault();
695
+ this.cardPageNum = 0;
696
+ this.onJfbLoad(this.options);
697
+ }
758
698
  }
759
699
  this.bussShowType = bussShowType;
760
700
  },
@@ -848,8 +788,7 @@ export default {
848
788
  * @param item
849
789
  * @param entry
850
790
  */
851
- handleBindLogin(item, entry) {
852
- debugger
791
+ handleBindLogin(item , entry) {
853
792
  //卡券登录
854
793
  if (this.tabIndex === 1 || this.tabIndex === 2) {
855
794
  if (item["is_valid"] !== "Y") {
@@ -976,10 +915,8 @@ export default {
976
915
  this.getContent();
977
916
  if(this.tabIndex===1) {
978
917
  this.getCardList(options);
979
- } else if(this.tabIndex===2) {
918
+ } else {
980
919
  this.getCouponList(options);
981
- } else if(this.tabIndex===3) {
982
- this.getPlusList(options);
983
920
  }
984
921
  },
985
922
 
@@ -1011,51 +948,6 @@ export default {
1011
948
 
1012
949
  },
1013
950
 
1014
- getPlusList(options) {
1015
- this.$xdShowLoading({});
1016
- let params = {}
1017
- if(this.entryGroupId) params['group_id'] = this.entryGroupId;
1018
- jfbRootExec("getListPlusCouponRights", {
1019
- vm: this,
1020
- data: params
1021
- })
1022
- .then((res) => {
1023
- this.loadingCardList = false;
1024
- //过滤入口配置
1025
- res['site_entry_settings'] = this.filterNotSupportEntry(res['site_entry_settings']);
1026
- let newList = this.$xdUniHelper.cloneDeep(res.list || []);
1027
- this.plusList = this.getCardGroupItem(newList, res['site_entry_settings']);
1028
- this.$xdHideLoading();
1029
- })
1030
- .catch(() => {
1031
- this.loadingCardList = false;
1032
- this.$xdHideLoading();
1033
- });
1034
- },
1035
-
1036
- handlePlusClick(item) {
1037
- if (!item.entries || item.entries.length === 0) return;
1038
- let entry = item.entries[0];
1039
- let redirectData = entry.redirect_data;
1040
- let site_path = redirectData.path;
1041
- jfbRootExec("getBaseByIdCardDetail", {
1042
- vm: this,
1043
- data: {
1044
- card_number: item.card_number
1045
- }
1046
- }).then(res => {
1047
- let code_content = this.getParams(res.card_qrcode, "code_content")
1048
- let sitePath = `${site_path}?ecode=${Base64.encodeURI(code_content)}`;
1049
- sitePath = `${sitePath}&is_return_is_used=Y`
1050
- let sitePathPre = sitePath.split("?")[0];
1051
- let sitePathAfter = sitePath.split("?")[1];
1052
- sitePath = `${sitePathPre}?ecode-params=${Base64.encodeURI(sitePathAfter)}`;
1053
- this.$xdUniHelper.redirectTo({
1054
- url: sitePath,
1055
- });
1056
- })
1057
- },
1058
-
1059
951
  getCardList(options) {
1060
952
  let params = {is_all: 'Y', is_show_entry_settings: 'Y', show_type: 'normal'};
1061
953
  if(options['jfb_business_code']) {
@@ -1296,64 +1188,6 @@ export default {
1296
1188
  }
1297
1189
  }
1298
1190
 
1299
- .jfb-base-card-entry__body-plus {
1300
- padding: 0 0 30rpx;
1301
-
1302
- &-header {
1303
- font-size: 28rpx;
1304
- color: #666;
1305
- margin-bottom: 20rpx;
1306
-
1307
- &-num {
1308
- color: #333;
1309
- font-weight: 700;
1310
- font-size: 32rpx;
1311
- }
1312
- }
1313
-
1314
- &-list {
1315
- display: flex;
1316
- flex-direction: column;
1317
- gap: 24rpx;
1318
- }
1319
-
1320
- &-item {
1321
- padding: 30rpx 40rpx;
1322
- background: #fff;
1323
- border-radius: 16rpx;
1324
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
1325
-
1326
- &-top {
1327
- display: flex;
1328
- align-items: center;
1329
- justify-content: space-between;
1330
- }
1331
-
1332
- &-name {
1333
- font-size: 32rpx;
1334
- font-weight: 500;
1335
- color: #8C530D;
1336
- }
1337
-
1338
- &-date {
1339
- font-size: 28rpx;
1340
- color: #A8630D;
1341
- margin-top: 72rpx;
1342
- }
1343
-
1344
- &-btn {
1345
- flex-shrink: 0;
1346
- margin-left: 20rpx;
1347
- padding: 12rpx 36rpx;
1348
- font-size: 32rpx;
1349
- color: #A8630D;
1350
- border-radius: 54rpx;
1351
- text-align: center;
1352
- background: linear-gradient(90deg, #FFF6E5 0%, #FEE4AA 100%);
1353
- }
1354
- }
1355
- }
1356
-
1357
1191
  .card-list {
1358
1192
  overflow: hidden;
1359
1193
  border-radius: unit(16, rpx);
@@ -281,5 +281,4 @@ module.exports = {
281
281
  "card_expire_in": 56760,
282
282
  "request_id": "8fde2506c426a55d"
283
283
  },
284
- getListPlusCouponRights:{ "total_size": 1, "list": [{ "card_number": "101001000141415", "card_type_name": "聚福宝福卡(点12位)", "plus_product_id": 60038520, "plus_product_name": "体验卡7天", "start_time": 1754841600, "end_time": 1800547199, "exchange_expire_time": 1800547099, "exchange_status": "N", "exchange_status_name": "未兑换", "business_codes": ["market", "cake"], "exchange_card_numbers": "", "exchange_time": 0, "button_text": "去兑换" }], "request_id": "f2043ea4806956cb" }
285
284
  }