jufubao-base 1.0.61-beta1002 → 1.0.61-beta1004
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/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +3 -3
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +218 -110
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +6 -6
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +1 -1
- package/src/mixins/cardListMixins.js +148 -0
package/package.json
CHANGED
|
@@ -262,9 +262,9 @@ export default {
|
|
|
262
262
|
);
|
|
263
263
|
}
|
|
264
264
|
if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
|
|
265
|
-
res.site_entry_settings = res.site_entry_settings.
|
|
265
|
+
res.site_entry_settings = res.site_entry_settings.filter(item=>{
|
|
266
266
|
item['image_url'] = getServiceUrl(item['image_url'])
|
|
267
|
-
return item
|
|
267
|
+
return res.business_codes.includes(item.business_code)
|
|
268
268
|
})
|
|
269
269
|
}
|
|
270
270
|
this.info = res;
|
|
@@ -770,7 +770,7 @@ export default {
|
|
|
770
770
|
|
|
771
771
|
&-warp {
|
|
772
772
|
width: unit(700, rpx);
|
|
773
|
-
min-height: unit(290, rpx);
|
|
773
|
+
// min-height: unit(290, rpx);
|
|
774
774
|
position: relative;
|
|
775
775
|
border-radius: unit(16, rpx);
|
|
776
776
|
background-size: 100%;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
size="45"
|
|
35
35
|
icon="iconsaoma"
|
|
36
36
|
></xd-font-icon>
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
</view>
|
|
39
39
|
<view
|
|
40
40
|
class="jfb-base-card-entry__body-cut-item"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
size="45"
|
|
52
52
|
icon="iconyuechi"
|
|
53
53
|
></xd-font-icon>
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
</view>
|
|
56
56
|
</template>
|
|
57
57
|
<template v-else>
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}"
|
|
108
108
|
>已绑定票券</view>
|
|
109
109
|
<view
|
|
110
|
-
v-if="
|
|
110
|
+
v-if="hasChangeStatus"
|
|
111
111
|
@click="tabIndex = 2"
|
|
112
112
|
:style="{
|
|
113
113
|
color: tabIndex === 2 ? '#fff' : '#B8B7BE',
|
|
@@ -120,16 +120,141 @@
|
|
|
120
120
|
:style="{ color: warningColor }"
|
|
121
121
|
v-if="tabIndex === 2"
|
|
122
122
|
>* 目前仅支持电影票兑换券进行转换</view>
|
|
123
|
-
<view
|
|
123
|
+
<view class="card-content">
|
|
124
124
|
<view
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
v-if="tabIndex === 2 || tabIndex === 1 && cardList.length > 0"
|
|
126
|
+
class="jfb-base-card-entry__body-card"
|
|
127
|
+
>
|
|
128
|
+
<view
|
|
129
|
+
v-for="(item,index) in cardList"
|
|
130
|
+
:data-index="item.card_number"
|
|
131
|
+
:data-idx="index"
|
|
132
|
+
class="card-list"
|
|
133
|
+
:key="item.card_number"
|
|
134
|
+
@click="toDetail(item)"
|
|
135
|
+
v-if="setCardItemShow(item,index)"
|
|
136
|
+
:style="{
|
|
137
|
+
background: item['theme']['color'],
|
|
138
|
+
backgroundSize: '100%',
|
|
139
|
+
height: item.height + 'px'
|
|
140
|
+
}"
|
|
141
|
+
>
|
|
142
|
+
<view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
|
|
143
|
+
<view class="card-list__title"><view>{{item['card_type_name']}}</view></view>
|
|
144
|
+
<view class="card-list__content">
|
|
145
|
+
<view>
|
|
146
|
+
<text>券号:</text>
|
|
147
|
+
<text>{{item.card_number}}</text>
|
|
148
|
+
</view>
|
|
149
|
+
<view @click.stop="toDetail(item)" v-if="0">
|
|
150
|
+
<view>
|
|
151
|
+
<xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
|
|
152
|
+
</view>
|
|
153
|
+
<view>点击查看</view>
|
|
154
|
+
</view>
|
|
155
|
+
</view>
|
|
156
|
+
<view class="card-list__date">
|
|
157
|
+
<text>有效期:</text>
|
|
158
|
+
<text>{{item.end_time}}</text>
|
|
159
|
+
</view>
|
|
160
|
+
<view class="card-list__yue">
|
|
161
|
+
<text>余额:</text>
|
|
162
|
+
<text>{{item.card_point}} {{ item.unit }}</text>
|
|
163
|
+
</view>
|
|
164
|
+
<view class="card-list__other" v-if="item.other_card_point && item.card_point_type === 2">
|
|
165
|
+
<view><text>购买其他物品可抵:</text><text>{{item.other_card_point}} {{ item.unit }}</text></view>
|
|
166
|
+
</view>
|
|
167
|
+
<template v-if="tabIndex === 1">
|
|
168
|
+
<view class="card-list__entry" v-if="item.entries.length === 1">
|
|
169
|
+
<view
|
|
170
|
+
@click.stop="handleBindLogin(item,item['entries'][0])"
|
|
171
|
+
:style="{color: item['theme']['color']}"
|
|
172
|
+
>进入{{item['entries'][0]['entry_name']}}</view>
|
|
173
|
+
</view>
|
|
174
|
+
<view class="card-list__nodata" v-if="item.entries.length === 0">暂无支持服务列表</view>
|
|
175
|
+
<view class="card-list__entrys" v-if="item.entries.length > 1">
|
|
176
|
+
<view class="card-list__entrys-title">
|
|
177
|
+
<view>可兑换权益</view>
|
|
178
|
+
<view @click.stop="toDetail(item, false)">
|
|
179
|
+
<text>查看详情</text>
|
|
180
|
+
<xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
|
|
181
|
+
</view>
|
|
182
|
+
</view>
|
|
183
|
+
<view class="card-list__entrys-list">
|
|
184
|
+
<scroll-view scroll-x class="card-list__entrys-scroll">
|
|
185
|
+
<view class="card-list__entrys-item">
|
|
186
|
+
<view
|
|
187
|
+
v-for="(entry,idx) in item.entries"
|
|
188
|
+
:key="idx"
|
|
189
|
+
@click.stop="handleBindLogin(item, entry)"
|
|
190
|
+
>
|
|
191
|
+
<view><image :src="entry.image_url"></image></view>
|
|
192
|
+
<view>{{entry|cutstr}}</view>
|
|
193
|
+
<view>
|
|
194
|
+
<text>去兑换</text>
|
|
195
|
+
<xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
|
|
196
|
+
</view>
|
|
197
|
+
</view>
|
|
198
|
+
</view>
|
|
199
|
+
</scroll-view>
|
|
200
|
+
</view>
|
|
201
|
+
</view>
|
|
202
|
+
</template>
|
|
203
|
+
<view class="card-list__entry" v-else>
|
|
204
|
+
<view
|
|
205
|
+
@click.stop="handleBindLogin(item,item['entries'][0])"
|
|
206
|
+
:style="{color: item['theme']['color']}"
|
|
207
|
+
>票券转换</view>
|
|
208
|
+
</view>
|
|
209
|
+
</view>
|
|
210
|
+
</view>
|
|
211
|
+
<view
|
|
212
|
+
class="card-content-empty card-list"
|
|
213
|
+
v-else
|
|
214
|
+
:style="{
|
|
215
|
+
height: item.height + 'px',
|
|
216
|
+
}"
|
|
217
|
+
><image :src="item.entries.length > 1 ? cardItemBg2: cardItemBg1"></image></view>
|
|
218
|
+
</view>
|
|
219
|
+
<view v-else-if="cardList === null && cardList.length === 0">
|
|
220
|
+
<view class="jfb-base-card-entry__body-empty">
|
|
221
|
+
<view class="jfb-base-card-entry__body-empty-wrap">
|
|
222
|
+
<image :src="emptyBg"></image>
|
|
223
|
+
暂无票券
|
|
224
|
+
</view>
|
|
225
|
+
</view>
|
|
226
|
+
</view>
|
|
128
227
|
<view
|
|
129
|
-
v-
|
|
130
|
-
|
|
228
|
+
v-if="showDisabled==='Y'"
|
|
229
|
+
@click="handleToDisabled"
|
|
230
|
+
class="jfb-base-card-entry__body-disabled"
|
|
231
|
+
>已失效票券>>></view>
|
|
232
|
+
</view>
|
|
233
|
+
<view class="jfb-base-card-entry__body-dialog" v-if="dialogEvent">
|
|
234
|
+
<view class="jfb-base-card-entry__body-dialog-content">
|
|
235
|
+
<image
|
|
236
|
+
class="jfb-base-card-entry__body-dialog-content-img"
|
|
237
|
+
alt=""
|
|
238
|
+
:src="popup"
|
|
239
|
+
></image>
|
|
240
|
+
<xd-font-icon
|
|
241
|
+
icon="icondanchuangguanbi_xian"
|
|
242
|
+
width="52"
|
|
243
|
+
height="52"
|
|
244
|
+
size="26"
|
|
245
|
+
color="#fff"
|
|
246
|
+
class="jfb-base-card-entry-entry__body-dialog-content-close"
|
|
247
|
+
@click="dialogEvent = false"
|
|
248
|
+
></xd-font-icon>
|
|
249
|
+
</view>
|
|
250
|
+
</view>
|
|
251
|
+
<view class="computed-height" >
|
|
252
|
+
<view
|
|
253
|
+
v-for="(item,index) in cardComputedList"
|
|
254
|
+
:data-card="item.card_number"
|
|
255
|
+
class="card-list computed-box"
|
|
131
256
|
:key="item.card_number"
|
|
132
|
-
|
|
257
|
+
v-if="index < 20"
|
|
133
258
|
:style="{
|
|
134
259
|
background: item['theme']['color'],
|
|
135
260
|
backgroundSize: '100%'
|
|
@@ -205,40 +330,8 @@
|
|
|
205
330
|
</view>
|
|
206
331
|
</view>
|
|
207
332
|
</view>
|
|
208
|
-
</view>
|
|
209
|
-
<view v-else>
|
|
210
|
-
<view class="jfb-base-card-entry__body-empty">
|
|
211
|
-
<view class="jfb-base-card-entry__body-empty-wrap">
|
|
212
|
-
<image :src="emptyBg"></image>
|
|
213
|
-
暂无票券
|
|
214
|
-
</view>
|
|
215
|
-
</view>
|
|
216
|
-
</view>
|
|
217
|
-
<view
|
|
218
|
-
v-if="showDisabled==='Y'"
|
|
219
|
-
@click="handleToDisabled"
|
|
220
|
-
class="jfb-base-card-entry__body-disabled"
|
|
221
|
-
>已失效票券>>></view>
|
|
222
|
-
</view>
|
|
223
|
-
<view class="jfb-base-card-entry__body-dialog" v-if="dialogEvent">
|
|
224
|
-
<view class="jfb-base-card-entry__body-dialog-content">
|
|
225
|
-
<image
|
|
226
|
-
class="jfb-base-card-entry__body-dialog-content-img"
|
|
227
|
-
alt=""
|
|
228
|
-
:src="popup"
|
|
229
|
-
></image>
|
|
230
|
-
<xd-font-icon
|
|
231
|
-
icon="icondanchuangguanbi_xian"
|
|
232
|
-
width="52"
|
|
233
|
-
height="52"
|
|
234
|
-
size="26"
|
|
235
|
-
color="#fff"
|
|
236
|
-
class="jfb-base-card-entry-entry__body-dialog-content-close"
|
|
237
|
-
@click="dialogEvent = false"
|
|
238
|
-
></xd-font-icon>
|
|
239
|
-
</view>
|
|
240
|
-
</view>
|
|
241
333
|
</view>
|
|
334
|
+
</view>
|
|
242
335
|
</template>
|
|
243
336
|
|
|
244
337
|
<script>
|
|
@@ -250,6 +343,7 @@ import JfbBaseCardEntryMixin from "./JfbBaseCardEntryMixin";
|
|
|
250
343
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
251
344
|
import extsMixins from "@/mixins/extsMixins";
|
|
252
345
|
import colorCardMixins from "@/mixins/colorCardMixins";
|
|
346
|
+
import cardListMixins from "@/mixins/cardListMixins";
|
|
253
347
|
import { mapState, mapActions } from "vuex";
|
|
254
348
|
import { getContainerPropsValue, isWechat } from "@/utils/xd.base";
|
|
255
349
|
import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
|
|
@@ -264,15 +358,12 @@ export default {
|
|
|
264
358
|
XdNoticeBar,
|
|
265
359
|
XdCardV2
|
|
266
360
|
},
|
|
267
|
-
mixins: [componentsMixins, extsMixins, JfbBaseCardEntryMixin, colorCardMixins],
|
|
361
|
+
mixins: [componentsMixins, extsMixins, JfbBaseCardEntryMixin, colorCardMixins, cardListMixins],
|
|
268
362
|
computed: {
|
|
269
363
|
...mapState({
|
|
270
364
|
jwxSDK: (state) => state.jwxSDK,
|
|
271
365
|
jfbAuthorize: (state) => state.jfbAuthorize,
|
|
272
366
|
}),
|
|
273
|
-
showList(){
|
|
274
|
-
return this.tabIndex === 1 ? this.cardList: this.changeList
|
|
275
|
-
},
|
|
276
367
|
emptyBg() {
|
|
277
368
|
return this.getNoData();
|
|
278
369
|
},
|
|
@@ -286,6 +377,10 @@ export default {
|
|
|
286
377
|
watch: {
|
|
287
378
|
container(value) {
|
|
288
379
|
this.init(value)
|
|
380
|
+
},
|
|
381
|
+
tabIndex(){
|
|
382
|
+
this.clearDefault();
|
|
383
|
+
this.handleCardInit(this.ajaxCardList, this.tabIndex === 1);
|
|
289
384
|
}
|
|
290
385
|
},
|
|
291
386
|
data() {
|
|
@@ -300,11 +395,9 @@ export default {
|
|
|
300
395
|
cutIndex: 1,
|
|
301
396
|
tabIndex: 1,
|
|
302
397
|
isBack: null, //是否使用返回键
|
|
303
|
-
cardList: [],
|
|
304
|
-
changeList: [],
|
|
305
|
-
disableList: [],
|
|
306
398
|
inCallback: null, //内部跳转地址
|
|
307
399
|
|
|
400
|
+
|
|
308
401
|
//页面跳转地址
|
|
309
402
|
login_name:'',//登陆文案
|
|
310
403
|
changeUrl: "",
|
|
@@ -325,7 +418,6 @@ export default {
|
|
|
325
418
|
this.init(this.container);
|
|
326
419
|
this.noticeBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
327
420
|
this.isPreview = this.$configProject.isPreview;
|
|
328
|
-
|
|
329
421
|
|
|
330
422
|
//#ifdef H5
|
|
331
423
|
this.isWx = this.isPreview || isWechat();
|
|
@@ -345,7 +437,7 @@ export default {
|
|
|
345
437
|
|
|
346
438
|
},
|
|
347
439
|
methods: {
|
|
348
|
-
|
|
440
|
+
|
|
349
441
|
init(container){
|
|
350
442
|
//设置
|
|
351
443
|
this.cardLayout = getContainerPropsValue(container,"content.cardLayout","1");
|
|
@@ -357,7 +449,7 @@ export default {
|
|
|
357
449
|
//this.allEntryPath = getContainerPropsValue(container,"content.allEntryPath",{value: ""}).value;
|
|
358
450
|
this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
|
|
359
451
|
},
|
|
360
|
-
|
|
452
|
+
|
|
361
453
|
handleToLink(path) {
|
|
362
454
|
this.$xdUniHelper.navigateTo({
|
|
363
455
|
url: path,
|
|
@@ -443,7 +535,7 @@ export default {
|
|
|
443
535
|
if (item["is_valid"] !== "Y") {
|
|
444
536
|
return;
|
|
445
537
|
}
|
|
446
|
-
|
|
538
|
+
|
|
447
539
|
this.$xdShowLoading({});
|
|
448
540
|
jfbRootExec("loginEntryCardBind", {
|
|
449
541
|
vm: this,
|
|
@@ -462,7 +554,7 @@ export default {
|
|
|
462
554
|
if (this.$configProject.isPreview) {
|
|
463
555
|
console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
|
|
464
556
|
}
|
|
465
|
-
|
|
557
|
+
|
|
466
558
|
else {
|
|
467
559
|
this.handleToApp(entry);
|
|
468
560
|
}
|
|
@@ -471,7 +563,7 @@ export default {
|
|
|
471
563
|
this.$xdHideLoading();
|
|
472
564
|
});
|
|
473
565
|
}
|
|
474
|
-
|
|
566
|
+
|
|
475
567
|
//转换卡跳转
|
|
476
568
|
else {
|
|
477
569
|
this.$xdUniHelper.navigateTo({
|
|
@@ -493,7 +585,7 @@ export default {
|
|
|
493
585
|
}
|
|
494
586
|
const {dir, path, host} = item;
|
|
495
587
|
let nsp = Base64.encodeURI(JSON.stringify({business_code: entry['business_code']}));
|
|
496
|
-
|
|
588
|
+
|
|
497
589
|
//外站配置地址
|
|
498
590
|
if (entry.redirect_type === 'URL') {
|
|
499
591
|
if (item['path'].indexOf('?') === -1) {
|
|
@@ -502,13 +594,13 @@ export default {
|
|
|
502
594
|
this.toApp(redirectUrl);
|
|
503
595
|
return;
|
|
504
596
|
}
|
|
505
|
-
|
|
597
|
+
|
|
506
598
|
//站内转换
|
|
507
599
|
let jumpUrl = item.path;
|
|
508
600
|
//#ifdef H5
|
|
509
601
|
jumpUrl = `//${host}/${dir}${path}`;
|
|
510
602
|
//#endif
|
|
511
|
-
|
|
603
|
+
|
|
512
604
|
if (item['fixed_business_code'] === '') {
|
|
513
605
|
redirectUrl = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}`
|
|
514
606
|
}
|
|
@@ -517,7 +609,7 @@ export default {
|
|
|
517
609
|
}
|
|
518
610
|
this.toApp(redirectUrl);
|
|
519
611
|
},
|
|
520
|
-
|
|
612
|
+
|
|
521
613
|
toDetail(item, out=true) {
|
|
522
614
|
if(out) {
|
|
523
615
|
if(item.entries.length === 1) {
|
|
@@ -531,7 +623,7 @@ export default {
|
|
|
531
623
|
url: `${this.detailUrl}?card_number=${item["card_number"]}`,
|
|
532
624
|
}, false);
|
|
533
625
|
}
|
|
534
|
-
|
|
626
|
+
|
|
535
627
|
},
|
|
536
628
|
|
|
537
629
|
onJfbLoad(options) {
|
|
@@ -565,7 +657,7 @@ export default {
|
|
|
565
657
|
})
|
|
566
658
|
.then((res) => {
|
|
567
659
|
this.showDisabled = res.is_show_invalid_card_entrance;
|
|
568
|
-
res.list
|
|
660
|
+
res.list.map((item) => {
|
|
569
661
|
return {
|
|
570
662
|
...item,
|
|
571
663
|
card_point: this.$xdUniHelper.divisionFloatNumber(
|
|
@@ -578,15 +670,13 @@ export default {
|
|
|
578
670
|
),
|
|
579
671
|
};
|
|
580
672
|
});
|
|
581
|
-
|
|
582
|
-
this.
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
this.changeList = this.getCardGroupItem(this.cardList.filter((item) => {
|
|
673
|
+
this.ajaxCardList = res;
|
|
674
|
+
this.handleCardInit(this.ajaxCardList, this.tabIndex === 1);
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
this.hasChangeStatus = this.getCardGroupItem(this.ajaxCardList.list.filter((item) => {
|
|
587
678
|
return item["is_exchange"] === "Y";
|
|
588
|
-
}), res['site_entry_settings']);
|
|
589
|
-
|
|
679
|
+
}), res['site_entry_settings']).length > 0;
|
|
590
680
|
this.$xdHideLoading();
|
|
591
681
|
})
|
|
592
682
|
.catch(() => this.$xdHideLoading());
|
|
@@ -674,7 +764,7 @@ export default {
|
|
|
674
764
|
}
|
|
675
765
|
}
|
|
676
766
|
}
|
|
677
|
-
|
|
767
|
+
|
|
678
768
|
&-line {
|
|
679
769
|
height: 1px;
|
|
680
770
|
background: #eee;
|
|
@@ -686,7 +776,7 @@ export default {
|
|
|
686
776
|
display: flex;
|
|
687
777
|
align-items: center;
|
|
688
778
|
justify-content: space-between;
|
|
689
|
-
|
|
779
|
+
|
|
690
780
|
|
|
691
781
|
&-item {
|
|
692
782
|
border: unit(6, rpx) solid;
|
|
@@ -699,13 +789,13 @@ export default {
|
|
|
699
789
|
align-items: center;
|
|
700
790
|
justify-content: center;
|
|
701
791
|
box-sizing: border-box;
|
|
702
|
-
|
|
792
|
+
|
|
703
793
|
}
|
|
704
794
|
}
|
|
705
795
|
|
|
706
796
|
&-notice {
|
|
707
797
|
margin: unit(30, rpx) unit(-35, rpx) 0 unit(-35, rpx);
|
|
708
|
-
|
|
798
|
+
|
|
709
799
|
padding: unit(22, rpx) unit(35, rpx);
|
|
710
800
|
line-height: unit(70, rpx);
|
|
711
801
|
}
|
|
@@ -746,18 +836,18 @@ export default {
|
|
|
746
836
|
overflow: hidden;
|
|
747
837
|
border-radius: unit(16, rpx);
|
|
748
838
|
margin-bottom: unit(30, rpx);
|
|
749
|
-
|
|
839
|
+
|
|
750
840
|
&:last-child {
|
|
751
841
|
margin-bottom: 0;
|
|
752
842
|
}
|
|
753
|
-
|
|
754
|
-
|
|
843
|
+
|
|
844
|
+
|
|
755
845
|
&__title {
|
|
756
846
|
height: unit(56, rpx);
|
|
757
847
|
display: flex;
|
|
758
848
|
justify-content: flex-start;
|
|
759
849
|
align-items: center;
|
|
760
|
-
|
|
850
|
+
|
|
761
851
|
& > view {
|
|
762
852
|
padding: 0 unit(80, rpx);
|
|
763
853
|
font-size: unit(24, rpx);
|
|
@@ -766,23 +856,23 @@ export default {
|
|
|
766
856
|
color: #fff;
|
|
767
857
|
border-radius: 0 0 unit(16, rpx) 0;
|
|
768
858
|
}
|
|
769
|
-
|
|
859
|
+
|
|
770
860
|
}
|
|
771
|
-
|
|
861
|
+
|
|
772
862
|
&__content {
|
|
773
863
|
padding: unit(10, rpx) unit(40, rpx) 0;
|
|
774
864
|
height: unit(86, rpx);
|
|
775
865
|
display: flex;
|
|
776
866
|
justify-content: space-between;
|
|
777
867
|
align-items: center;
|
|
778
|
-
|
|
868
|
+
|
|
779
869
|
& > view:first-child {
|
|
780
870
|
font-size: unit(36, rpx);
|
|
781
871
|
line-height: unit(86, rpx);
|
|
782
872
|
color: #fff;
|
|
783
873
|
font-weight: 700;
|
|
784
874
|
}
|
|
785
|
-
|
|
875
|
+
|
|
786
876
|
& > view:nth-child(2) {
|
|
787
877
|
font-size: unit(24, rpx);
|
|
788
878
|
display: flex;
|
|
@@ -793,32 +883,32 @@ export default {
|
|
|
793
883
|
color: #fff;
|
|
794
884
|
}
|
|
795
885
|
}
|
|
796
|
-
|
|
886
|
+
|
|
797
887
|
&__date {
|
|
798
888
|
padding: 0 unit(40, rpx);
|
|
799
889
|
font-size: unit(28, rpx);
|
|
800
890
|
line-height: unit(32, rpx);
|
|
801
891
|
color: #fff;
|
|
802
892
|
}
|
|
803
|
-
|
|
893
|
+
|
|
804
894
|
&__yue {
|
|
805
895
|
padding: unit(10, rpx) unit(40, rpx) 0;
|
|
806
896
|
font-size: unit(28, rpx);
|
|
807
897
|
line-height: unit(32, rpx);
|
|
808
898
|
color: #fff;
|
|
809
|
-
|
|
899
|
+
|
|
810
900
|
& > text:nth-child(2) {
|
|
811
901
|
font-weight: 700;
|
|
812
902
|
}
|
|
813
903
|
}
|
|
814
|
-
|
|
904
|
+
|
|
815
905
|
&__other {
|
|
816
906
|
display: flex;
|
|
817
907
|
justify-content: flex-start;
|
|
818
908
|
align-items: center;
|
|
819
909
|
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
820
910
|
margin-top: unit(0, rpx);
|
|
821
|
-
|
|
911
|
+
|
|
822
912
|
& > view {
|
|
823
913
|
border-radius:unit(8, rpx);
|
|
824
914
|
background: rgba(255, 255, 255, 0.2);
|
|
@@ -832,17 +922,17 @@ export default {
|
|
|
832
922
|
padding: 0 unit(20, rpx);
|
|
833
923
|
color: #fff;
|
|
834
924
|
}
|
|
835
|
-
|
|
836
|
-
|
|
925
|
+
|
|
926
|
+
|
|
837
927
|
}
|
|
838
|
-
|
|
928
|
+
|
|
839
929
|
&__nodata {
|
|
840
930
|
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
841
931
|
margin-top: unit(0, rpx);
|
|
842
932
|
color: #fff;
|
|
843
933
|
font-size: unit(28, rpx);
|
|
844
934
|
}
|
|
845
|
-
|
|
935
|
+
|
|
846
936
|
&__entry {
|
|
847
937
|
padding: unit(20, rpx) unit(40, rpx) 0;
|
|
848
938
|
& > view {
|
|
@@ -855,26 +945,26 @@ export default {
|
|
|
855
945
|
font-weight: 500;
|
|
856
946
|
}
|
|
857
947
|
}
|
|
858
|
-
|
|
948
|
+
|
|
859
949
|
&__entrys {
|
|
860
950
|
margin: unit(20, rpx) unit(20, rpx) 0;
|
|
861
951
|
padding: unit(30, rpx);
|
|
862
952
|
border-radius: unit(16, rpx);
|
|
863
953
|
background: rgba(255, 255, 255, 1);
|
|
864
954
|
box-shadow: 0 unit(4, rpx) unit(8, rpx) rgba(156, 62, 0, 0.11);
|
|
865
|
-
|
|
955
|
+
|
|
866
956
|
&-title {
|
|
867
957
|
display: flex;
|
|
868
958
|
justify-content: space-between;
|
|
869
959
|
align-items: center;
|
|
870
|
-
|
|
871
|
-
|
|
960
|
+
|
|
961
|
+
|
|
872
962
|
& > view:first-child {
|
|
873
963
|
font-size: unit(28, rpx);
|
|
874
964
|
font-weight: 500;
|
|
875
965
|
flex: 1;
|
|
876
966
|
}
|
|
877
|
-
|
|
967
|
+
|
|
878
968
|
& > view:nth-child(2) {
|
|
879
969
|
display: flex;
|
|
880
970
|
justify-content: flex-start;
|
|
@@ -884,11 +974,11 @@ export default {
|
|
|
884
974
|
color: #999;
|
|
885
975
|
}
|
|
886
976
|
}
|
|
887
|
-
|
|
977
|
+
|
|
888
978
|
&-scroll {
|
|
889
|
-
|
|
979
|
+
|
|
890
980
|
}
|
|
891
|
-
|
|
981
|
+
|
|
892
982
|
&-item {
|
|
893
983
|
display: flex;
|
|
894
984
|
justify-content: flex-start;
|
|
@@ -896,7 +986,7 @@ export default {
|
|
|
896
986
|
flex-flow: nowrap;
|
|
897
987
|
margin-left: unit(-14, rpx);
|
|
898
988
|
padding-top: unit(20, rpx);
|
|
899
|
-
|
|
989
|
+
|
|
900
990
|
& > view {
|
|
901
991
|
width: unit(120, rpx);
|
|
902
992
|
margin-right: unit(10, rpx);
|
|
@@ -905,25 +995,25 @@ export default {
|
|
|
905
995
|
justify-content: center;
|
|
906
996
|
flex-direction: column;
|
|
907
997
|
align-items: center;
|
|
908
|
-
|
|
998
|
+
|
|
909
999
|
& > view:first-child {
|
|
910
1000
|
width: unit(76, rpx);
|
|
911
1001
|
height: unit(76, rpx);
|
|
912
1002
|
overflow: hidden;
|
|
913
|
-
|
|
1003
|
+
|
|
914
1004
|
& > image {
|
|
915
1005
|
height: 100%;
|
|
916
1006
|
width: 100%;
|
|
917
1007
|
}
|
|
918
1008
|
}
|
|
919
|
-
|
|
1009
|
+
|
|
920
1010
|
& > view:nth-child(2) {
|
|
921
1011
|
margin-top: unit(10, rpx);
|
|
922
1012
|
font-size: unit(24, rpx);
|
|
923
1013
|
line-height: unit(36, rpx);
|
|
924
1014
|
margin-bottom: unit(10, rpx);
|
|
925
1015
|
}
|
|
926
|
-
|
|
1016
|
+
|
|
927
1017
|
& > view:nth-child(3) {
|
|
928
1018
|
display: flex;
|
|
929
1019
|
justify-content: flex-start;
|
|
@@ -932,18 +1022,18 @@ export default {
|
|
|
932
1022
|
font-size: unit(20, rpx);
|
|
933
1023
|
color: #999;
|
|
934
1024
|
}
|
|
935
|
-
|
|
1025
|
+
|
|
936
1026
|
&:last-child {
|
|
937
1027
|
margin-right: 0;
|
|
938
1028
|
}
|
|
939
|
-
|
|
1029
|
+
|
|
940
1030
|
}
|
|
941
|
-
|
|
942
|
-
|
|
1031
|
+
|
|
1032
|
+
|
|
943
1033
|
}
|
|
944
1034
|
}
|
|
945
|
-
|
|
946
|
-
|
|
1035
|
+
|
|
1036
|
+
|
|
947
1037
|
&-warp {
|
|
948
1038
|
width: unit(700, rpx);
|
|
949
1039
|
min-height: unit(310, rpx);
|
|
@@ -953,4 +1043,22 @@ export default {
|
|
|
953
1043
|
padding-bottom: unit(20, rpx);
|
|
954
1044
|
}
|
|
955
1045
|
}
|
|
1046
|
+
|
|
1047
|
+
.computed-height {
|
|
1048
|
+
position: fixed;
|
|
1049
|
+
top:-999999px;
|
|
1050
|
+
width: 100%;
|
|
1051
|
+
z-index: 99999;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.card-content-empty {
|
|
1055
|
+
background-size: 100%;
|
|
1056
|
+
background-repeat: no-repeat;
|
|
1057
|
+
background-position: top center;
|
|
1058
|
+
|
|
1059
|
+
& > image {
|
|
1060
|
+
width: 100%;
|
|
1061
|
+
height: 100%;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
956
1064
|
</style>
|
|
@@ -201,7 +201,7 @@ export default {
|
|
|
201
201
|
})
|
|
202
202
|
.then((res) => {
|
|
203
203
|
this.$xdAlert({
|
|
204
|
-
content: "
|
|
204
|
+
content: "票券绑定成功",
|
|
205
205
|
close: () => {
|
|
206
206
|
this.$xdUniHelper.redirectTo({
|
|
207
207
|
url: this.backUrl,
|
|
@@ -289,9 +289,9 @@ export default {
|
|
|
289
289
|
}
|
|
290
290
|
});
|
|
291
291
|
if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
|
|
292
|
-
|
|
292
|
+
res.site_entry_settings = res.site_entry_settings.filter(item=>{
|
|
293
293
|
item['image_url'] = getServiceUrl(item['image_url'])
|
|
294
|
-
return item
|
|
294
|
+
return res.business_codes.includes(item.business_code)
|
|
295
295
|
})
|
|
296
296
|
}
|
|
297
297
|
|
|
@@ -326,9 +326,9 @@ export default {
|
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
328
|
if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
|
|
329
|
-
res.site_entry_settings = res.site_entry_settings.
|
|
329
|
+
res.site_entry_settings = res.site_entry_settings.filter(item=>{
|
|
330
330
|
item['image_url'] = getServiceUrl(item['image_url'])
|
|
331
|
-
return item
|
|
331
|
+
return res.business_codes.includes(item.business_code)
|
|
332
332
|
})
|
|
333
333
|
}
|
|
334
334
|
this.headerBg = this.getCardThemes(res.card_type_name);
|
|
@@ -619,7 +619,7 @@ export default {
|
|
|
619
619
|
|
|
620
620
|
&-warp {
|
|
621
621
|
width: unit(700, rpx);
|
|
622
|
-
min-height: unit(290, rpx);
|
|
622
|
+
// min-height: unit(290, rpx);
|
|
623
623
|
position: relative;
|
|
624
624
|
border-radius: unit(16, rpx);
|
|
625
625
|
background-size: 100%;
|
|
@@ -0,0 +1,148 @@
|
|
|
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(){
|
|
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 + 15;
|
|
83
|
+
card['top'] = this.cardNextTop;
|
|
84
|
+
this.cardNextTop = this.cardNextTop + card['height']
|
|
85
|
+
return card
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
this.cardList = this.cardList.concat(arr);
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
this.$xdHideLoading();
|
|
94
|
+
}).exec();
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
handleCardInit(cardList,isChange = false){
|
|
99
|
+
let newCardList = this.$xdUniHelper.cloneDeep(cardList);
|
|
100
|
+
let validCardList = this.getCardGroupItem(newCardList.list.filter((item) => {
|
|
101
|
+
if(isChange === true) return item["is_valid"] === "Y";
|
|
102
|
+
else return item["is_exchange"] === "Y";
|
|
103
|
+
}), newCardList['site_entry_settings']).map((item,index)=>{
|
|
104
|
+
item['index'] = index;
|
|
105
|
+
return item
|
|
106
|
+
});
|
|
107
|
+
this.cardOrgList = this.$xdUniHelper.cloneDeep(validCardList);
|
|
108
|
+
this.cardComputedList = this.cardOrgList.slice(this.cardPageNum,this.cardPageLen);
|
|
109
|
+
this.handleCardComputed().then().catch();
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
onJfbReachBottom(){
|
|
113
|
+
if(this.cardLoading || !this.hasContent) return;
|
|
114
|
+
this.cardLoading = true;
|
|
115
|
+
this.$xdShowLoading({});
|
|
116
|
+
this.cardPageNum++;
|
|
117
|
+
console.log('onJfbReachBottom',this.cardPageNum)
|
|
118
|
+
this.$nextTick(()=>{
|
|
119
|
+
setTimeout(()=>{
|
|
120
|
+
this.cardLoading = false;
|
|
121
|
+
this.$xdHideLoading();
|
|
122
|
+
this.cardComputedList = this.cardOrgList.slice(
|
|
123
|
+
this.cardPageNum*this.cardPageLen,
|
|
124
|
+
this.cardPageNum*this.cardPageLen + this.cardPageLen
|
|
125
|
+
);
|
|
126
|
+
this.handleCardComputed().then().catch();
|
|
127
|
+
if(this.cardComputedList.length < this.cardPageLen) {
|
|
128
|
+
this.hasContent = false;
|
|
129
|
+
}
|
|
130
|
+
},500)
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
clearDefault(){
|
|
136
|
+
this.cardOrgList = [];
|
|
137
|
+
this.cardList = [];
|
|
138
|
+
this.cardPageNum = 0;
|
|
139
|
+
this.cardComputedList = [];
|
|
140
|
+
this.cardLoading = false;
|
|
141
|
+
this.cardNextTop = 0;
|
|
142
|
+
this.contentStatus = false;
|
|
143
|
+
this.hasContent = true;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|