jufubao-base 1.0.61-beta5 → 1.0.61

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.
@@ -57,51 +57,29 @@
57
57
  </view>
58
58
 
59
59
  <view v-if="showInfo && info !== null">
60
- <view
61
- class="jfb-base-card-info-entry__body-header"
62
- :style="{
63
- background: headerBg.color,
64
- backgroundSize: '100%',
65
- }"
66
- >
67
- <view
68
- class="jfb-base-card-info-entry__body-header-wrap"
69
- :style="{
70
- backgroundImage: `url(${headerBg.image})`,
71
- }"
72
- >
73
- <view class="jfb-base-card-info-entry__body-header-item">
74
- <view>券名:</view>
75
- <view>{{ info.card_type_name }}</view>
60
+ <view class="card-list" :style="{
61
+ background: headerBg['color'],
62
+ backgroundSize: '100%'
63
+ }">
64
+ <view class="card-list-warp" :style="{backgroundImage: `url(${headerBg['image']})`}">
65
+ <view class="card-list__title"><view>{{info['card_type_name']}}</view></view>
66
+ <div class="card-list__content">
67
+ <view>
68
+ <text>券号:</text>
69
+ <text>{{info.card_number}}</text>
70
+ </view>
71
+ </div>
72
+ <view class="card-list__date">
73
+ <text>有效期:</text>
74
+ <text>{{info.end_time}}</text>
76
75
  </view>
77
- <view
78
- style="padding-bottom: 0px"
79
- class="jfb-base-card-info-entry__body-header-item"
80
- >
81
- <view>券号:</view>
82
- <view>{{ info.card_number }}</view>
76
+ <view class="card-list__yue">
77
+ <text>余额:</text>
78
+ <text>{{info.card_point}} {{ info.unit }}</text>
79
+ </view>
80
+ <view class="card-list__other" v-if="info.other_card_point && info.card_point_type === 2">
81
+ <view><text>购买其他物品可抵:</text><text>{{info.other_card_point}} {{ info.unit }}</text></view>
83
82
  </view>
84
- </view>
85
- </view>
86
- <view class="jfb-base-card-info-entry__body-content">
87
- <view
88
- :class="
89
- item.key === 'other_card_point'
90
- ? 'jfb-base-card-info-entry__body-content-special'
91
- : 'jfb-base-card-info-entry__body-content-item'
92
- "
93
- v-for="(item, index) in valueKey"
94
- :key="index"
95
- >
96
- <view> {{ item.label }}: </view>
97
- <view :style="{color:mainColor,fontWeight:500}" v-if="item.type === 'price'">
98
- {{ info[item.key] }}
99
- <text>{{info.unit}}</text>
100
- </view>
101
- <view style="color: #333; font-weight: 500" v-else>
102
- {{ info[item.key] }}
103
- <text v-if="item.type === 'type'">券</text>
104
- </view>
105
83
  </view>
106
84
  </view>
107
85
  <view
@@ -115,7 +93,7 @@
115
93
  style="
116
94
  display: flex;
117
95
  align-content: center;
118
- justify-content: center;
96
+ justify-content: flex-start;
119
97
  "
120
98
  >
121
99
  <view class="jfb-base-card-info-entry__body-business-content">
