jufubao-base 1.0.173 → 1.0.174-beta2

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.173",
3
+ "version": "1.0.174-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -16,6 +16,44 @@ export default {
16
16
  { label: '账号登录页', value: 'account' },
17
17
  ],
18
18
  },
19
+ {
20
+ label: "logo配置:",
21
+ ele: "title",
22
+ groupKey: "content",
23
+ size: "small"
24
+ },
25
+ {
26
+ label: "是否展示logo:",
27
+ ele: "xd-radio",
28
+ valueKey: "showLogo",
29
+ value: data.showLogo || "Y",
30
+ groupKey: "content",
31
+ list: [
32
+ { label: '展示', value: "Y" },
33
+ { label: '隐藏', value: "N" },
34
+ ],
35
+ },
36
+ {
37
+ label: '自定义Logo:',
38
+ ele: "xd-upload",
39
+ valueKey: 'customLogoUrl',
40
+ groupKey:'content',
41
+ value: data.customLogoUrl || {},
42
+ defaultValue: data.customLogoUrl || null,
43
+ slot: true,
44
+ oneWidth: 100,
45
+ oneHeight: 100,
46
+ elinputClassName: 'input40',
47
+ tipsformet: '上传格式:@imageType@不超过@size@MB.建议比例1:1',
48
+ type: ['jpg', 'png', 'jpeg'],
49
+ styleType: 'one',
50
+ uploadType: 'aliyun',
51
+ size: 5,
52
+ action: 'action',
53
+ sort: true,
54
+ maxlen: 100,
55
+ hidden: data.showLogo !== "Y",
56
+ },
19
57
  {
20
58
  ele: 'title',
21
59
  label: '按钮内容配置',
@@ -597,7 +635,7 @@ export default {
597
635
  label: 'logo样式配置',
598
636
  size: 'small',
599
637
  groupKey: 'style',
600
- hidden: data.previewCurrent !== "auth",
638
+ hidden: data.showLogo !== "Y",
601
639
  },
602
640
  {
603
641
  label: "logo区域高度:",
@@ -608,7 +646,7 @@ export default {
608
646
  groupKey:'style',
609
647
  placeholder: "请输入logo区域高度",
610
648
  className: 'input60',
611
- hidden: data.previewCurrent !== "auth",
649
+ hidden: data.showLogo !== "Y",
612
650
  },
613
651
  {
614
652
  label: "logo图片高度:",
@@ -619,7 +657,7 @@ export default {
619
657
  groupKey:'style',
620
658
  placeholder: "请输入logo图片高度",
621
659
  className: 'input60',
622
- hidden: data.previewCurrent !== "auth",
660
+ hidden: data.showLogo !== "Y",
623
661
  },
624
662
  {
625
663
  label: 'logo圆角设置:',
@@ -639,7 +677,7 @@ export default {
639
677
  console.error(error);
640
678
  });
641
679
  },
642
- hidden: data.previewCurrent !== "auth",
680
+ hidden: data.showLogo !== "Y",
643
681
  },
644
682
  {
645
683
  ele: "title",
@@ -648,6 +686,24 @@ export default {
648
686
  groupKey: "style",
649
687
  hidden: data.previewCurrent !== "account",
650
688
  },
689
+ {
690
+ label: '登录方式菜单外边距:',
691
+ ele: "xd-margin-padding",
692
+ valueKey: 'loginMenuMargin',
693
+ value: data.loginMenuMargin || {
694
+ top: 40,
695
+ right: 70,
696
+ bottom: 40,
697
+ left: 70
698
+ },
699
+ setting: {
700
+ type: 'margin',
701
+ },
702
+ placeholder: '请设置边距',
703
+ inline: false,
704
+ notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
705
+ hidden: data.previewCurrent !== "account",
706
+ },
651
707
  {
652
708
  label: "输入框样式:",
653
709
  ele: 'xd-radio',
@@ -19,13 +19,15 @@
19
19
  <view class="jfb-base-login__body" :style="{
20
20
  '--agreement-align': agreementAlign
21
21
  }">
22
+
23
+ <view v-if="showLogo === 'Y'" class="logo-wrap" :style="{
24
+ height: logoWrapHeight + 'rpx',
25
+ }">
26
+ <image :style="logoStyle" mode="heightFix" :src="logo" @click="openDebugger()" />
27
+ <view v-if="isShowSiteName === 'Y'" :style="{ color: logoTextColor, }" >{{ partnerName }}</view>
28
+ </view>
29
+
22
30
  <view v-if="showStep === 1" class="panel-login-auth">
23
- <view class="logo-wrap" :style="{
24
- height: logoWrapHeight + 'rpx',
25
- }">
26
- <image :style="logoStyle" mode="heightFix" :src="logo" @click="openDebugger()" />
27
- <view v-if="isShowSiteName === 'Y'" :style="{ color: logoTextColor, }" >{{ partnerName }}</view>
28
- </view>
29
31
  <view class="login_types" :style="authBtnBoxStyle">
30
32
  <!--#ifdef H5-->
31
33
  <xd-button
@@ -100,7 +102,7 @@
100
102
  </view>
101
103
  </view>
102
104
  <view v-if="showStep === 2" class="panel-login-password">
103
- <view class="phone-login-type">
105
+ <view class="phone-login-type" :style="accountLoginTypeBoxStyle">
104
106
  <view
105
107
  v-if="phoneLogin"
106
108
  class="_item"
@@ -116,7 +118,7 @@
116
118
  >密码登录<text :style="{ background: mainColor }"></text
117
119
  ></view>
118
120
  </view>
119
- <view style="margin-top: 40rpx" :style="loginFormStyle">
121
+ <view :style="loginFormStyle">
120
122
  <xd-form
121
123
  :label-align="labelAlign"
122
124
  :labelPosition="labelPosition"
@@ -434,6 +436,9 @@ export default {
434
436
  }, //条款内边距
