jufubao-base 1.0.401-beta2 → 1.0.402
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/get.package.path.js +22 -0
- package/package.json +1 -1
- package/src/components/JfbBaseCardEntry/Api.js +0 -8
- package/src/components/JfbBaseCardEntry/Attr.js +0 -90
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +18 -204
- package/src/components/JfbBaseCardEntry/Mock.js +0 -1
- package/src/components/JfbBasePosterType/FourScreen.vue +2 -4
|
@@ -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/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (packname === 'gxd-uni-library-editx') {
|
|
15
|
+
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
module.exports = {
|
|
21
|
+
getPackagePath
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -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,85 +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
|
-
{
|
|
638
|
-
ele: "title",
|
|
639
|
-
label: "tab按钮样式配置",
|
|
640
|
-
size: "small",
|
|
641
|
-
groupKey: "style",
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
label: "选中时文字背景色设置: ",
|
|
645
|
-
ele: "xd-text-and-bgc",
|
|
646
|
-
groupKey:'style',
|
|
647
|
-
valueKey: "tabBtnStyle",
|
|
648
|
-
value: data.tabBtnStyle || null,
|
|
649
|
-
setting: {
|
|
650
|
-
color: true,
|
|
651
|
-
bgColor: true,
|
|
652
|
-
},
|
|
653
|
-
},
|
|
654
564
|
]
|
|
655
565
|
},
|
|
656
566
|
};
|
|
@@ -104,17 +104,18 @@
|
|
|
104
104
|
<view class="jfb-base-card-entry__body-tab">
|
|
105
105
|
<view
|
|
106
106
|
@click="tabIndex = 1"
|
|
107
|
-
:style="
|
|
108
|
-
|
|
107
|
+
:style="{
|
|
108
|
+
color: tabIndex === 1 ? '#fff' : '#B8B7BE',
|
|
109
|
+
background: tabIndex === 1 ? mainColor : '#fff',
|
|
110
|
+
}"
|
|
111
|
+
>已绑定票券</view>
|
|
109
112
|
<view
|
|
110
113
|
@click="tabIndex = 2"
|
|
111
|
-
:style="
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:style="tabIndex === 3 ? tabSelectedStyle : tabNormalStyle"
|
|
117
|
-
>plus权益({{totalPlusCardNum}})</view>
|
|
114
|
+
:style="{
|
|
115
|
+
color: tabIndex === 2 ? '#fff' : '#B8B7BE',
|
|
116
|
+
background: tabIndex === 2 ? mainColor : '#fff',
|
|
117
|
+
}"
|
|
118
|
+
>优惠券</view>
|
|
118
119
|
</view>
|
|
119
120
|
<view class="jfb-base-card-entry__body-sub-tab" v-if="tabIndex === 1">
|
|
120
121
|
<view :style="{
|
|
@@ -334,35 +335,6 @@
|
|
|
334
335
|
<view v-else>暂无数据</view>
|
|
335
336
|
</view>
|
|
336
337
|
<!--content coupon-->
|
|
337
|
-
<!--content plus-->
|
|
338
|
-
<view v-if="tabIndex === 3 && plusList && plusList.length > 0" class="jfb-base-card-entry__body-plus">
|
|
339
|
-
<view class="jfb-base-card-entry__body-plus-list">
|
|
340
|
-
<view
|
|
341
|
-
class="jfb-base-card-entry__body-plus-item"
|
|
342
|
-
v-for="(item, idx) in plusList"
|
|
343
|
-
:key="idx"
|
|
344
|
-
@click="handlePlusClick(item)"
|
|
345
|
-
:style="{
|
|
346
|
-
backgroundImage: plusItemBgImageUrl ? 'url(' + plusItemBgImageUrl + ')' : '',
|
|
347
|
-
backgroundSize: '100% 100%',
|
|
348
|
-
}"
|
|
349
|
-
>
|
|
350
|
-
<view class="jfb-base-card-entry__body-plus-item-top">
|
|
351
|
-
<view class="jfb-base-card-entry__body-plus-item-name" :style="{ color: plusPackageNameColor }">{{ item.plus_product_name }}</view>
|
|
352
|
-
<view
|
|
353
|
-
class="jfb-base-card-entry__body-plus-item-btn"
|
|
354
|
-
:class="{ redeemed: item.button_text === '去使用' }"
|
|
355
|
-
:style="{
|
|
356
|
-
color: plusBtnTextColor,
|
|
357
|
-
background: item.button_text === '去使用' ? '' : plusBtnBgColor,
|
|
358
|
-
}"
|
|
359
|
-
>{{ item.button_text }}</view>
|
|
360
|
-
</view>
|
|
361
|
-
<view class="jfb-base-card-entry__body-plus-item-date" :style="{ color: plusValidDateColor }">兑换有效期:{{ item.end_time | formatTimestamp }}</view>
|
|
362
|
-
</view>
|
|
363
|
-
</view>
|
|
364
|
-
</view>
|
|
365
|
-
<!--content plus-->
|
|
366
338
|
<!--no data-->
|
|
367
339
|
<view v-else-if="cardList !== null && cardList.length === 0">
|
|
368
340
|
<view class="jfb-base-card-entry__body-empty">
|
|
@@ -546,34 +518,10 @@ export default {
|
|
|
546
518
|
return this.getNoData();
|
|
547
519
|
},
|
|
548
520
|
},
|
|
549
|
-
computed: {
|
|
550
|
-
tabSelectedStyle() {
|
|
551
|
-
let styleObj = {
|
|
552
|
-
color: this.tabBtnStyle && this.tabBtnStyle['actColor'] || '#fff',
|
|
553
|
-
background: this.tabBtnStyle && this.tabBtnStyle['actBgColor'] || this.mainColor,
|
|
554
|
-
}
|
|
555
|
-
return this.styleObjectToString(styleObj);
|
|
556
|
-
},
|
|
557
|
-
tabNormalStyle() {
|
|
558
|
-
let styleObj = {
|
|
559
|
-
color: this.tabBtnStyle['color']||'#ccc',
|
|
560
|
-
background:this.tabBtnStyle['bgColor']|| '#eee',
|
|
561
|
-
}
|
|
562
|
-
return this.styleObjectToString(styleObj);
|
|
563
|
-
},
|
|
564
|
-
},
|
|
565
521
|
filters:{
|
|
566
522
|
cutstr(val){
|
|
567
523
|
if(typeof val.entry_name === 'string') return val.entry_name.slice(0,4);
|
|
568
524
|
return ''
|
|
569
|
-
},
|
|
570
|
-
formatTimestamp(val) {
|
|
571
|
-
if (!val) return '';
|
|
572
|
-
const date = new Date(Number(val) * 1000);
|
|
573
|
-
const y = date.getFullYear();
|
|
574
|
-
const m = String(date.getMonth() + 1).padStart(2, '0');
|
|
575
|
-
const d = String(date.getDate()).padStart(2, '0');
|
|
576
|
-
return `${y}-${m}-${d}`;
|
|
577
525
|
}
|
|
578
526
|
},
|
|
579
527
|
watch: {
|
|
@@ -679,20 +627,6 @@ export default {
|
|
|
679
627
|
buy_name: "",
|
|
680
628
|
code_name: "",
|
|
681
629
|
bussShowType: "",
|
|
682
|
-
isShowPlus: 'N',
|
|
683
|
-
plusList: [],
|
|
684
|
-
plusItemBgImage: {},
|
|
685
|
-
plusItemBgImageUrl: '',
|
|
686
|
-
plusPackageNameColor: '',
|
|
687
|
-
plusValidDateColor: '',
|
|
688
|
-
plusBtnTextColor: '',
|
|
689
|
-
plusBtnBgColor: '',
|
|
690
|
-
tabBtnStyle: null,
|
|
691
|
-
totalCardNum: 0,
|
|
692
|
-
totalPlusCardNum: 0,
|
|
693
|
-
totalCouponCardNum: 0,
|
|
694
|
-
isInitialized: false,
|
|
695
|
-
exchange_url: '',
|
|
696
630
|
};
|
|
697
631
|
},
|
|
698
632
|
created() {
|
|
@@ -756,22 +690,11 @@ export default {
|
|
|
756
690
|
let bussShowType = getContainerPropsValue(container, "content.bussShowType", "one");
|
|
757
691
|
if(this.isPreview) {
|
|
758
692
|
this.tabIndex = this.isShowCoupon==='Y'?2:1;
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
this.plusValidDateColor = getContainerPropsValue(container, "content.plusValidDateColor", '#A8630D');
|
|
765
|
-
this.plusBtnTextColor = getContainerPropsValue(container, "content.plusBtnTextColor", '#A8630D');
|
|
766
|
-
this.plusBtnBgColor = getContainerPropsValue(container, "content.plusBtnBgColor", 'linear-gradient(90deg, #FFF6E5 0%, #FEE4AA 100%)');
|
|
767
|
-
this.tabBtnStyle = getContainerPropsValue(container, "content.tabBtnStyle", {
|
|
768
|
-
color: '#fff',
|
|
769
|
-
bgColor: '',
|
|
770
|
-
});
|
|
771
|
-
if(this.bussShowType !== bussShowType){
|
|
772
|
-
this.clearDefault();
|
|
773
|
-
this.cardPageNum = 0;
|
|
774
|
-
this.onJfbLoad(this.options);
|
|
693
|
+
if(this.bussShowType !== bussShowType){
|
|
694
|
+
this.clearDefault();
|
|
695
|
+
this.cardPageNum = 0;
|
|
696
|
+
this.onJfbLoad(this.options);
|
|
697
|
+
}
|
|
775
698
|
}
|
|
776
699
|
this.bussShowType = bussShowType;
|
|
777
700
|
},
|
|
@@ -865,7 +788,7 @@ export default {
|
|
|
865
788
|
* @param item
|
|
866
789
|
* @param entry
|
|
867
790
|
*/
|
|
868
|
-
handleBindLogin(item, entry) {
|
|
791
|
+
handleBindLogin(item , entry) {
|
|
869
792
|
//卡券登录
|
|
870
793
|
if (this.tabIndex === 1 || this.tabIndex === 2) {
|
|
871
794
|
if (item["is_valid"] !== "Y") {
|
|
@@ -990,17 +913,10 @@ export default {
|
|
|
990
913
|
// #endif
|
|
991
914
|
|
|
992
915
|
this.getContent();
|
|
993
|
-
if(
|
|
994
|
-
this.isInitialized = true;
|
|
916
|
+
if(this.tabIndex===1) {
|
|
995
917
|
this.getCardList(options);
|
|
918
|
+
} else {
|
|
996
919
|
this.getCouponList(options);
|
|
997
|
-
this.getPlusList(options);
|
|
998
|
-
} else if(this.tabIndex===1) {
|
|
999
|
-
this.getCardList(options);
|
|
1000
|
-
} else if(this.tabIndex===2) {
|
|
1001
|
-
this.getCouponList(options);
|
|
1002
|
-
} else if(this.tabIndex===3) {
|
|
1003
|
-
this.getPlusList(options);
|
|
1004
920
|
}
|
|
1005
921
|
},
|
|
1006
922
|
|
|
@@ -1016,7 +932,6 @@ export default {
|
|
|
1016
932
|
data: params
|
|
1017
933
|
}).then(res=>{
|
|
1018
934
|
this.loadingCardList = false;
|
|
1019
|
-
this.totalCouponCardNum = res.list.length || 0;
|
|
1020
935
|
this.showDisabled = res.is_show_invalid_card_entrance;
|
|
1021
936
|
if(this.isPreview) {
|
|
1022
937
|
res.list = this.testCouponList
|
|
@@ -1033,48 +948,6 @@ export default {
|
|
|
1033
948
|
|
|
1034
949
|
},
|
|
1035
950
|
|
|
1036
|
-
getPlusList(options) {
|
|
1037
|
-
this.$xdShowLoading({});
|
|
1038
|
-
let params = {}
|
|
1039
|
-
if(this.entryGroupId) params['group_id'] = this.entryGroupId;
|
|
1040
|
-
jfbRootExec("getListPlusCouponRights", {
|
|
1041
|
-
vm: this,
|
|
1042
|
-
data: params
|
|
1043
|
-
})
|
|
1044
|
-
.then((res) => {
|
|
1045
|
-
this.loadingCardList = false;
|
|
1046
|
-
this.totalPlusCardNum = res.list.length || 0;
|
|
1047
|
-
//过滤入口配置
|
|
1048
|
-
this.plusList = res.list
|
|
1049
|
-
this.exchange_url = res.exchange_url
|
|
1050
|
-
this.$xdHideLoading();
|
|
1051
|
-
})
|
|
1052
|
-
.catch(() => {
|
|
1053
|
-
this.loadingCardList = false;
|
|
1054
|
-
this.$xdHideLoading();
|
|
1055
|
-
});
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1058
|
-
handlePlusClick(item) {
|
|
1059
|
-
let site_path = this.exchange_url;
|
|
1060
|
-
jfbRootExec("getBaseByIdCardDetail", {
|
|
1061
|
-
vm: this,
|
|
1062
|
-
data: {
|
|
1063
|
-
card_number: item.card_number
|
|
1064
|
-
}
|
|
1065
|
-
}).then(res => {
|
|
1066
|
-
let code_content = this.getParams(res.card_qrcode, "code_content")
|
|
1067
|
-
let sitePath = `${site_path}?ecode=${Base64.encodeURI(code_content)}`;
|
|
1068
|
-
sitePath = `${sitePath}&is_return_is_used=Y`
|
|
1069
|
-
let sitePathPre = sitePath.split("?")[0];
|
|
1070
|
-
let sitePathAfter = sitePath.split("?")[1];
|
|
1071
|
-
sitePath = `${sitePathPre}?ecode-params=${Base64.encodeURI(sitePathAfter)}`;
|
|
1072
|
-
this.$xdUniHelper.redirectTo({
|
|
1073
|
-
url: sitePath,
|
|
1074
|
-
});
|
|
1075
|
-
})
|
|
1076
|
-
},
|
|
1077
|
-
|
|
1078
951
|
getCardList(options) {
|
|
1079
952
|
let params = {is_all: 'Y', is_show_entry_settings: 'Y', show_type: 'normal'};
|
|
1080
953
|
if(options['jfb_business_code']) {
|
|
@@ -1089,7 +962,6 @@ export default {
|
|
|
1089
962
|
.then((res) => {
|
|
1090
963
|
this.loadingCardList = false;
|
|
1091
964
|
this.showDisabled = res.is_show_invalid_card_entrance;
|
|
1092
|
-
this.totalCardNum = res.list.length || 0;
|
|
1093
965
|
res.list = res.list.map((item) => {
|
|
1094
966
|
return {
|
|
1095
967
|
...item,
|
|
@@ -1316,64 +1188,6 @@ export default {
|
|
|
1316
1188
|
}
|
|
1317
1189
|
}
|
|
1318
1190
|
|
|
1319
|
-
.jfb-base-card-entry__body-plus {
|
|
1320
|
-
padding: 0 0 30rpx;
|
|
1321
|
-
|
|
1322
|
-
&-header {
|
|
1323
|
-
font-size: 28rpx;
|
|
1324
|
-
color: #666;
|
|
1325
|
-
margin-bottom: 20rpx;
|
|
1326
|
-
|
|
1327
|
-
&-num {
|
|
1328
|
-
color: #333;
|
|
1329
|
-
font-weight: 700;
|
|
1330
|
-
font-size: 32rpx;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
&-list {
|
|
1335
|
-
display: flex;
|
|
1336
|
-
flex-direction: column;
|
|
1337
|
-
gap: 24rpx;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
&-item {
|
|
1341
|
-
padding: 30rpx 40rpx;
|
|
1342
|
-
background: #fff;
|
|
1343
|
-
border-radius: 16rpx;
|
|
1344
|
-
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
|
|
1345
|
-
|
|
1346
|
-
&-top {
|
|
1347
|
-
display: flex;
|
|
1348
|
-
align-items: center;
|
|
1349
|
-
justify-content: space-between;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
&-name {
|
|
1353
|
-
font-size: 32rpx;
|
|
1354
|
-
font-weight: 500;
|
|
1355
|
-
color: #8C530D;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
&-date {
|
|
1359
|
-
font-size: 28rpx;
|
|
1360
|
-
color: #A8630D;
|
|
1361
|
-
margin-top: 72rpx;
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
&-btn {
|
|
1365
|
-
flex-shrink: 0;
|
|
1366
|
-
margin-left: 20rpx;
|
|
1367
|
-
padding: 12rpx 36rpx;
|
|
1368
|
-
font-size: 32rpx;
|
|
1369
|
-
color: #A8630D;
|
|
1370
|
-
border-radius: 54rpx;
|
|
1371
|
-
text-align: center;
|
|
1372
|
-
background: linear-gradient(90deg, #FFF6E5 0%, #FEE4AA 100%);
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
1191
|
.card-list {
|
|
1378
1192
|
overflow: hidden;
|
|
1379
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
|
}
|
|
@@ -254,11 +254,9 @@
|
|
|
254
254
|
return item
|
|
255
255
|
});
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
//静态图显示(没有行的概念,返回所有数据)
|
|
258
258
|
if(this.config.isCarousel === false) {
|
|
259
|
-
this.list = content
|
|
260
|
-
return index < (this.config['column'] * this.config['row']);
|
|
261
|
-
})
|
|
259
|
+
this.list = content
|
|
262
260
|
}
|
|
263
261
|
|
|
264
262
|
//轮播图显示
|