@@ -169,23 +147,6 @@ export default {
169
147
  data() {
170
148
  return {
171
149
  info: null,
172
- valueKey: [
173
- {
174
- label: "票券余额",
175
- key: "card_point",
176
- type: "price",
177
- },
178
- {
179
- label: "购买其他物品可抵",
180
- key: "other_card_point",
181
- type: "price",
182
- },
183
- {
184
- label: "有效期限",
185
- key: "end_time",
186
- type: "normal",
187
- },
188
- ],
189
150
  card_number: "", //卡号
190
151
  card_password: "", //卡密码
191
152
  isPassword: true,
@@ -240,7 +201,7 @@ export default {
240
201
  })
241
202
  .then((res) => {
242
203
  this.$xdAlert({
243
- content: "绑定成功",
204
+ content: "票券绑定成功",
244
205
  close: () => {
245
206
  this.$xdUniHelper.redirectTo({
246
207
  url: this.backUrl,
@@ -261,7 +222,7 @@ export default {
261
222
  .then((res) => {
262
223
  console.log(this.$xdAlert, "this.$xdAlertfsdfs");
263
224
  this.$xdAlert({
264
- content: "绑定成功",
225
+ content: "票券绑定成功",
265
226
  close: () => {
266
227
  this.$xdUniHelper.redirectTo({
267
228
  url: this.backUrl,
@@ -328,14 +289,12 @@ export default {
328
289
  }
329
290
  });
330
291
  if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
331
- res.site_entry_settings = res.site_entry_settings.map(item=>{
292
+ temp.site_entry_settings = res.site_entry_settings.filter(item=>{
332
293
  item['image_url'] = getServiceUrl(item['image_url'])
333
- return item
294
+ return res.business_codes.includes(item.business_code)
334
295
  })
335
296
  }
336
- if(res.other_card_point===0 || res.card_point_type === 1) {
337
- this.valueKey.splice(1,1);
338
- }
297
+
339
298
  this.headerBg = this.getCardThemes(res.card_type_name);
340
299
  this.showInfo = true;
341
300
  this.info = temp;
@@ -367,14 +326,11 @@ export default {
367
326
  }
368
327
  });
369
328
  if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
370
- res.site_entry_settings = res.site_entry_settings.map(item=>{
329
+ temp.site_entry_settings = res.site_entry_settings.filter(item=>{
371
330
  item['image_url'] = getServiceUrl(item['image_url'])
372
- return item
331
+ return res.business_codes.includes(item.business_code)
373
332
  })
374
333
  }
375
- if(res.other_card_point===0 || res.card_point_type === 1) {
376
- this.valueKey.splice(1,1);
377
- }
378
334
  this.headerBg = this.getCardThemes(res.card_type_name);
379
335
  this.showInfo = true;
380
336
  this.showForm = false;
@@ -460,65 +416,216 @@ export default {
460
416
  left: 50%;
461
417
  transform: translate(-50rpx, -50rpx);
462
418
  }
463
- &-header {
464
- border-radius: unit(16, rpx);
465
- font-size: unit(40, rpx);
419
+ .card-list {
420
+ overflow: hidden;
421
+ border-radius: unit(16, rpx);
422
+ margin-bottom: unit(30, rpx);
423
+
424
+ &:last-child {
425
+ margin-bottom: 0;
426
+ }
427
+
428
+
429
+ &__title {
430
+ height: unit(56, rpx);
431
+ display: flex;
432
+ justify-content: flex-start;
433
+ align-items: center;
434
+
435
+ & > view {
436
+ padding: 0 unit(80, rpx);
437
+ font-size: unit(24, rpx);
438
+ line-height: unit(56, rpx);
439
+ background: rgba(102, 102, 102, 0.4);
440
+ color: #fff;
441
+ border-radius: 0 0 unit(16, rpx) 0;
442
+ }
443
+
444
+ }
445
+
446
+ &__content {
447
+ padding: unit(10, rpx) unit(40, rpx) 0;
448
+ height: unit(86, rpx);
449
+ display: flex;
450
+ justify-content: space-between;
451
+ align-items: center;
452
+
453
+ & > view:first-child {
454
+ font-size: unit(36, rpx);
455
+ line-height: unit(86, rpx);
456
+ color: #fff;
466
457
  font-weight: 700;
458
+ }
459
+
460
+ & > view:nth-child(2) {
461
+ font-size: unit(24, rpx);
462
+ display: flex;
463
+ justify-content: space-between;
464
+ align-items: center;
465
+ flex-flow: wrap;
466
+ flex-direction: column;
467
467
  color: #fff;
468
- position: relative;
469
- min-height: unit(260,rpx);
470
-
471
- &-wrap {
472
- width: unit(700, rpx);
473
- border-radius: unit(16, rpx);
474
- background-size: 100%;
475
- min-height: unit(260,rpx);
476
- display: flex;
477
- flex-direction: column;
478
- justify-content: center;
468
+ }
469
+ }
470
+
471
+ &__date {
472
+ padding: 0 unit(40, rpx);
473
+ font-size: unit(28, rpx);
474
+ line-height: unit(32, rpx);
475
+ color: #fff;
476
+ }
477
+
478
+ &__yue {
479
+ padding: unit(10, rpx) unit(40, rpx) 0;
480
+ font-size: unit(28, rpx);
481
+ line-height: unit(32, rpx);
482
+ color: #fff;
483
+
484
+ & > text:nth-child(2) {
485
+ font-weight: 700;
486
+ }
487
+ }
488
+
489
+ &__other {
490
+ display: flex;
491
+ justify-content: flex-start;
492
+ align-items: center;
493
+ padding: unit(20, rpx) unit(40, rpx) 0;
494
+ margin-top: unit(0, rpx);
495
+
496
+ & > view {
497
+ border-radius:unit(8, rpx);
498
+ background: rgba(255, 255, 255, 0.2);
499
+ height: unit(48, rpx);
500
+ line-height: unit(48, rpx);
501
+ display: flex;
502
+ justify-content: flex-start;
503
+ align-items: center;
504
+ font-weight: 400;
505
+ font-size: unit(24, rpx);
506
+ padding: 0 unit(20, rpx);
507
+ color: #fff;
508
+ }
509
+
510
+
511
+ }
512
+
513
+ &__nodata {
514
+ padding: unit(20, rpx) unit(40, rpx) 0;
515
+ margin-top: unit(0, rpx);
516
+ color: #fff;
517
+ font-size: unit(28, rpx);
518
+ }
519
+
520
+ &__entry {
521
+ padding: unit(20, rpx) unit(40, rpx) 0;
522
+ & > view {
523
+ line-height: unit(64, rpx);
524
+ text-align: center;
525
+ font-size: unit(26, rpx);
526
+ border-radius: unit(32, rpx);
527
+ background: rgba(255, 255, 255, 1);
528
+ box-shadow: 0 unit(4, rpx) unit(8, rpx) rgba(156, 62, 0, 0.11);
529
+ font-weight: 500;
530
+ }
531
+ }
532
+
533
+ &__entrys {
534
+ margin: unit(20, rpx) unit(20, rpx) 0;
535
+ padding: unit(30, rpx);
536
+ border-radius: unit(16, rpx);
537
+ background: rgba(255, 255, 255, 1);
538
+ box-shadow: 0 unit(4, rpx) unit(8, rpx) rgba(156, 62, 0, 0.11);
539
+
540
+ &-title {
541
+ display: flex;
542
+ justify-content: space-between;
543
+ align-items: center;
544
+
545
+
546
+ & > view:first-child {
547
+ font-size: unit(28, rpx);
548
+ font-weight: 500;
549
+ flex: 1;
479
550
  }
480
-
481
- &-item {
551
+
552
+ & > view:nth-child(2) {
482
553
  display: flex;
483
554
  justify-content: flex-start;
484
- align-content: center;
485
- padding-bottom: unit(32, rpx);
486
- padding-left: unit(40,rpx);
487
-
488
- & > view:first-child {
489
- flex-basis: unit(120,rpx);
490
- flex-shrink: 0;
491
- }
555
+ align-items: center;
556
+ flex-shrink: 0;
557
+ font-size: unit(20, rpx);
558
+ color: #999;
492
559
  }
493
560
  }
494
-
495
- &-content {
496
- background: #fff;
497
- border-radius: unit(16, rpx);
498
- padding: unit(38, rpx) 0;
499
- margin-top: unit(24, rpx);
500
-
501
- &-item {
502
- display: flex;
503
- color: #666;
504
- justify-content: space-between;
505
- align-content: center;
506
- font-size: unit(28, rpx);
507
- padding: unit(16, rpx) unit(48, rpx);
508
- }
509
-
510
- &-special {
561
+
562
+ &-scroll {
563
+
564
+ }
565
+
566
+ &-item {
567
+ display: flex;
568
+ justify-content: flex-start;
569
+ align-items: center;
570
+ flex-flow: nowrap;
571
+ margin-left: unit(-14, rpx);
572
+ padding-top: unit(20, rpx);
573
+
574
+ & > view {
575
+ width: unit(120, rpx);
576
+ margin-right: unit(10, rpx);
577
+ flex-shrink: 0;
511
578
  display: flex;
512
- color: #666;
513
- justify-content: space-between;
514
- font-size: unit(24, rpx);
515
- padding: unit(18, rpx) unit(24, rpx);
516
- margin: 0 unit(24, rpx);
517
- border-radius: unit(16, rpx);
518
- background: #f9f9f9;
519
- align-content: center;
579
+ justify-content: center;
580
+ flex-direction: column;
581
+ align-items: center;
582
+
583
+ & > view:first-child {
584
+ width: unit(76, rpx);
585
+ height: unit(76, rpx);
586
+ overflow: hidden;
587
+
588
+ & > image {
589
+ height: 100%;
590
+ width: 100%;
591
+ }
592
+ }
593
+
594
+ & > view:nth-child(2) {
595
+ margin-top: unit(10, rpx);
596
+ font-size: unit(24, rpx);
597
+ line-height: unit(36, rpx);
598
+ margin-bottom: unit(10, rpx);
599
+ }
600
+
601
+ & > view:nth-child(3) {
602
+ display: flex;
603
+ justify-content: flex-start;
604
+ align-items: center;
605
+ flex-shrink: 0;
606
+ font-size: unit(20, rpx);
607
+ color: #999;
608
+ }
609
+
610
+ &:last-child {
611
+ margin-right: 0;
612
+ }
613
+
520
614
  }
615
+
616
+
521
617
  }
618
+ }
619
+
620
+ &-warp {
621
+ width: unit(700, rpx);
622
+ // min-height: unit(290, rpx);
623
+ position: relative;
624
+ border-radius: unit(16, rpx);
625
+ background-size: 100%;
626
+ padding-bottom: unit(20, rpx);
627
+ }
628
+ }
522
629
 
523
630
  &-qrcode {
524
631
  text-align: center;
@@ -264,7 +264,7 @@ export default {
264
264
  title: "是否确认合并票券",
265
265
  isHtml: true,
266
266
  $vm: this,
267
- content: `<div class="label-value"><div><span>转出卡号:</span><span>${outHtml}</span></div><div><span>转入卡号:</span><span>${inHtml}</span></div></div>`,
267
+ content: `<div class="label-value"><div><span>转出票券:</span><span>${outHtml}</span></div><div><span>转入票券:</span><span>${inHtml}</span></div></div>`,
268
268
  success: (action) => {
269
269
  let params = {
270
270
  from_card_number: this.fromSelect.value,
@@ -277,12 +277,12 @@ export default {
277
277
  if(this.$configProject.isPreview) return;
278
278
  jfbRootExec("mergeCardEntry", { vm: this,data: params})
279
279
  .then((res) => {
280
- this.$xdAlert({content: '合卡成功!'});
280
+ this.$xdAlert({content: '合卡成功!', time: 1000});
281
281
  setTimeout(()=>{
282
282
  this.$xdUniHelper.navigateTo({
283
283
  url: this.cardPath
284
284
  })
285
- }, 1500);
285
+ }, 2000);
286
286
  })
287
287
  .catch((err) => {
288
288
  this.$xdLog.catch(err)