435
437
  authAgreePadding: {}, //授权登录条款内边距
436
438
  authBtnPadding: {}, //授权登录按钮内边距
439
+ showLogo: "Y", //是否显示logo
440
+ customLogoUrl: {}, //自定义logo地址
441
+ loginMenuMargin: {},
437
442
  };
438
443
  },
439
444
  computed: {
@@ -493,9 +498,18 @@ export default {
493
498
  },
494
499
  btnWrapStyle(){
495
500
  let padding = `${this.checkValue(this.btnMargin.top, 20)}rpx`;
496
- padding = `${padding} ${this.checkValue(this.btnMargin.right, 40)}rpx`;
501
+ padding = `${padding} ${this.checkValue(this.btnMargin.right, 20)}rpx`;
497
502
  padding = `${padding} ${this.checkValue(this.btnMargin.bottom, 20)}rpx`;
498
- padding = `${padding} ${this.checkValue(this.btnMargin.left, 40)}rpx`;
503
+ padding = `${padding} ${this.checkValue(this.btnMargin.left, 20)}rpx`;
504
+ return this.styleObjectToString({
505
+ padding: padding,
506
+ })
507
+ },
508
+ accountLoginTypeBoxStyle(){
509
+ let padding = `${this.checkValue(this.loginMenuMargin.top, 20)}rpx`;
510
+ padding = `${padding} ${this.checkValue(this.loginMenuMargin.right, 20)}rpx`;
511
+ padding = `${padding} ${this.checkValue(this.loginMenuMargin.bottom, 20)}rpx`;
512
+ padding = `${padding} ${this.checkValue(this.loginMenuMargin.left, 20)}rpx`;
499
513
  return this.styleObjectToString({
500
514
  padding: padding,
501
515
  })
@@ -621,7 +635,7 @@ export default {
621
635
  name = this["siteInfo"]["mapping"]["site_name"];
622
636
  if (this.projectAttr["site_logo"])
623
637
  logo = getServiceUrl(this.projectAttr["site_logo"], "size3");
624
- this.logo = logo || "//dummyimage.com/100x100";
638
+
625
639
  this.partnerName = name || "聚福宝福利";
626
640
  this.logoTextColor = getContainerPropsValue(value, "content.logoTextColor", "#333");
627
641
  this.callback_url = getContainerPropsValue(value, "content.callback_url", {value: ''}).value;
@@ -668,6 +682,15 @@ export default {
668
682
  this.contentFont = getContainerPropsValue(value, "content.contentFont", {});
669
683
  this.placeholderFont = getContainerPropsValue(value, "content.placeholderFont", {});
670
684
  this.getCodeFont = getContainerPropsValue(value, "content.getCodeFont", {});
685
+ this.showLogo = getContainerPropsValue(value, "content.showLogo", 'Y');
686
+ this.customLogoUrl = getContainerPropsValue(value, "content.customLogoUrl", {});
687
+ this.loginMenuMargin = getContainerPropsValue(value, "content.loginMenuMargin", {});
688
+
689
+ if(this.customLogoUrl && this.customLogoUrl.path){
690
+ logo = this.customLogoUrl.path;
691
+ }
692
+ this.logo = logo || "//dummyimage.com/100x100";
693
+
671
694
  let agreeFont = getContainerPropsValue(value, "content.agreeFont", {});
672
695
  if(!agreeFont.color) {
673
696
  agreeFont.color = '#666'
@@ -680,7 +703,7 @@ export default {
680
703
  this.privacyFont = privacyFont;
681
704
 
682
705
  this.agreementAlign = getContainerPropsValue(value, "content.agreementAlign", 'center');
683
- console.log(this.agreePadding, 'this.agreePadding');
706
+ console.log(this.customLogoUrl, 'this.customLogoUrl');
684
707
  if(this.inputStyle === 'face'){
685
708
  this.labelPosition = 'top';
686
709
  this.labelAlign = 'left';
@@ -1100,9 +1123,10 @@ export default {
1100
1123
  .form-group {
1101
1124
  padding: 40rpx 70rpx;
1102
1125
  }
1126
+ // #ifdef H5
1103
1127
  .form-item {
1104
1128
  ::v-deep &.uni-forms-item {
1105
- padding-left: unit(30rpx) !important;
1129
+ // padding-left: unit(30,rpx) !important;
1106
1130
  .uni-input-input{
1107
1131
  font-size: var(--content-font-size);
1108
1132
  color: var(--content-font-color);
@@ -1136,6 +1160,46 @@ export default {
1136
1160
 
1137
1161
  }
1138
1162
  }
1163
+ // #endif
1164
+
1165
+ // #ifdef MP
1166
+ ::v-deep .uni-forms-item {
1167
+ // padding-left: 30rpx !important;
1168
+ .uni-input-input{
1169
+ font-size: var(--content-font-size);
1170
+ color: var(--content-font-color);
1171
+ font-weight: var(--content-font-weight);
1172
+ }
1173
+ .label-text {
1174
+ font-size: var(--label-font-size);
1175
+ color: var(--label-font-color);
1176
+ font-weight: var(--label-font-weight);
1177
+ }
1178
+ .uni-easyinput__placeholder-class{
1179
+ font-size: var(--placeholder-font-size);
1180
+ color: var(--placeholder-font-color);
1181
+ font-weight: var(--placeholder-font-weight);
1182
+ }
1183
+ }
1184
+ .linear{
1185
+ ::v-deep .uni-forms-item--border{
1186
+ border-color: var(--form-border-color) !important;
1187
+ border-width: var(--form-border-width) !important;
1188
+ }
1189
+ }
1190
+ .face{
1191
+ ::v-deep .uni-forms-item__content{
1192
+ background: #F7F7F7;
1193
+ border-radius: 16rpx;
1194
+ }
1195
+ ::v-deep .uni-forms-item--border{
1196
+ border: none;
1197
+ }
1198
+ }
1199
+ // #endif
1200
+
1201
+
1202
+
1139
1203
  .get_code {
1140
1204
  color: @xd-base-color;
1141
1205
  font-size: 24rpx;
@@ -1143,6 +1207,22 @@ export default {
1143
1207
  padding: 10rpx 24rpx;
1144
1208
  border: 1px solid @xd-base-color;
1145
1209
  border-radius: 40rpx;
1210
+ white-space: nowrap;
1211
+ }
1212
+ .logo-wrap {
1213
+ display: flex;
1214
+ align-items: center;
1215
+ justify-content: center;
1216
+ flex-direction: column;
1217
+ image {
1218
+ width: 180rpx;
1219
+ height: 180rpx;
1220
+ margin-bottom: unit(12,rpx);
1221
+ }
1222
+ & > view {
1223
+ font-size: unit(36,rpx);
1224
+ font-weight: 600;
1225
+ }
1146
1226
  }
1147
1227
  .panel-login-auth {
1148
1228
  ::v-deep .uni-forms-item__label {
@@ -1151,21 +1231,7 @@ export default {
1151
1231
  color: #a6a6a6;
1152
1232
  }
1153
1233
  }
1154
- .logo-wrap {
1155
- display: flex;
1156
- align-items: center;
1157
- justify-content: center;
1158
- flex-direction: column;
1159
- image {
1160
- width: 180rpx;
1161
- height: 180rpx;
1162
- margin-bottom: unit(12,rpx);
1163
- }
1164
- view {
1165
- font-size: unit(36,rpx);
1166
- font-weight: 600;
1167
- }
1168
- }
1234
+
1169
1235
  .login_types {
1170
1236
  padding: 10rpx 50rpx;
1171
1237
 
@@ -442,6 +442,9 @@
442
442
  @import "./JfbBaseNoticeLess.less";
443
443
 
444
444
  .jfb-base-notice {
445
+ position: relative;
446
+ z-index: 100;
447
+
445
448
  &__body{
446
449
  .content-list {
447
450
  display: flex;
@@ -38,11 +38,11 @@
38
38
  <view class="menu_list">
39
39
  <view class="menu_item" @click="switchShowType('ticket')">
40
40
  <view class="menu_inner" :class="menuShowType"
41
- :style="[menuType == 'ticket' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">实体券</view>
41
+ :style="menuType == 'ticket' ? menuItemActiveStyle : menuItemStyle">实体券</view>
42
42
  </view>
43
43
  <view class="menu_item" @click="switchShowType('code')">
44
44
  <view class="menu_inner" :class="menuShowType"
45
- :style="[menuType == 'code' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">电子码</view>
45
+ :style="menuType == 'code' ? menuItemActiveStyle : menuItemStyle">电子码</view>
46
46
  </view>
47
47
  </view>
48
48
  </view>
@@ -67,6 +67,7 @@
67
67
  <xd-form-input
68
68
  v-model="form.card_number"
69
69
  placeholder="请输入票券号"
70
+ style="width: 100%;"
70
71
  />
71
72
  <view @click="doScanCode">
72
73
  <xd-font-icon :icon="scanIcon.icon || 'iconsaoma'"
@@ -102,8 +103,9 @@
102
103
  <xd-form-input
103
104
  v-model="form.valid_code"
104
105
  placeholder="请输入验证码"
106
+ style="width: 100%;"
105
107
  />
106
- <view class="form_valid_code">
108
+ <view class="form_valid_code" @click="switchValidToken">
107
109
  <image
108
110
  style="width: 100%;height:100%"
109
111
  :src="validImageAPIUrl + '?image_width=160&image_height=50&token='+ valid_token"
@@ -178,6 +180,9 @@
178
180
  import extsMixins from "@/mixins/extsMixins";
179
181
  import { mapState } from "vuex";
180
182
  export default {
183
+ // #ifdef MP-WEIXIN
184
+ options: { styleIsolation: 'shared' },
185
+ // #endif
181
186
  name: "JfbBaseTfkCardBind",
182
187
  components: {
183
188
  XdFontIcon,
@@ -332,14 +337,12 @@
332
337
  fontSize: '24rpx',
333
338
  })
334
339
  },
335
- menuItemBoxStyle(){
340
+ menuItemBoxPadding(){
336
341
  let padding = `${this.checkValue(this.menuBtnPadding.top, 20)}rpx`;
337
342
  padding = `${padding} ${this.checkValue(this.menuBtnPadding.right, 20)}rpx`;
338
343
  padding = `${padding} ${this.checkValue(this.menuBtnPadding.bottom, 20)}rpx`;
339
344
  padding = `${padding} ${this.checkValue(this.menuBtnPadding.left, 20)}rpx`;
340
- return this.styleObjectToString({
341
- padding
342
- })
345
+ return padding;
343
346
  },
344
347
  menuItemStyle(){
345
348
  let styleObj = {
@@ -347,6 +350,7 @@
347
350
  background: this.menuTabColor['bgColor'] || '#fff',
348
351
  fontSize: this.menuTabColor['fontSize'] || '30rpx',
349
352
  fontWeight: this.menuTabColor['fontWeight'] || 'normal',
353
+ padding: this.menuItemBoxPadding,
350
354
  }
351
355
 
352
356
  return this.styleObjectToString(styleObj)
@@ -358,6 +362,7 @@
358
362
  background: this.menuTabColor['actBgColor'] || '#fff',
359
363
  fontSize: this.menuTabColor['actFontSize'] || '30rpx',
360
364
  fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
365
+ padding: this.menuItemBoxPadding,
361
366
  }
362
367
  if(this.menuShowType === 'text'){
363
368
  styleActiveObj['borderBottom'] = `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`;
@@ -461,7 +466,7 @@
461
466
  }
462
467
  },
463
468
  toShowCouponDialog(){
464
- if(this.info){
469
+ if(this.form.card_number){
465
470
  jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.form.card_number})
466
471
  }
467
472
  },
@@ -478,6 +483,7 @@
478
483
  let path = this.getUrlCallback(this.my_card_url || this.backUrl);
479
484
  //有优惠券处理
480
485
  if(this.hasCon){
486
+ console.warn("绑定成功有优惠券处理");
481
487
  this.toShowCouponDialog();
482
488
  this.$bus.$on("onCloseConDialog",(container_id) => {
483
489
  if(container_id === this.hasCon){
@@ -526,18 +532,24 @@
526
532
  title: '请输入验证码',
527
533
  icon: "none"
528
534
  })
529
- await this.checkValidToken();
535
+ this.$xdShowLoading({});
530
536
 
531
- jfbRootExec("pwdCardBind", {
532
- vm: this,
533
- data: {
534
- card_password: card_password,
535
- card_number: card_number + "",
536
- is_show_pop: "Y"
537
- }
538
- }).then(res => {
539
- this.handlerAfterBindCard(res);
537
+ this.checkValidToken().then(() => {
538
+ jfbRootExec("pwdCardBind", {
539
+ vm: this,
540
+ data: {
541
+ card_password: card_password,
542
+ card_number: card_number + "",
543
+ is_show_pop: "Y"
544
+ }
545
+ }).then(res => {
546
+ this.$xdHideLoading();
547
+ this.handlerAfterBindCard(res);
548
+ })
549
+ }).catch(err => {
550
+ this.$xdHideLoading();
540
551
  })
552
+
541
553
  },
542
554
  //绑定电子码票券
543
555
  toBindCardDigital(){
@@ -671,6 +683,7 @@
671
683
 
672
684
  .jfb-base-tfk-card-bind {
673
685
  &__body{
686
+ // #ifdef H5
674
687
  .form-item {
675
688
  ::v-deep &.uni-forms-item {
676
689
  .is-required{
@@ -697,8 +710,6 @@
697
710
  }
698
711
  &.linear{
699
712
  ::v-deep &.uni-forms-item--border{
700
- // border-color: var(--form-border-color) !important;
701
- // border-width: var(--form-border-width) !important;
702
713
  border-top: none !important;
703
714
  border-bottom: var(--form-border-width) solid var(--form-border-color) !important;
704
715
  }
@@ -742,13 +753,83 @@
742
753
  ::v-deep .label-icon{
743
754
  font-size: var(--digital-icon-size) !important;
744
755
  }
745
- ::v-deep .uni-forms-item__inner{
746
- // padding-bottom: 0% !important;
747
- // border: 1px solid var(--digital-border-color);
748
- // border-radius: var(--digital-border-radius);
756
+ }
757
+ }
758
+ // #endif
759
+
760
+ // #ifdef MP
761
+ ::v-deep .uni-forms-item {
762
+ .is-required{
763
+ display: none;
764
+ }
765
+ .uni-input-input{
766
+ font-size: var(--content-font-size);
767
+ color: var(--content-font-color);
768
+ font-weight: var(--content-font-weight);
769
+ }
770
+ .label-text {
771
+ font-size: var(--label-font-size);
772
+ color: var(--label-font-color);
773
+ font-weight: var(--label-font-weight);
774
+ }
775
+ .uni-easyinput__placeholder-class{
776
+ font-size: var(--placeholder-font-size);
777
+ color: var(--placeholder-font-color);
778
+ font-weight: var(--placeholder-font-weight);
779
+ }
780
+ }
781
+ ::v-deep .uni-forms-item--border{
782
+ padding: var(--form-input-padding) 0;
783
+ }
784
+ .linear{
785
+ ::v-deep .uni-forms-item--border{
786
+ border-top: none !important;
787
+ border-bottom: var(--form-border-width) solid var(--form-border-color) !important;
788
+ }
789
+ }
790
+ .face{
791
+ ::v-deep .uni-forms-item__box{
792
+ background: #F7F7F7;
793
+ border-radius: var(--form-border-radius);
794
+ padding-right: 20rpx;
795
+ }
796
+ ::v-deep .uni-forms-item--border{
797
+ border: none;
798
+ }
799
+ }
800
+ .ticket_item{
801
+ ::v-deep .label-icon{
802
+ font-size: var(--ticket-icon-size) !important;
803
+ }
804
+ }
805
+ .password_item{
806
+ ::v-deep .label-icon{
807
+ font-size: var(--password-icon-size) !important;
808
+ }
809
+ }
810
+ .valid_item{
811
+ ::v-deep .label-icon{
812
+ font-size: var(--valid-icon-size) !important;
813
+ }
814
+ }
815
+ .digital_item{
816
+ &.linear{
817
+ ::v-deep .uni-forms-item--border{
818
+ border-color: var(--digital-border-color) !important;
819
+ }
820
+ }
821
+ &.face{
822
+ ::v-deep .uni-forms-item__box{
823
+ border-radius: var(--digital-border-radius);
749
824
  }
750
825
  }
826
+ ::v-deep .label-icon{
827
+ font-size: var(--digital-icon-size) !important;
828
+ }
751
829
  }
830
+ // #endif
831
+
832
+
752
833
  .menu_wrap{
753
834
  .menu_list{
754
835
  display: flex;
@@ -52,230 +52,6 @@ export default {
52
52
  maxlen: 100,
53
53
  hidden: data.previewCurrent !== 'main'
54
54
  },
55
- {
56
- label: "票券使用规则",
57
- ele: 'xd-site-news',
58
- valueKey: 'cardRule',
59
- groupKey:'content',
60
- value: data.cardRule || null,
61
- className: 'input70',
62
- setting: {
63
- config: {
64
- sort: true,
65
- maxlen: 100,
66
- action: 'aliyun',
67
- size: 5,
68
- tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
69
- uploadType: 'aliyun',
70
- type: ['jpg', 'png', 'jpeg']
71
- },
72
- },
73
- handleCustom({action, data}) {
74
- if (data && data.params) {
75
- //当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
76
- //data.params = Object.assign({}, data.params, {code: 'g_test_id'});
77
- }
78
-
79
- //获取返回参数(场景类型名称为必填)
80
- //获取返回参数(场景类型名称为必填)
81
- let loading = { close(){}}
82
-
83
- //获取显示内容
84
- if (action === 'screen') {
85
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
86
- .then(res => {
87
- loading.close();
88
- data.cb(res['list'])
89
- })
90
- .catch(error => {
91
- console.error(error);
92
- loading.close();
93
- });
94
-
95
- }
96
-
97
- //获取返回参数(广告位高度必选项)
98
- if (action === 'getNewsInfo') {
99
- XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
100
- .then(res => {
101
- loading.close()
102
- data.cb({list: res.list, selectId: res.selected})
103
- })
104
- .catch(error => {
105
- loading.close()
106
- console.error(error);
107
- });
108
- }
109
-
110
- //获取产品业务线列表
111
- if (action === 'namespace') {
112
- XdBus.getParentApi('getOptionsNamespaces')({})
113
- .then(res => {
114
- loading.close()
115
- data.cb(res['list'])
116
- })
117
- .catch(error => {
118
- loading.close()
119
- console.error(error);
120
- });
121
- }
122
-
123
- //使用内容分类
124
- if (action === 'cmsPublishEditxContent') {
125
- loading = XdBus.getParentApi('loading')({});
126
- XdBus.getParentApi('cmsPublishEditxContent')(data.params)
127
- .then(res => {
128
- console.log('cmsPublishEditxContent', res)
129
- loading.close();
130
- data.cb(res)
131
- })
132
- .catch(error => {
133
- loading.close();
134
- console.error(error);
135
- });
136
- }
137
-
138
- //位置列表
139
- if (action === 'getListPostion') {
140
- loading = XdBus.getParentApi('loading')({});
141
- XdBus.getParentApi('getListNewsPosition')(data.params)
142
- .then(res => {
143
- loading.close();
144
- data.cb(res)
145
- })
146
- .catch(error => {
147
- loading.close();
148
- console.error(error);
149
- });
150
- }
151
-
152
- //位置创建
153
- if (action === 'addPostion') {
154
- loading = XdBus.getParentApi('loading')({});
155
- XdBus.getParentApi('addNewsPosition')(data.params)
156
- .then(res => {
157
- loading.close();
158
- data.cb(true)
159
- })
160
- .catch(error => {
161
- console.error(error);
162
- loading.close();
163
- data.cb(false)
164
- });
165
- }
166
-
167
- //位置编辑
168
- if (action === 'editPostion') {
169
- loading = XdBus.getParentApi('loading')({});
170
- XdBus.getParentApi('updateNewsPosition')(data.params)
171
- .then(res => {
172
- loading.close();
173
- data.cb(true)
174
- })
175
- .catch(error => {
176
- console.error(error);
177
- loading.close();
178
- data.cb(false)
179
- });
180
- }
181
-
182
- //位置删除
183
- if (action === 'deleltePostion') {
184
- loading = XdBus.getParentApi('loading')({});
185
- XdBus.getParentApi('deleteNewsPosition')(data.params)
186
- .then(res => {
187
- loading.close();
188
- data.cb(true)
189
- })
190
- .catch(error => {
191
- console.error(error);
192
- loading.close();
193
- data.cb(false)
194
- });
195
- }
196
-
197
- //获取广告位内容列表
198
- if (action === 'getListContent') {
199
- loading = XdBus.getParentApi('loading')({});
200
- XdBus.getParentApi('getListNewsContent')(data.params)
201
- .then(res => {
202
- loading.close();
203
- data.cb(res)
204
- })
205
- .catch(error => {
206
- loading.close();
207
- console.error(error);
208
- });
209
- }
210
-
211
- //广告内容创建
212
- if (action === 'addContent') {
213
- loading = XdBus.getParentApi('loading')({});
214
- XdBus.getParentApi('addNewsContent')(data.params)
215
- .then(res => {
216
- loading.close();
217
- data.cb(true)
218
- })
219
- .catch(error => {
220
- console.error(error);
221
- loading.close();
222
- data.cb(false)
223
- });
224
- }
225
-
226
- //广告内容编辑
227
- if (action === 'editContent') {
228
- loading = XdBus.getParentApi('loading')({});
229
- XdBus.getParentApi('updateNewsContent')(data.params)
230
- .then(res => {
231
- loading.close();
232
- data.cb(true)
233
- })
234
- .catch(error => {
235
- console.error(error);
236
- loading.close();
237
- data.cb(false)
238
- });
239
- }
240
-
241
- //广告内容删除
242
- if (action === 'deleteContent') {
243
- loading = XdBus.getParentApi('loading')({});
244
- XdBus.getParentApi('deleteNewsContent')(data.params)
245
- .then(res => {
246
- loading.close();
247
- data.cb(true)
248
- })
249
- .catch(error => {
250
- console.error(error);
251
- loading.close();
252
- data.cb(false)
253
- });
254
- }
255
-
256
- //内容发布
257
- if (action === 'publish') {
258
- loading = XdBus.getParentApi('loading')({});
259
- console.log('publish', data.params)
260
- XdBus.getParentApi('cmsPublishContent')(data.params)
261
- .then(res => {
262
- loading.close();
263
- data.cb(res)
264
- })
265
- .catch(error => {
266
- loading.close();
267
- console.error(error);
268
- });
269
- }
270
-
271
- //通知页面进行刷新
272
- if (action === 'update') {
273
- loading = XdBus.getParentApi('loading')({});
274
- XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
275
- loading.close()
276
- }
277
- },
278
- },
279
55
  {
280
56
  label: "票券信息样式配置",
281
57
  ele: "title",
@@ -78,7 +78,7 @@
78
78
  </view>
79
79
  </view>
80
80
  <view v-if="curModule === 'rule'">
81
- <view v-if="cardRule" v-html="cardRule" class="rule_wrap" :style="ruleDetailBoxStyle">
81
+ <view v-if="cardInfo.card_rule_info" v-html="cardInfo.card_rule_info" class="rule_wrap" :style="ruleDetailBoxStyle">
82
82
  </view>
83
83
  <view v-else class="rule_wrap" :style="ruleDetailBoxStyle">
84
84
  使用规则暂无
@@ -141,7 +141,7 @@
141
141
  time: 2, //时间幂指数
142
142
  stopTimer: false, //停止轮询
143
143
 
144
- cardRule: "",
144
+ // cardRule: "",
145
145
  showBusinessList: "Y",
146
146
  //todo
147
147
  cardInfoMargin: {},
@@ -340,7 +340,7 @@
340
340
  onJfbLoad(options) {
341
341
  this.card_number = options.card_number;
342
342
  this.getCardDetail();
343
- this.getContent();
343
+ // this.getContent();
344
344
  },
345
345
  /**
346
346
  * @description 监听事件变化
@@ -496,27 +496,27 @@
496
496
  if(regHttp.test(jumpUrl)) this.$xdUniHelper.redirectTo({url:jumpUrl}, false)
497
497
  else this.$xdUniHelper.navigateTo({url:jumpUrl}, false)
498
498
  },
499
- getContent() {
500
- jfbRootExec("getListBaseNewsContent", {
501
- vm: this,
502
- data: {
503
- page_id: this.pageAttr["page_id"], //页面ID
504
- container_id: this.containerId, //组件ID
505
- limit: 1,
506
- },
507
- })
508
- .then((res) => {
509
- if (res.list.length > 0) {
510
- if(res.list && res.list.length > 0) {
511
- this.cardRule = this.$xdUniHelper.filterHtml(res.list[0].content);
512
- }
513
- // this.noticeStatus = true;
514
- }
515
- })
516
- .catch((error) => {
517
- console.error(error);
518
- });
519
- },
499
+ // getContent() {
500
+ // jfbRootExec("getListBaseNewsContent", {
501
+ // vm: this,
502
+ // data: {
503
+ // page_id: this.pageAttr["page_id"], //页面ID
504
+ // container_id: this.containerId, //组件ID
505
+ // limit: 1,
506
+ // },
507
+ // })
508
+ // .then((res) => {
509
+ // if (res.list.length > 0) {
510
+ // if(res.list && res.list.length > 0) {
511
+ // this.cardRule = this.$xdUniHelper.filterHtml(res.list[0].content);
512
+ // }
513
+ // // this.noticeStatus = true;
514
+ // }
515
+ // })
516
+ // .catch((error) => {
517
+ // console.error(error);
518
+ // });
519
+ // },
520
520
  handleRefresh(){
521
521
  clearInterval(this.timeer);
522
522
  this.getCardDetail();
@@ -23,6 +23,8 @@ module.exports = {
23
23
  is_show_qrcode_logo: "Y",
24
24
  is_can_unbind: "Y",
25
25
  is_can_transfer: "Y",
26
+ card_use_rule: "可凭本票券到电影(勿改)、商城(对应百货)(勿改)、蛋糕(勿改",
27
+ card_rule_info: "<p>购买范围:</p> <ul style='padding-left: 20px;'><li>可凭本票券到xxxxx进行提货</li></ul> <br/> <p>券内额度:</p><ul style='padding-left: 20px;'><li>提货额度为xx点/次</li></ul><br/><p>线下提货:</p><ul style='padding-left: 20px;'><li>1</li><li>2</li></ul>",
26
28
  site_entry_settings: [
27
29
  {
28
30
  id: 63,
@@ -25,11 +25,11 @@
25
25
  @click="changeMenu('card')"
26
26
  >
27
27
  <view class="menu_item_inner"
28
- :style="[menuType === 'card' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的票券包</view>
28
+ :style="menuType === 'card' ? menuItemActiveStyle : menuItemStyle">我的票券包</view>
29
29
  </view>
30
30
  <view class="menu_item" @click="changeMenu('coupon')">
31
31
  <view class="menu_item_inner"
32
- :style="[menuType === 'coupon' ? menuItemActiveStyle : menuItemStyle, menuItemBoxStyle]">我的优惠券</view>
32
+ :style="menuType === 'coupon' ? menuItemActiveStyle : menuItemStyle">我的优惠券</view>
33
33
  </view>
34
34
  </view>
35
35
  <view class="bind_card" :style="bindCardBoxStyle" @click="toBindCard">
@@ -96,20 +96,15 @@
96
96
  <view v-if="item.is_exchange === 'Y'">(可转票券)</view>
97
97
  </view>
98
98
  <view class="bind_btn"
99
- :style="[{
100
- right: cardPadding.right + 'rpx',
101
- bottom: cardPadding.bottom + 'rpx',
102
- borderRadius: cardBtnRadius + 'rpx',
103
- padding: bindCardBtnPadding,
104
- minWidth: cardBtnMinWidth + 'rpx',
105
- }, item.is_login === 'Y' ? bindCardActiveStyle : bindCardBtnStyle]"
99
+ :style="item.is_login === 'Y' ? bindCardActiveStyle : bindCardBtnStyle"
106
100
  @click.stop="doCardLogin(item)"
107
101
  >{{ item.is_login === 'Y' ? '已登录' : '登录'}}</view>
108
102
  </view>
109
103
  <view v-if="!hasCardList" class="no_more_card" @click="toDisableUrl">没有更多券了,查看失效的票券 ></view>
110
104
  </view>
111
- <view v-else>
112
- <!-- 暂无数据 -->
105
+ <view v-else class="empty_data">
106
+ <image :src="emptyBg"></image>
107
+ 暂无票券
113
108
  </view>
114
109
  </view>
115
110
  </template>
@@ -131,8 +126,9 @@
131
126
  ></xd-coupon-item>
132
127
  <view v-if="!hasCouponList" class="no_more_card" @click="toDisableUrl">没有更多券了,查看失效的票券 ></view>
133
128
  </view>
134
- <view v-else>
135
- 暂无数据
129
+ <view v-else class="empty_data">
130
+ <image :src="emptyBg"></image>
131
+ 暂无票券
136
132
  </view>
137
133
 
138
134
  </template>
@@ -151,6 +147,7 @@
151
147
  import { getContainerPropsValue } from "@/utils/xd.base";
152
148
  import componentsMixins from "@/mixins/componentsMixins";
153
149
  import extsMixins from "@/mixins/extsMixins";
150
+ import colorCardMixins from "@/mixins/colorCardMixins";
154
151
  import getServiceUrl from '@/common/getServiceUrl'
155
152
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
156
153
  import XdCouponItem from "./XdCouponItem";
@@ -166,7 +163,7 @@
166
163
  XdNotice,
167
164
  },
168
165
  mixins: [
169
- componentsMixins, extsMixins, JfbBaseTfkCardLoginMixin
166
+ componentsMixins, extsMixins, JfbBaseTfkCardLoginMixin, colorCardMixins
170
167
  ],
171
168
  data() {
172
169
  return {
@@ -256,6 +253,9 @@
256
253
  jwxSDK: (state) => state.jwxSDK,
257
254
  jfbAuthorize: (state) => state.jfbAuthorize,
258
255
  }),
256
+ emptyBg() {
257
+ return this.getNoData();
258
+ },
259
259
  menuBoxStyle(){
260
260
  let padding = `${this.checkValue(this.menuPadding.top, 20)}rpx`;
261
261
  padding = `${padding} ${this.checkValue(this.menuPadding.right, 20)}rpx`;
@@ -267,14 +267,12 @@
267
267
  padding: padding,
268
268
  })
269
269
  },
270
- menuItemBoxStyle(){
270
+ menuItemBoxPadding(){
271
271
  let padding = `${this.checkValue(this.menuBtnPadding.top, 20)}rpx`;
272
272
  padding = `${padding} ${this.checkValue(this.menuBtnPadding.right, 20)}rpx`;
273
273
  padding = `${padding} ${this.checkValue(this.menuBtnPadding.bottom, 20)}rpx`;
274
274
  padding = `${padding} ${this.checkValue(this.menuBtnPadding.left, 20)}rpx`;
275
- return this.styleObjectToString({
276
- padding
277
- })
275
+ return padding;
278
276
  },
279
277
  menuItemStyle(){
280
278
  let styleObj = {
@@ -283,6 +281,7 @@
283
281
  fontSize: this.menuTabColor['fontSize'] || '30rpx',
284
282
  fontWeight: this.menuTabColor['fontWeight'] || 'normal',
285
283
  borderWidth: this.menuBorderWidth + 'px',
284
+ padding: this.menuItemBoxPadding,
286
285
  }
287
286
 
288
287
  return this.styleObjectToString(styleObj)
@@ -294,6 +293,7 @@
294
293
  background: this.menuTabColor['actBgColor'] || '#fff',
295
294
  fontSize: this.menuTabColor['actFontSize'] || '30rpx',
296
295
  fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
296
+ padding: this.menuItemBoxPadding,
297
297
  }
298
298
  if(this.menuShowType === 'text'){
299
299
  styleActiveObj.borderBottom = `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
@@ -310,12 +310,22 @@
310
310
  padding = `${padding} ${this.checkValue(this.cardBtnPadding.left, 20)}rpx`;
311
311
  return padding;
312
312
  },
313
+ bindCardBtnOther(){
314
+ return {
315
+ right: this.cardPadding.right + 'rpx',
316
+ bottom: this.cardPadding.bottom + 'rpx',
317
+ borderRadius: this.cardBtnRadius + 'rpx',
318
+ padding: this.bindCardBtnPadding,
319
+ minWidth: this.cardBtnMinWidth + 'rpx',
320
+ }
321
+ },
313
322
  bindCardBtnStyle(){
314
323
  let styleObj = {
315
324
  color: this.cardBtnTextStyle['color'] || '#333',
316
325
  background: this.cardBtnTextStyle['bgColor'] || '#fff',
317
326
  fontSize: this.cardBtnTextStyle['fontSize'] || '30rpx',
318
327
  fontWeight: this.cardBtnTextStyle['fontWeight'] || 'normal',
328
+ ...this.bindCardBtnOther
319
329
  }
320
330
  return this.styleObjectToString(styleObj)
321
331
  },
@@ -326,6 +336,7 @@
326
336
  background: this.cardBtnTextStyle['actBgColor'] || '#fff',
327
337
  fontSize: this.cardBtnTextStyle['actFontSize'] || '30rpx',
328
338
  fontWeight: this.cardBtnTextStyle['actFontWeight'] || 'normal',
339
+ ...this.bindCardBtnOther
329
340
  }
330
341
  return this.styleObjectToString(styleActiveObj)
331
342
  },
@@ -680,13 +691,18 @@
680
691
  })
681
692
  },
682
693
  apiGetContent(params){
694
+ let _this = this;
695
+ // #ifdef MP-WEIXIN
696
+ _this = this.$parent;
697
+ //#endif
698
+
683
699
  return new Promise((resolve, reject) => {
684
700
  jfbRootExec("getListBaseNewsContent", {
685
701
  vm: this,
686
702
  data: {
687
- page_id: this.pageAttr["page_id"], //页面ID
688
- container_id: this.containerId, //组件ID
689
- page_size: this.noticeNum || 1,
703
+ page_id: _this.pageAttr["page_id"], //页面ID
704
+ container_id: _this.containerId, //组件ID
705
+ page_size: _this.noticeNum || 1,
690
706
  ...params
691
707
  },
692
708
  }).then(res => {
@@ -863,6 +879,19 @@
863
879
  color: #CCCCCC;
864
880
  font-size: 28rpx;
865
881
  }
882
+ .empty_data{
883
+ color: #888;
884
+ font-size: unit(24,rpx);
885
+ height: 60vh;
886
+ display: flex;
887
+ flex-direction: column;
888
+ align-items: center;
889
+ justify-content: center;
890
+ & > image {
891
+ width: unit(460,rpx);
892
+ height: unit(400,rpx);
893
+ }
894
+ }
866
895
  }
867
896
  }
868
897
  }
@@ -7,7 +7,7 @@
7
7
  <view v-if="parent.type !== 'product'" class="module_cont">
8
8
  <view v-for="(item, i) in parent.items" :key="item.key"
9
9
  class="module_cont_inner"
10
- :style="moduleItemContStyle"
10
+ :style="[moduleItemContStyle]"
11
11
  >
12
12
  <content-cinema v-if="parent.type === 'cinema'"
13
13
  style="width: 100%; height: 100%"
@@ -157,14 +157,14 @@
157
157
  padding = `${padding} ${this.checkValue(contMargin.right, 20)}rpx`;
158
158
  padding = `${padding} ${this.checkValue(contMargin.bottom, 20)}rpx`;
159
159
  padding = `${padding} ${this.checkValue(contMargin.left, 20)}rpx`;
160
- return this.styleObjectToString({
160
+ return {
161
161
  padding: padding,
162
162
  border: contBorder,
163
163
  borderRadius: contRradius + 'rpx',
164
164
  boxShadow: contShadow,
165
165
  marginBottom: outSpacing + 'rpx',
166
166
  background: contBgColor,
167
- })
167
+ }
168
168
  },
169
169
  moduleMoreStyle(){
170
170
  const { allModuleMoreStyle } = this.allStyle;
@@ -115,6 +115,7 @@ export default {
115
115
  &-cont {
116
116
  flex: 1;
117
117
  height: 100%;
118
+ overflow: hidden;
118
119
 
119
120
  & .title {
120
121
  margin-bottom: 10rpx;
@@ -77,7 +77,7 @@
77
77
  :item="item"
78
78
  :color="listItemStyle.mainColor"
79
79
  :border-radius="listItemStyle.imgRradius"
80
- :is-echange="'Y' || listItemStyle.isShowExchange"
80
+ :is-echange="listItemStyle.isShowExchange"
81
81
  @on-shop-jhd="handleShopJhd"
82
82
  @on-shop-detail="handleShopDetail"
83
83
  ></content-shop>
@@ -29,13 +29,8 @@
29
29
  @click="handleSwitchMenu(item)"
30
30
  >
31
31
  <view class="menu_inner"
32
- :style="[
33
- menuItemBoxStyle,
34
- item.value === tabId ? menuItemActiveStyle : menuItemStyle,
35
- {
36
- marginRight: i === showMenuList.length - 1 ? '0' : menuItemMargin + 'rpx',
37
- }
38
- ]"
32
+ :style="item.value === tabId ? menuItemActiveStyle : menuItemStyle"
33
+ :class="{isLast: i === showMenuList.length - 1}"
39
34
  >{{ item.label }}</view>
40
35
  </view>
41
36
  </view>
@@ -159,14 +154,12 @@
159
154
  backgroundColor: this.menuBgColor,
160
155
  })
161
156
  },
162
- menuItemBoxStyle(){
157
+ menuItemBoxPadding(){
163
158
  let padding = `${this.checkValue(this.menuItemPadding.top, 20)}rpx`;
164
159
  padding = `${padding} ${this.checkValue(this.menuItemPadding.right, 20)}rpx`;
165
160
  padding = `${padding} ${this.checkValue(this.menuItemPadding.bottom, 20)}rpx`;
166
161
  padding = `${padding} ${this.checkValue(this.menuItemPadding.left, 20)}rpx`;
167
- return this.styleObjectToString({
168
- padding
169
- })
162
+ return padding;
170
163
  },
171
164
  menuItemStyle(){
172
165
  let styleObj = {
@@ -175,6 +168,8 @@
175
168
  fontSize: this.menuTabColor['fontSize'] || '30rpx',
176
169
  fontWeight: this.menuTabColor['fontWeight'] || 'normal',
177
170
  borderWidth: this.menuBorderWidth + 'px',
171
+ padding: this.menuItemBoxPadding,
172
+ marginRight: this.menuItemMargin + 'rpx',
178
173
  }
179
174
 
180
175
  return this.styleObjectToString(styleObj)
@@ -193,7 +188,9 @@
193
188
  background: this.menuTabColor['actBgColor'] || 'transparent',
194
189
  fontSize: this.menuTabColor['actFontSize'] || '30rpx',
195
190
  fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
196
- borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
191
+ borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`,
192
+ padding: this.menuItemBoxPadding,
193
+ marginRight: this.menuItemMargin + 'rpx',
197
194
  }
198
195
  return this.styleObjectToString(styleActiveObj)
199
196
  },
@@ -356,6 +353,14 @@
356
353
  .menu_list{
357
354
  display: flex;
358
355
  box-sizing: border-box;
356
+ overflow: auto;
357
+ .menu_item{
358
+ white-space: nowrap;
359
+
360
+ .isLast{
361
+ margin-right: 0;
362
+ }
363
+ }
359
364
  }
360
365
  }
361
366
  }
@@ -145,6 +145,7 @@ export default {
145
145
  if(item['exts_params']) {
146
146
  url = url + `&exts_params=${item['exts_params']}`
147
147
  }
148
+ url = url + `&xnamespace=${item.business_code}`;
148
149
  console.warn(`handleShopDetail.url:${url}`)
149
150
  this.toLink(url)
150
151
  });