jufubao-base 1.0.61-beta1006 → 1.0.61-beta1008
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 +1 -1
- package/src/components/JfbBaseCard/JfbBaseCard.vue +44 -29
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +1 -1
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +52 -50
- package/src/components/JfbBaseCardDisabledEntry/cardListMixins.js +142 -0
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +39 -27
- package/src/mixins/cardListMixins.js +1 -1
package/package.json
CHANGED
|
@@ -67,37 +67,39 @@
|
|
|
67
67
|
</view>
|
|
68
68
|
</template>
|
|
69
69
|
</view>
|
|
70
|
+
<!--notice-->
|
|
70
71
|
<view class="jfb-base-card__body-line" v-if="!notice"></view>
|
|
71
|
-
<view
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
>
|
|
76
|
-
<xd-notice-bar
|
|
77
|
-
:showIcon="true"
|
|
78
|
-
:scrollable="true"
|
|
79
|
-
:speed="20"
|
|
80
|
-
:fontSize="24"
|
|
81
|
-
:height="70"
|
|
82
|
-
:is-no-bgc="false"
|
|
72
|
+
<view class="jfb-base-card__body-notice" v-if="notice">
|
|
73
|
+
<view
|
|
74
|
+
class="jfb-base-card__body-notice-in"
|
|
75
|
+
:style="{ background: noticeBackgroundColor }"
|
|
83
76
|
>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
<xd-notice-bar
|
|
78
|
+
:showIcon="true"
|
|
79
|
+
:scrollable="true"
|
|
80
|
+
:speed="20"
|
|
81
|
+
:fontSize="24"
|
|
82
|
+
:height="70"
|
|
83
|
+
:is-no-bgc="false"
|
|
84
|
+
>
|
|
85
|
+
<template>
|
|
86
|
+
<view v-html="notice"></view>
|
|
87
|
+
</template>
|
|
88
|
+
</xd-notice-bar>
|
|
89
|
+
</view>
|
|
88
90
|
</view>
|
|
89
|
-
<view
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
<view class="jfb-base-card__body-notice" v-if="noticeStatus && isPreview && notice === ''">
|
|
92
|
+
<view
|
|
93
|
+
class="jfb-base-card__body-notice-in"
|
|
94
|
+
:style="{
|
|
93
95
|
background: noticeBackgroundColor,
|
|
94
96
|
textAlign: 'center',
|
|
95
97
|
color: dangerColor,
|
|
96
98
|
fontSize: 26 + 'rpx',
|
|
97
99
|
}"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
>该组件未配置数据,因此改模块在正式环境将不显示</view>
|
|
101
|
+
</view>
|
|
102
|
+
<!--notice end-->
|
|
101
103
|
<view class="jfb-base-card__body-tab">
|
|
102
104
|
<view
|
|
103
105
|
@click="tabIndex = 1"
|
|
@@ -298,10 +300,10 @@ export default {
|
|
|
298
300
|
this.init(this.container);
|
|
299
301
|
this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
300
302
|
this.isPreview = this.$configProject.isPreview;
|
|
301
|
-
|
|
303
|
+
|
|
302
304
|
//#ifdef H5
|
|
303
305
|
this.isWx = this.isPreview || isWechat();
|
|
304
|
-
|
|
306
|
+
|
|
305
307
|
if (!this.$configProject.isPreview) {
|
|
306
308
|
jfbRootExec("getH5WxAuthorize", {
|
|
307
309
|
vm: this,
|
|
@@ -331,7 +333,7 @@ export default {
|
|
|
331
333
|
this.allEntryPath = getContainerPropsValue(container,"content.allEntryPath",{value: ""}).value;
|
|
332
334
|
this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
|
|
333
335
|
},
|
|
334
|
-
|
|
336
|
+
|
|
335
337
|
handleToLink(path) {
|
|
336
338
|
this.$xdUniHelper.navigateTo({
|
|
337
339
|
url: path,
|
|
@@ -629,9 +631,22 @@ export default {
|
|
|
629
631
|
}
|
|
630
632
|
|
|
631
633
|
&-notice {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
634
|
+
width: 100%;
|
|
635
|
+
margin-top: unit(30, rpx);
|
|
636
|
+
height: unit(80, rpx);
|
|
637
|
+
position: relative;
|
|
638
|
+
&-in {
|
|
639
|
+
position: absolute;
|
|
640
|
+
left: unit(-30, rpx);
|
|
641
|
+
top: unit(0, rpx);
|
|
642
|
+
right: unit(-30, rpx);
|
|
643
|
+
bottom: 0;
|
|
644
|
+
display: flex;
|
|
645
|
+
padding: 0 unit(30, rpx);
|
|
646
|
+
overflow: hidden;
|
|
647
|
+
align-items: center;
|
|
648
|
+
}
|
|
649
|
+
|
|
635
650
|
}
|
|
636
651
|
|
|
637
652
|
&-tab {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
</view>
|
|
75
75
|
</view>
|
|
76
76
|
<view class="bottom_btn-mask"></view>
|
|
77
|
-
<view v-if="
|
|
77
|
+
<view v-if="ajaxCardList && ajaxCardList.length>0" class="bottom_btn" :style="prod_bottom">
|
|
78
78
|
<xd-button
|
|
79
79
|
width="680rpx"
|
|
80
80
|
radius="50rpx"
|
|
@@ -92,6 +92,7 @@ import { jfbRootExec } from "@/utils/xd.event";
|
|
|
92
92
|
import JfbBaseCardDisabledEntryMixin from "./JfbBaseCardDisabledEntryMixin";
|
|
93
93
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
94
94
|
import colorCardMixins from "@/mixins/colorCardMixins";
|
|
95
|
+
import cardListMixins from "./cardListMixins";
|
|
95
96
|
import XdButton from "@/components/XdButton/XdButton";
|
|
96
97
|
import XdNoData from '@/components/XdNoData/XdNoData'
|
|
97
98
|
import extsMixins from "@/mixins/extsMixins";
|
|
@@ -102,7 +103,7 @@ export default {
|
|
|
102
103
|
XdNoData,
|
|
103
104
|
XdButton
|
|
104
105
|
},
|
|
105
|
-
mixins: [componentsMixins, extsMixins, JfbBaseCardDisabledEntryMixin, colorCardMixins],
|
|
106
|
+
mixins: [componentsMixins, extsMixins, JfbBaseCardDisabledEntryMixin, colorCardMixins, cardListMixins],
|
|
106
107
|
data() {
|
|
107
108
|
return {
|
|
108
109
|
disableList: [],
|
|
@@ -123,14 +124,13 @@ export default {
|
|
|
123
124
|
},
|
|
124
125
|
},
|
|
125
126
|
created() {
|
|
126
|
-
console.log(this.getNoData(),'this.getNoData()this.getNoData()');
|
|
127
127
|
this.init(this.container);
|
|
128
128
|
},
|
|
129
129
|
methods: {
|
|
130
130
|
onJfbLoad(options) {
|
|
131
131
|
this.getCardList();
|
|
132
132
|
},
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
getCardList() {
|
|
135
135
|
this.$xdShowLoading({});
|
|
136
136
|
jfbRootExec("getDisableCardListEntry", {vm: this, data: {is_all: "Y", is_show_entry_settings: 'Y'},})
|
|
@@ -149,14 +149,16 @@ export default {
|
|
|
149
149
|
),
|
|
150
150
|
};
|
|
151
151
|
});
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
|
|
153
|
+
//设置列表
|
|
154
|
+
this.ajaxCardList = res;
|
|
155
|
+
this.handleCardInit(this.ajaxCardList);
|
|
156
|
+
|
|
155
157
|
this.$xdHideLoading();
|
|
156
158
|
})
|
|
157
159
|
.catch(() => this.$xdHideLoading());
|
|
158
160
|
},
|
|
159
|
-
|
|
161
|
+
|
|
160
162
|
handleAllUnBindCard(){
|
|
161
163
|
this.$xdConfirm({
|
|
162
164
|
$vm: this,
|
|
@@ -186,9 +188,9 @@ export default {
|
|
|
186
188
|
}
|
|
187
189
|
},
|
|
188
190
|
});
|
|
189
|
-
|
|
191
|
+
|
|
190
192
|
},
|
|
191
|
-
|
|
193
|
+
|
|
192
194
|
handleUnBindCard(item) {
|
|
193
195
|
this.$xdConfirm({
|
|
194
196
|
$vm: this,
|
|
@@ -222,13 +224,13 @@ export default {
|
|
|
222
224
|
},
|
|
223
225
|
});
|
|
224
226
|
},
|
|
225
|
-
|
|
227
|
+
|
|
226
228
|
/**
|
|
227
229
|
* @description 监听事件变化
|
|
228
230
|
* @param container {object} 业务组件对象自己
|
|
229
231
|
*/
|
|
230
232
|
init(container) {},
|
|
231
|
-
|
|
233
|
+
|
|
232
234
|
onJfbBack(options) {
|
|
233
235
|
console.log("event.onJfbBack", options);
|
|
234
236
|
},
|
|
@@ -357,18 +359,18 @@ export default {
|
|
|
357
359
|
overflow: hidden;
|
|
358
360
|
border-radius: unit(16, rpx);
|
|
359
361
|
margin-bottom: unit(30, rpx);
|
|
360
|
-
|
|
362
|
+
|
|
361
363
|
&:last-child {
|
|
362
364
|
margin-bottom: 0;
|
|
363
365
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
+
|
|
367
|
+
|
|
366
368
|
&__title {
|
|
367
369
|
height: unit(56, rpx);
|
|
368
370
|
display: flex;
|
|
369
371
|
justify-content: flex-start;
|
|
370
372
|
align-items: center;
|
|
371
|
-
|
|
373
|
+
|
|
372
374
|
& > view {
|
|
373
375
|
padding: 0 unit(80, rpx);
|
|
374
376
|
font-size: unit(24, rpx);
|
|
@@ -377,23 +379,23 @@ export default {
|
|
|
377
379
|
color: #fff;
|
|
378
380
|
border-radius: 0 0 unit(16, rpx) 0;
|
|
379
381
|
}
|
|
380
|
-
|
|
382
|
+
|
|
381
383
|
}
|
|
382
|
-
|
|
384
|
+
|
|
383
385
|
&__content {
|
|
384
386
|
padding: unit(10, rpx) unit(40, rpx) 0;
|
|
385
387
|
height: unit(86, rpx);
|
|
386
388
|
display: flex;
|
|
387
389
|
justify-content: space-between;
|
|
388
390
|
align-items: center;
|
|
389
|
-
|
|
391
|
+
|
|
390
392
|
& > view:first-child {
|
|
391
393
|
font-size: unit(36, rpx);
|
|
392
394
|
line-height: unit(86, rpx);
|
|
393
395
|
color: #fff;
|
|
394
396
|
font-weight: 700;
|
|
395
397
|
}
|
|
396
|
-
|
|
398
|
+
|
|
397
399
|
& > view:nth-child(2) {
|
|
398
400
|
font-size: unit(24, rpx);
|
|
399
401
|
display: flex;
|
|
@@ -404,32 +406,32 @@ export default {
|
|
|
404
406
|
color: #fff;
|
|
405
407
|
}
|
|
406
408
|
}
|
|
407
|
-
|
|
409
|
+
|
|
408
410
|
&__date {
|
|
409
411
|
padding: 0 unit(40, rpx);
|
|
410
412
|
font-size: unit(28, rpx);
|
|
411
413
|
line-height: unit(32, rpx);
|
|
412
414
|
color: #fff;
|
|
413
415
|
}
|
|
414
|
-
|
|
416
|
+
|
|
415
417
|
&__yue {
|
|
416
418
|
padding: unit(10, rpx) unit(40, rpx) 0;
|
|
417
419
|
font-size: unit(28, rpx);
|
|
418
420
|
line-height: unit(32, rpx);
|
|
419
421
|
color: #fff;
|
|
420
|
-
|
|
422
|
+
|
|
421
423
|
& > text:nth-child(2) {
|
|
422
424
|
font-weight: 700;
|
|
423
425
|
}
|
|
424
426
|
}
|
|
425
|
-
|
|
427
|
+
|
|
426
428
|
&__other {
|
|
427
429
|
display: flex;
|
|
428
430
|
justify-content: flex-start;
|
|
429
431
|
align-items: center;
|
|
430
432
|
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
431
433
|
margin-top: unit(0, rpx);
|
|
432
|
-
|
|
434
|
+
|
|
433
435
|
& > view {
|
|
434
436
|
border-radius: unit(8, rpx);
|
|
435
437
|
background: rgba(255, 255, 255, 0.2);
|
|
@@ -443,20 +445,20 @@ export default {
|
|
|
443
445
|
padding: 0 unit(20, rpx);
|
|
444
446
|
color: #fff;
|
|
445
447
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
+
|
|
449
|
+
|
|
448
450
|
}
|
|
449
|
-
|
|
451
|
+
|
|
450
452
|
&__nodata {
|
|
451
453
|
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
452
454
|
margin-top: unit(0, rpx);
|
|
453
455
|
color: #fff;
|
|
454
456
|
font-size: unit(28, rpx);
|
|
455
457
|
}
|
|
456
|
-
|
|
458
|
+
|
|
457
459
|
&__entry {
|
|
458
460
|
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
459
|
-
|
|
461
|
+
|
|
460
462
|
& > view {
|
|
461
463
|
line-height: unit(64, rpx);
|
|
462
464
|
text-align: center;
|
|
@@ -467,26 +469,26 @@ export default {
|
|
|
467
469
|
font-weight: 500;
|
|
468
470
|
}
|
|
469
471
|
}
|
|
470
|
-
|
|
472
|
+
|
|
471
473
|
&__entrys {
|
|
472
474
|
margin: unit(20, rpx) unit(20, rpx) 0;
|
|
473
475
|
padding: unit(30, rpx);
|
|
474
476
|
border-radius: unit(16, rpx);
|
|
475
477
|
background: rgba(255, 255, 255, 1);
|
|
476
478
|
box-shadow: 0 unit(4, rpx) unit(8, rpx) rgba(156, 62, 0, 0.11);
|
|
477
|
-
|
|
479
|
+
|
|
478
480
|
&-title {
|
|
479
481
|
display: flex;
|
|
480
482
|
justify-content: space-between;
|
|
481
483
|
align-items: center;
|
|
482
|
-
|
|
483
|
-
|
|
484
|
+
|
|
485
|
+
|
|
484
486
|
& > view:first-child {
|
|
485
487
|
font-size: unit(28, rpx);
|
|
486
488
|
font-weight: 500;
|
|
487
489
|
flex: 1;
|
|
488
490
|
}
|
|
489
|
-
|
|
491
|
+
|
|
490
492
|
& > view:nth-child(2) {
|
|
491
493
|
display: flex;
|
|
492
494
|
justify-content: flex-start;
|
|
@@ -496,11 +498,11 @@ export default {
|
|
|
496
498
|
color: #999;
|
|
497
499
|
}
|
|
498
500
|
}
|
|
499
|
-
|
|
501
|
+
|
|
500
502
|
&-scroll {
|
|
501
|
-
|
|
503
|
+
|
|
502
504
|
}
|
|
503
|
-
|
|
505
|
+
|
|
504
506
|
&-item {
|
|
505
507
|
display: flex;
|
|
506
508
|
justify-content: flex-start;
|
|
@@ -508,7 +510,7 @@ export default {
|
|
|
508
510
|
flex-flow: nowrap;
|
|
509
511
|
margin-left: unit(-14, rpx);
|
|
510
512
|
padding-top: unit(20, rpx);
|
|
511
|
-
|
|
513
|
+
|
|
512
514
|
& > view {
|
|
513
515
|
width: unit(120, rpx);
|
|
514
516
|
margin-right: unit(10, rpx);
|
|
@@ -517,25 +519,25 @@ export default {
|
|
|
517
519
|
justify-content: center;
|
|
518
520
|
flex-direction: column;
|
|
519
521
|
align-items: center;
|
|
520
|
-
|
|
522
|
+
|
|
521
523
|
& > view:first-child {
|
|
522
524
|
width: unit(76, rpx);
|
|
523
525
|
height: unit(76, rpx);
|
|
524
526
|
overflow: hidden;
|
|
525
|
-
|
|
527
|
+
|
|
526
528
|
& > image {
|
|
527
529
|
height: 100%;
|
|
528
530
|
width: 100%;
|
|
529
531
|
}
|
|
530
532
|
}
|
|
531
|
-
|
|
533
|
+
|
|
532
534
|
& > view:nth-child(2) {
|
|
533
535
|
margin-top: unit(10, rpx);
|
|
534
536
|
font-size: unit(24, rpx);
|
|
535
537
|
line-height: unit(36, rpx);
|
|
536
538
|
margin-bottom: unit(10, rpx);
|
|
537
539
|
}
|
|
538
|
-
|
|
540
|
+
|
|
539
541
|
& > view:nth-child(3) {
|
|
540
542
|
display: flex;
|
|
541
543
|
justify-content: flex-start;
|
|
@@ -544,18 +546,18 @@ export default {
|
|
|
544
546
|
font-size: unit(20, rpx);
|
|
545
547
|
color: #999;
|
|
546
548
|
}
|
|
547
|
-
|
|
549
|
+
|
|
548
550
|
&:last-child {
|
|
549
551
|
margin-right: 0;
|
|
550
552
|
}
|
|
551
|
-
|
|
553
|
+
|
|
552
554
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
+
|
|
556
|
+
|
|
555
557
|
}
|
|
556
558
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
+
|
|
560
|
+
|
|
559
561
|
&-warp {
|
|
560
562
|
width: unit(700, rpx);
|
|
561
563
|
min-height: unit(310, rpx);
|
|
@@ -574,7 +576,7 @@ export default {
|
|
|
574
576
|
align-items: center;
|
|
575
577
|
height: unit(120, rpx);
|
|
576
578
|
background: #ffffff;
|
|
577
|
-
|
|
579
|
+
|
|
578
580
|
&-mask {
|
|
579
581
|
height: unit(120, rpx);
|
|
580
582
|
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {mapState} from "vuex";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
ajaxCardList: null, //接口返回原始数据
|
|
8
|
+
|
|
9
|
+
//卡券列表
|
|
10
|
+
cardOrgList:[], //原始数据
|
|
11
|
+
cardList:[], //计算后的卡列表
|
|
12
|
+
cardPageNum: 0, //当前页面
|
|
13
|
+
cardPageLen: 10, //每页获取数据调试
|
|
14
|
+
cardComputedList:[], //当前获取的数据列表
|
|
15
|
+
cardLoading: false, //加载状态值设置
|
|
16
|
+
cardNextTop: 0, //计算到每一个节点的距离顶部Top值
|
|
17
|
+
contentStatus: false, //内容框是否已经进行过计算距离顶部Top值状态
|
|
18
|
+
hasContent: true, //是否可以进行继续加载状态
|
|
19
|
+
|
|
20
|
+
//转换按钮
|
|
21
|
+
hasChangeStatus: false,//是否有转换按钮
|
|
22
|
+
|
|
23
|
+
cardItemBg1: '//img.jufubao.cn/component/card/card_item_02.png',
|
|
24
|
+
cardItemBg2: '//img.jufubao.cn/component/card/card_item_01.png'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
computed:{
|
|
28
|
+
...mapState(['srollPreview'])
|
|
29
|
+
},
|
|
30
|
+
watch:{
|
|
31
|
+
// srollPreview(value){
|
|
32
|
+
// console.log(value)
|
|
33
|
+
// }
|
|
34
|
+
},
|
|
35
|
+
created(){
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
mounted(){
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
},
|
|
43
|
+
methods:{
|
|
44
|
+
setCardItemShow({height , top},index){
|
|
45
|
+
|
|
46
|
+
//预览模式只获取10条
|
|
47
|
+
if(this.$configProject.isPreview) {
|
|
48
|
+
console.log(this.cardPageLen, index, this.cardPageLen > index)
|
|
49
|
+
return this.cardPageLen > index;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//打包模式
|
|
53
|
+
let fiexd = 50;
|
|
54
|
+
let boxTop = top + height + fiexd;
|
|
55
|
+
let boxBottom = top - (fiexd);
|
|
56
|
+
let {pageWindowPrevStart, pageWindowPrevEnd} = this.srollPreview;
|
|
57
|
+
return boxTop > pageWindowPrevStart && boxBottom < pageWindowPrevEnd;
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
getBoxTop(){
|
|
61
|
+
return new Promise((resolve, reject)=>{
|
|
62
|
+
const query = uni.createSelectorQuery().in(this);
|
|
63
|
+
query.select('.card-content').boundingClientRect(data=>{
|
|
64
|
+
this.cardNextTop = data.top;
|
|
65
|
+
this.contentStatus = true;
|
|
66
|
+
resolve();
|
|
67
|
+
}).exec()
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
async handleCardComputed(paddingBottom=30){
|
|
73
|
+
this.$xdShowLoading({});
|
|
74
|
+
if(this.contentStatus === false) await this.getBoxTop();
|
|
75
|
+
this.$nextTick(()=>{
|
|
76
|
+
const query = uni.createSelectorQuery().in(this);
|
|
77
|
+
query.selectAll('.computed-box').boundingClientRect(data => {
|
|
78
|
+
let arr = data.map(item=>{
|
|
79
|
+
let card = this.cardComputedList.filter(it=>{
|
|
80
|
+
return item.dataset.card === it.card_number;
|
|
81
|
+
})[0];
|
|
82
|
+
card['height'] = item.height;
|
|
83
|
+
card['top'] = this.cardNextTop;
|
|
84
|
+
this.cardNextTop = this.cardNextTop + card['height'] + (paddingBottom * this.$rpxNum)
|
|
85
|
+
return card
|
|
86
|
+
});
|
|
87
|
+
this.cardList = this.cardList.concat(arr);
|
|
88
|
+
this.$xdHideLoading();
|
|
89
|
+
}).exec();
|
|
90
|
+
})
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
handleCardInit(cardList, paddingBottom =30){
|
|
94
|
+
let newCardList = this.$xdUniHelper.cloneDeep(cardList);
|
|
95
|
+
let validCardList = this.getCardGroupItem(newCardList.list.filter((item) => {
|
|
96
|
+
return item["is_valid"] === "N";
|
|
97
|
+
}), newCardList['site_entry_settings']).map((item,index)=>{
|
|
98
|
+
item['index'] = index;
|
|
99
|
+
return item
|
|
100
|
+
});
|
|
101
|
+
this.cardOrgList = this.$xdUniHelper.cloneDeep(validCardList);
|
|
102
|
+
this.cardComputedList = this.cardOrgList.slice(this.cardPageNum,this.cardPageLen);
|
|
103
|
+
this.handleCardComputed(paddingBottom).then().catch();
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
onJfbReachBottom(){
|
|
107
|
+
if(this.cardLoading || !this.hasContent) return;
|
|
108
|
+
this.cardLoading = true;
|
|
109
|
+
this.$xdShowLoading({});
|
|
110
|
+
this.cardPageNum++;
|
|
111
|
+
console.log('onJfbReachBottom',this.cardPageNum)
|
|
112
|
+
this.$nextTick(()=>{
|
|
113
|
+
setTimeout(()=>{
|
|
114
|
+
this.cardLoading = false;
|
|
115
|
+
this.$xdHideLoading();
|
|
116
|
+
this.cardComputedList = this.cardOrgList.slice(
|
|
117
|
+
this.cardPageNum*this.cardPageLen,
|
|
118
|
+
this.cardPageNum*this.cardPageLen + this.cardPageLen
|
|
119
|
+
);
|
|
120
|
+
this.handleCardComputed().then().catch();
|
|
121
|
+
if(this.cardComputedList.length < this.cardPageLen) {
|
|
122
|
+
this.hasContent = false;
|
|
123
|
+
}
|
|
124
|
+
},500)
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
clearDefault(){
|
|
130
|
+
this.cardOrgList = [];
|
|
131
|
+
this.cardList = [];
|
|
132
|
+
this.cardPageNum = 0;
|
|
133
|
+
this.cardComputedList = [];
|
|
134
|
+
this.cardLoading = false;
|
|
135
|
+
this.cardNextTop = 0;
|
|
136
|
+
this.contentStatus = false;
|
|
137
|
+
this.hasContent = true;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
@@ -70,28 +70,26 @@
|
|
|
70
70
|
</template>
|
|
71
71
|
</view>
|
|
72
72
|
<view class="jfb-base-card-entry__body-line" v-if="!notice"></view>
|
|
73
|
-
<view
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
>
|
|
78
|
-
<xd-notice-bar
|
|
79
|
-
:showIcon="true"
|
|
80
|
-
:scrollable="true"
|
|
81
|
-
:speed="20"
|
|
82
|
-
:fontSize="24"
|
|
83
|
-
:height="70"
|
|
84
|
-
:is-no-bgc="false"
|
|
73
|
+
<view class="jfb-base-card-entry__body-notice" v-if="notice">
|
|
74
|
+
<view
|
|
75
|
+
class="jfb-base-card-entry__body-notice-in"
|
|
76
|
+
:style="{ background: noticeBackgroundColor }"
|
|
85
77
|
>
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
78
|
+
<xd-notice-bar
|
|
79
|
+
:showIcon="true"
|
|
80
|
+
:scrollable="true"
|
|
81
|
+
:speed="20"
|
|
82
|
+
:fontSize="24"
|
|
83
|
+
:height="70"
|
|
84
|
+
:is-no-bgc="false"
|
|
85
|
+
>
|
|
86
|
+
<template>
|
|
87
|
+
<view v-html="notice"></view>
|
|
88
|
+
</template>
|
|
89
|
+
</xd-notice-bar>
|
|
90
|
+
</view>
|
|
90
91
|
</view>
|
|
91
|
-
<view
|
|
92
|
-
class="jfb-base-card-entry__body-notice"
|
|
93
|
-
v-if="noticeStatus && isPreview && notice === ''"
|
|
94
|
-
>
|
|
92
|
+
<view class="jfb-base-card-entry__body-notice" v-if="noticeStatus && isPreview && notice === ''">
|
|
95
93
|
<view
|
|
96
94
|
class="jfb-base-card-entry__body-notice-in"
|
|
97
95
|
:style="{
|
|
@@ -102,7 +100,6 @@
|
|
|
102
100
|
}"
|
|
103
101
|
>该组件未配置数据,因此改模块在正式环境将不显示</view>
|
|
104
102
|
</view>
|
|
105
|
-
|
|
106
103
|
<view class="jfb-base-card-entry__body-tab">
|
|
107
104
|
<view
|
|
108
105
|
@click="tabIndex = 1"
|
|
@@ -127,13 +124,14 @@
|
|
|
127
124
|
>* 目前仅支持电影票兑换券进行转换</view>
|
|
128
125
|
<view class="card-content">
|
|
129
126
|
<view
|
|
130
|
-
v-if="tabIndex === 2 || tabIndex === 1 && cardList.length > 0"
|
|
127
|
+
v-if="tabIndex === 2 || tabIndex === 1 && (cardList && cardList.length > 0)"
|
|
131
128
|
class="jfb-base-card-entry__body-card"
|
|
132
129
|
>
|
|
133
130
|
<view
|
|
134
131
|
v-for="(item,index) in cardList"
|
|
135
132
|
:data-index="item.card_number"
|
|
136
133
|
:data-idx="index"
|
|
134
|
+
:data-top="item.top"
|
|
137
135
|
class="card-list"
|
|
138
136
|
:key="item.card_number"
|
|
139
137
|
@click="toDetail(item)"
|
|
@@ -215,13 +213,16 @@
|
|
|
215
213
|
</view>
|
|
216
214
|
<view
|
|
217
215
|
class="card-content-empty card-list"
|
|
216
|
+
:data-index="item.card_number"
|
|
217
|
+
:data-idx="index"
|
|
218
|
+
:data-top="item.top"
|
|
218
219
|
v-else
|
|
219
220
|
:style="{
|
|
220
221
|
height: item.height + 'px',
|
|
221
222
|
}"
|
|
222
223
|
><image :src="item.entries.length > 1 ? cardItemBg2: cardItemBg1"></image></view>
|
|
223
224
|
</view>
|
|
224
|
-
<view v-else-if="cardList === null
|
|
225
|
+
<view v-else-if="cardList === null">
|
|
225
226
|
<view class="jfb-base-card-entry__body-empty">
|
|
226
227
|
<view class="jfb-base-card-entry__body-empty-wrap">
|
|
227
228
|
<image :src="emptyBg"></image>
|
|
@@ -799,12 +800,20 @@ export default {
|
|
|
799
800
|
}
|
|
800
801
|
|
|
801
802
|
&-notice {
|
|
802
|
-
overflow: hidden;
|
|
803
803
|
width: 100%;
|
|
804
|
+
margin-top: unit(30, rpx);
|
|
805
|
+
height: unit(80, rpx);
|
|
806
|
+
position: relative;
|
|
804
807
|
&-in {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
+
position: absolute;
|
|
809
|
+
left: unit(-30, rpx);
|
|
810
|
+
top: unit(0, rpx);
|
|
811
|
+
right: unit(-30, rpx);
|
|
812
|
+
bottom: 0;
|
|
813
|
+
display: flex;
|
|
814
|
+
padding: 0 unit(30, rpx);
|
|
815
|
+
overflow: hidden;
|
|
816
|
+
align-items: center;
|
|
808
817
|
}
|
|
809
818
|
|
|
810
819
|
}
|
|
@@ -1009,6 +1018,9 @@ export default {
|
|
|
1009
1018
|
width: unit(76, rpx);
|
|
1010
1019
|
height: unit(76, rpx);
|
|
1011
1020
|
overflow: hidden;
|
|
1021
|
+
display: flex;
|
|
1022
|
+
justify-content: center;
|
|
1023
|
+
align-items: center;
|
|
1012
1024
|
|
|
1013
1025
|
& > image {
|
|
1014
1026
|
height: 100%;
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
cardOrgList:[], //原始数据
|
|
11
11
|
cardList:[], //计算后的卡列表
|
|
12
12
|
cardPageNum: 0, //当前页面
|
|
13
|
-
cardPageLen:
|
|
13
|
+
cardPageLen: 5, //每页获取数据调试
|
|
14
14
|
cardComputedList:[], //当前获取的数据列表
|
|
15
15
|
cardLoading: false, //加载状态值设置
|
|
16
16
|
cardNextTop: 0, //计算到每一个节点的距离顶部Top值
|