jufubao-base 1.0.402 → 1.0.403-beta3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.402",
3
+ "version": "1.0.403-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -145,10 +145,8 @@
145
145
  :key="index"
146
146
  @click="handleBindLogin(item)"
147
147
  class="jfb-base-card__body-card-item"
148
- :style="{
149
- backgroundColor:(item['is_login'] === 'Y'? mainBorderColor : '#fff'),
150
- border:`1px solid ${item['is_login'] === 'Y'? mainSubBorderColor:'#eeeeee'}`
151
- }"
148
+ :class="{error_status: item['card_status'] && item['card_status'] !== 'Y'}"
149
+ :style="[itemStyleCom(item)]"
152
150
  >
153
151
  <view class="jfb-base-card__body-card-item-left" v-if="showLoginBtn">
154
152
  <xd-font-icon
@@ -184,6 +182,7 @@
184
182
  :color="mainColor"
185
183
  ></xd-font-icon>
186
184
  <view class="card_name_text">{{ item.card_type_name }}</view>
185
+ <view class="card_status_error" v-if="item['card_status'] && item['card_status'] !== 'Y'">{{item.card_status_name}}</view>
187
186
  </view>
188
187
  <view>
189
188
  <view>{{ item.card_number }}{{showIndex?(':' + index):''}}</view>
@@ -352,6 +351,7 @@ export default {
352
351
  },
353
352
  data() {
354
353
  return {
354
+ closeMask:true,
355
355
  show_type: "normal", //normal正常票券;coupon 满减券
356
356
  options: {},
357
357
  inCallbackUrlOrg:'',//是否带有回调地址
@@ -446,6 +446,26 @@ export default {
446
446
 
447
447
  },
448
448
  methods: {
449
+ itemStyleCom(item){
450
+ let def = {
451
+ backgroundColor:(item['is_login'] === 'Y'? this.mainBorderColor : '#fff'),
452
+ border:`1px solid ${item['is_login'] === 'Y'? this.mainSubBorderColor:'#eeeeee'}`
453
+ };
454
+
455
+ //有票券状态节点
456
+ if(item.card_status){
457
+ if(item.card_status !== 'Y') return {
458
+ WebkitFilter: 'grayscale(100%)',
459
+ filter: 'grayscale(100%)',
460
+ cursor: 'not-allowed',
461
+ opacity: 0.5,
462
+ ...def,
463
+ }
464
+ else return def
465
+ }
466
+ //兼容老数据
467
+ return def
468
+ },
449
469
  init(container){
450
470
  //设置
451
471
  this.cardLayout = getContainerPropsValue(container,"content.cardLayout","1");
@@ -482,6 +502,8 @@ export default {
482
502
  },
483
503
 
484
504
  handleToLink(path) {
505
+ if (this.$configProject['isPreview']) return;
506
+
485
507
  path = this.getUrlCallback(path);
486
508
  this.$xdUniHelper.navigateTo({
487
509
  url: path,
@@ -518,6 +540,8 @@ export default {
518
540
  * @description 扫码绑定
519
541
  */
520
542
  handleScan() {
543
+ if (this.$configProject['isPreview']) return;
544
+
521
545
  try {
522
546
  //#ifdef H5
523
547
  if (this.jwxSDK !== null) {
@@ -558,6 +582,8 @@ export default {
558
582
  },
559
583
 
560
584
  handleToDisabled() {
585
+ if (this.$configProject['isPreview']) return;
586
+
561
587
  this.$xdUniHelper.navigateTo({
562
588
  url: `${this.disabledUrl}`,
563
589
  });
@@ -570,6 +596,12 @@ export default {
570
596
  handleBindLogin(item) {
571
597
  if(this.$configProject.isPreview) return;
572
598
  if(!this.showLoginBtn) return;
599
+
600
+ //已设置票券状态
601
+ if(item.card_status) {
602
+ if(item.card_status !== 'Y') return;
603
+ }
604
+
573
605
  //普通卡
574
606
  if (this.tabIndex === 1) {
575
607
  //无效卡
@@ -627,6 +659,14 @@ export default {
627
659
  },
628
660
 
629
661
  toDetail(item) {
662
+ if(this.$configProject.isPreview) return;
663
+
664
+ //已设置票券状态
665
+ if(item.card_status) {
666
+ if(item.card_status !== 'Y') return;
667
+ }
668
+
669
+
630
670
  this.$xdUniHelper.navigateTo(
631
671
  {
632
672
  url: `${this.detailUrl}?card_number=${item["card_number"]}`,
@@ -863,8 +903,6 @@ export default {
863
903
  }
864
904
  }
865
905
 
866
-
867
-
868
906
  &-dialog {
869
907
  position: fixed;
870
908
  top: 0;
@@ -1006,6 +1044,20 @@ export default {
1006
1044
  border-radius: unit(20, rpx);
1007
1045
  margin-bottom: unit(30, rpx);
1008
1046
  background: #fff;
1047
+ &.error_status {
1048
+ position: relative;
1049
+ overflow: hidden;
1050
+ &::after {
1051
+ content: "";
1052
+ position: absolute;
1053
+ opacity: 1;
1054
+ top: 0;
1055
+ left: 0;
1056
+ right: 0;
1057
+ bottom: 0;
1058
+ background-color: rgba(0,0,0,.2);
1059
+ }
1060
+ }
1009
1061
 
1010
1062
  &-left {
1011
1063
  width: unit(200, rpx);
@@ -1028,6 +1080,19 @@ export default {
1028
1080
  &-top {
1029
1081
  border-bottom: unit(2, rpx) solid #eeeeee;
1030
1082
  padding: unit(30, rpx) unit(20, rpx);
1083
+ position:relative;
1084
+
1085
+ .card_status_error {
1086
+ background: #888;
1087
+ border-radius: 0 0 0 8rpx;
1088
+ font-size: 28rpx;
1089
+ line-height: 64rpx;
1090
+ color: #fff;
1091
+ position: absolute;
1092
+ top: 0;
1093
+ right: 0;
1094
+ padding: 0 48rpx;
1095
+ }
1031
1096
 
1032
1097
  & > view:nth-child(1) {
1033
1098
  display: flex;