jufubao-base 1.0.139 → 1.0.140-beta1
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
|
@@ -16,31 +16,18 @@ export default {
|
|
|
16
16
|
{label: "布局2", value: "2"},
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
|
-
{
|
|
20
|
-
label: '票券登录文案:',
|
|
21
|
-
ele: 'el-input',
|
|
22
|
-
type: 'text',
|
|
23
|
-
valueKey: 'login_name',
|
|
24
|
-
groupKey:'content',
|
|
25
|
-
value: data.login_name || '',
|
|
26
|
-
placeholder: '请输入票券登录文案',
|
|
27
|
-
className: 'input80',
|
|
28
|
-
inline: false,
|
|
29
|
-
notice: '当未设置文案时候,前台页面显示为"<span style="color:red">登录</span>"'
|
|
30
|
-
},
|
|
31
|
-
|
|
32
19
|
{
|
|
33
20
|
ele: 'title',
|
|
34
21
|
label: '登录样式设置',
|
|
35
22
|
size: 'small',
|
|
36
|
-
groupKey: '
|
|
23
|
+
groupKey: 'content',
|
|
37
24
|
},
|
|
38
25
|
{
|
|
39
26
|
label: "登录文字大小",
|
|
40
27
|
ele: "el-input",
|
|
41
28
|
type: "number",
|
|
42
29
|
valueKey: "login_text_size",
|
|
43
|
-
groupKey: '
|
|
30
|
+
groupKey: 'content',
|
|
44
31
|
value: data.login_text_size || '',
|
|
45
32
|
placeholder: "请输入登录文字大小",
|
|
46
33
|
className: "input80",
|
|
@@ -59,7 +46,7 @@ export default {
|
|
|
59
46
|
label: "登录背景颜色配置",
|
|
60
47
|
ele: 'xd-color',
|
|
61
48
|
valueKey: "login_text_bg_color",
|
|
62
|
-
groupKey: '
|
|
49
|
+
groupKey: 'content',
|
|
63
50
|
value: data.login_text_bg_color || '',
|
|
64
51
|
className: "input80",
|
|
65
52
|
inline: false,
|
|
@@ -68,7 +55,7 @@ export default {
|
|
|
68
55
|
label: "登录按钮圆角配置",
|
|
69
56
|
ele: 'xd-site-select-list',
|
|
70
57
|
valueKey: "login_text_radius",
|
|
71
|
-
groupKey: '
|
|
58
|
+
groupKey: 'content',
|
|
72
59
|
value: data.login_text_radius || '',
|
|
73
60
|
placeholder: '请选择内容圆角设置',
|
|
74
61
|
multiple: false,
|
|
@@ -88,14 +75,14 @@ export default {
|
|
|
88
75
|
ele: 'title',
|
|
89
76
|
label: '查看样式设置',
|
|
90
77
|
size: 'small',
|
|
91
|
-
groupKey: '
|
|
78
|
+
groupKey: 'content',
|
|
92
79
|
},
|
|
93
80
|
{
|
|
94
81
|
label: "查看文字大小",
|
|
95
82
|
ele: "el-input",
|
|
96
83
|
type: "number",
|
|
97
84
|
valueKey: "look_text_size",
|
|
98
|
-
groupKey: '
|
|
85
|
+
groupKey: 'content',
|
|
99
86
|
value: data.look_text_size || '',
|
|
100
87
|
placeholder: "请输入登录文字大小",
|
|
101
88
|
className: "input80",
|
|
@@ -105,7 +92,7 @@ export default {
|
|
|
105
92
|
label: "查看字体颜色配置",
|
|
106
93
|
ele: 'xd-color',
|
|
107
94
|
valueKey: "look_text_color",
|
|
108
|
-
groupKey: '
|
|
95
|
+
groupKey: 'content',
|
|
109
96
|
value: data.look_text_color || '',
|
|
110
97
|
className: "input80",
|
|
111
98
|
inline: false,
|
|
@@ -114,7 +101,7 @@ export default {
|
|
|
114
101
|
label: "查看背景颜色配置",
|
|
115
102
|
ele: 'xd-color',
|
|
116
103
|
valueKey: "look_text_bg_color",
|
|
117
|
-
groupKey: '
|
|
104
|
+
groupKey: 'content',
|
|
118
105
|
value: data.look_text_bg_color || '',
|
|
119
106
|
className: "input80",
|
|
120
107
|
inline: false,
|
|
@@ -123,7 +110,7 @@ export default {
|
|
|
123
110
|
label: "查看按钮圆角配置",
|
|
124
111
|
ele: 'xd-site-select-list',
|
|
125
112
|
valueKey: "look_text_radius",
|
|
126
|
-
groupKey: '
|
|
113
|
+
groupKey: 'content',
|
|
127
114
|
value: data.look_text_radius || '',
|
|
128
115
|
placeholder: '请选择内容圆角设置',
|
|
129
116
|
multiple: false,
|
|
@@ -138,7 +125,18 @@ export default {
|
|
|
138
125
|
});
|
|
139
126
|
},
|
|
140
127
|
},
|
|
141
|
-
|
|
128
|
+
{
|
|
129
|
+
label: '票券登录文案:',
|
|
130
|
+
ele: 'el-input',
|
|
131
|
+
type: 'text',
|
|
132
|
+
valueKey: 'login_name',
|
|
133
|
+
groupKey:'content',
|
|
134
|
+
value: data.login_name || '',
|
|
135
|
+
placeholder: '请输入票券登录文案',
|
|
136
|
+
className: 'input80',
|
|
137
|
+
inline: false,
|
|
138
|
+
notice: '当未设置文案时候,前台页面显示为"<span style="color:red">登录</span>"'
|
|
139
|
+
},
|
|
142
140
|
|
|
143
141
|
{
|
|
144
142
|
label: '失效卡列表地址:',
|
|
@@ -114,9 +114,7 @@
|
|
|
114
114
|
color: tabIndex === 2 ? '#fff' : '#B8B7BE',
|
|
115
115
|
background: tabIndex === 2 ? mainColor : '#fff',
|
|
116
116
|
}"
|
|
117
|
-
>
|
|
118
|
-
可转换票券
|
|
119
|
-
</view>
|
|
117
|
+
>可转换票券</view>
|
|
120
118
|
</view>
|
|
121
119
|
<view
|
|
122
120
|
class="jfb-base-card__body-tips"
|
|
@@ -164,17 +162,13 @@
|
|
|
164
162
|
</view>
|
|
165
163
|
<view class="jfb-base-card__body-card-item-right-bottom">
|
|
166
164
|
<view class="jfb-base-card__body-card-item-right-bottom-info">
|
|
167
|
-
<view
|
|
168
|
-
class="jfb-base-card__body-card-item-right-bottom-info-residue"
|
|
169
|
-
>
|
|
165
|
+
<view class="jfb-base-card__body-card-item-right-bottom-info-residue">
|
|
170
166
|
剩余{{ item.unit }}数:{{ item.card_point }}{{ item.unit }}
|
|
171
167
|
</view>
|
|
172
168
|
<view
|
|
173
169
|
v-if="item.other_card_point && item.card_point_type !== 1"
|
|
174
170
|
class="jfb-base-card__body-card-item-right-bottom-info-deduction"
|
|
175
|
-
>
|
|
176
|
-
购买其他物品可抵:{{ item.other_card_point }}
|
|
177
|
-
</view>
|
|
171
|
+
>购买其他物品可抵:{{ item.other_card_point }}</view>
|
|
178
172
|
</view>
|
|
179
173
|
<view @click.stop="toDetail(item)" :style="lookStyle">查看</view>
|
|
180
174
|
</view>
|
|
@@ -269,12 +263,20 @@ export default {
|
|
|
269
263
|
}
|
|
270
264
|
},
|
|
271
265
|
watch: {
|
|
272
|
-
tabIndex(newVal
|
|
266
|
+
tabIndex(newVal) {
|
|
267
|
+
let data = [];
|
|
273
268
|
if (newVal === 1) {
|
|
274
|
-
this.showList = this.cardList;
|
|
269
|
+
this.showList = this.getPageCardContent(this.cardList);
|
|
270
|
+
data = this.$xdUniHelper.cloneDeep(this.cardList)
|
|
275
271
|
} else {
|
|
276
|
-
this.showList =
|
|
272
|
+
this.showList = this.getPageCardContent(this.changeList);
|
|
273
|
+
data = this.$xdUniHelper.cloneDeep(this.changeList)
|
|
277
274
|
}
|
|
275
|
+
this.$nextTick(()=>{
|
|
276
|
+
this.hasContent = data.length > this.pagesLimit;
|
|
277
|
+
this.offsetIndex = 1;
|
|
278
|
+
})
|
|
279
|
+
|
|
278
280
|
},
|
|
279
281
|
container(value) {
|
|
280
282
|
this.init(value)
|
|
@@ -294,11 +296,15 @@ export default {
|
|
|
294
296
|
isWx: true,
|
|
295
297
|
cutIndex: 1,
|
|
296
298
|
tabIndex: 1,
|
|
299
|
+
offsetIndex:0,//第几页
|
|
300
|
+
pagesLimit:20,//每页显示条数
|
|
301
|
+
cardSrcollLoading: false,//滚动获取数据中
|
|
302
|
+
hasContent:true, //是否有下一页
|
|
297
303
|
isBack: null, //是否使用返回键
|
|
298
|
-
cardList: [],
|
|
299
|
-
showList: [],
|
|
300
|
-
changeList: [],
|
|
301
|
-
disableList: [],
|
|
304
|
+
cardList: [], //可用卡卡列表
|
|
305
|
+
showList: [], //当前显示卡列表
|
|
306
|
+
changeList: [], //可转化卡列表
|
|
307
|
+
disableList: [], //不可用卡列表
|
|
302
308
|
inCallback: null, //内部跳转地址
|
|
303
309
|
loadingCardList: true,
|
|
304
310
|
|
|
@@ -326,8 +332,7 @@ export default {
|
|
|
326
332
|
|
|
327
333
|
dialogEvent: false,
|
|
328
334
|
// is_show_change: false,
|
|
329
|
-
popup:
|
|
330
|
-
"https://img.zcool.cn/community/01784158abe781a801219c77e981ee.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100",
|
|
335
|
+
popup: "https://img.zcool.cn/community/01784158abe781a801219c77e981ee.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100",
|
|
331
336
|
};
|
|
332
337
|
},
|
|
333
338
|
created() {
|
|
@@ -366,15 +371,17 @@ export default {
|
|
|
366
371
|
this.confirmUrl = getContainerPropsValue(container,"content.confirm_url",{value: ""}).value;
|
|
367
372
|
this.allEntryPath = getContainerPropsValue(container,"content.allEntryPath",{value: ""}).value;
|
|
368
373
|
this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
this.
|
|
372
|
-
this.
|
|
374
|
+
|
|
375
|
+
//登录样式
|
|
376
|
+
this.login_text_size = getContainerPropsValue(container, 'content.login_text_size', 26);
|
|
377
|
+
this.login_text_color = getContainerPropsValue(container, 'content.login_text_color', this.cardLayout==='2'? '#fff':'#333');
|
|
378
|
+
this.login_text_bg_color = getContainerPropsValue(container, 'content.login_text_bg_color', this.cardLayout === '2'? this.mainColor:'');
|
|
373
379
|
this.login_text_radius = getContainerPropsValue(container, 'content.login_text_radius', '20');
|
|
374
380
|
|
|
381
|
+
//查看样式
|
|
375
382
|
this.look_text_size = getContainerPropsValue(container, 'content.look_text_size', 24);
|
|
376
|
-
this.look_text_color = getContainerPropsValue(container, 'content.look_text_color', '#fff');
|
|
377
|
-
this.look_text_bg_color = getContainerPropsValue(container, 'content.look_text_bg_color', '
|
|
383
|
+
this.look_text_color = getContainerPropsValue(container, 'content.look_text_color', this.cardLayout==='2'? '#333':'#fff');
|
|
384
|
+
this.look_text_bg_color = getContainerPropsValue(container, 'content.look_text_bg_color', this.cardLayout === '2'? '' :this.mainColor);
|
|
378
385
|
this.look_text_radius = getContainerPropsValue(container, 'content.look_text_radius', '20');
|
|
379
386
|
},
|
|
380
387
|
|
|
@@ -564,25 +571,60 @@ export default {
|
|
|
564
571
|
),
|
|
565
572
|
};
|
|
566
573
|
});
|
|
567
|
-
this.cardList = res.list.filter((item) => {
|
|
574
|
+
this.cardList = res.list.filter((item,index) => {
|
|
568
575
|
return item["is_valid"] === "Y";
|
|
576
|
+
}).map((item,index)=>{
|
|
577
|
+
item['index'] = index;
|
|
578
|
+
return item
|
|
569
579
|
});
|
|
570
580
|
this.disableList = res.list.filter((item) => {
|
|
571
581
|
return item["is_valid"] === "N";
|
|
572
582
|
});
|
|
573
583
|
this.changeList = this.cardList.filter((item) => {
|
|
574
584
|
return item["is_exchange"] === "Y";
|
|
575
|
-
})
|
|
576
|
-
this.showList = this.cardList;
|
|
585
|
+
})
|
|
586
|
+
this.showList = this.getPageCardContent(this.cardList);
|
|
587
|
+
if(this.hasContent) this.offsetIndex++;
|
|
577
588
|
this.$xdHideLoading();
|
|
578
589
|
})
|
|
579
590
|
.catch(() => this.$xdHideLoading());
|
|
580
591
|
},
|
|
581
592
|
|
|
593
|
+
getPageCardContent(orgData){
|
|
594
|
+
let newData = this.$xdUniHelper.cloneDeep(orgData);
|
|
595
|
+
return newData.slice(0,this.pagesLimit);
|
|
596
|
+
},
|
|
597
|
+
|
|
582
598
|
onJfbShow(options) {
|
|
599
|
+
this.offsetIndex = 0;
|
|
600
|
+
this.hasContent = true;
|
|
601
|
+
this.tabIndex = 0;
|
|
583
602
|
this.onJfbLoad(options);
|
|
584
603
|
},
|
|
585
604
|
|
|
605
|
+
onJfbReachBottom(){
|
|
606
|
+
//加载在不处理,无下一页不处理,当前也为0不处理
|
|
607
|
+
if(this.cardSrcollLoading || !this.hasContent || this.offsetIndex === 0) return;
|
|
608
|
+
this.cardSrcollLoading = true;
|
|
609
|
+
this.$xdShowLoading({});
|
|
610
|
+
let data = [];
|
|
611
|
+
if(this.tabIndex === 1) data = this.$xdUniHelper.cloneDeep(this.cardList);
|
|
612
|
+
if(this.tabIndex === 2) data = this.$xdUniHelper.cloneDeep(this.changeList);
|
|
613
|
+
setTimeout(()=>{
|
|
614
|
+
this.$xdHideLoading();
|
|
615
|
+
let cardComputedList = data.slice(
|
|
616
|
+
this.offsetIndex*this.pagesLimit,
|
|
617
|
+
this.offsetIndex*this.pagesLimit + this.pagesLimit
|
|
618
|
+
);
|
|
619
|
+
if(cardComputedList.length < this.pagesLimit) {
|
|
620
|
+
this.hasContent = false;
|
|
621
|
+
}
|
|
622
|
+
this.showList = (this.showList||[]).concat(cardComputedList);
|
|
623
|
+
this.cardSrcollLoading = false;
|
|
624
|
+
this.offsetIndex++;
|
|
625
|
+
},500)
|
|
626
|
+
},
|
|
627
|
+
|
|
586
628
|
onJfbUpdate(data) {
|
|
587
629
|
this.getContent();
|
|
588
630
|
},
|