jufubao-base 1.0.311-beta1 → 1.0.311-beta101

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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBlock/Attr.js +167 -34
  3. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +12 -9
  4. package/src/components/JfbBaseCardDetail/Attr.js +0 -12
  5. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +1 -162
  6. package/src/components/JfbBaseCardDetailEntry/Attr.js +0 -12
  7. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +2 -163
  8. package/src/components/JfbBaseEntry/Attr.js +5 -72
  9. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +183 -47
  10. package/src/components/JfbBaseEntry/cusAttr/content.js +77 -0
  11. package/src/components/JfbBaseEntry/cusAttr/style.js +288 -0
  12. package/src/components/JfbBaseImageBlock/Attr.js +150 -23
  13. package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +29 -27
  14. package/src/components/JfbBaseNotice/Attr.js +5 -512
  15. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +188 -181
  16. package/src/components/JfbBaseNotice/cusAttr/content.js +308 -0
  17. package/src/components/JfbBaseNotice/cusAttr/cssOne.js +395 -0
  18. package/src/components/JfbBaseNotice/cusAttr/cssThree.js +101 -0
  19. package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +208 -0
  20. package/src/components/JfbBaseNotice/cusAttr/style.js +31 -0
  21. package/src/components/JfbBaseVideo/Attr.js +5 -297
  22. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +36 -62
  23. package/src/components/JfbBaseVideo/cusAttr/content.js +236 -0
  24. package/src/components/JfbBaseVideo/cusAttr/image.js +213 -0
  25. package/src/components/JfbBaseVideo/cusAttr/style.js +172 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.311-beta1",
3
+ "version": "1.0.311-beta101",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -1,43 +1,176 @@
1
1
  'use strict';
2
2
 
3
+ import {dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
4
+
3
5
  /**
4
6
  * @description 当表单组件中有联动操作时候,使用方法进行返回
5
7
  */
6
8
  export default {
7
9
  style: [],
8
- content: [
9
- {
10
- label: '',
11
- ele: 'slot',
12
- slot: 'is_reference_title',
13
- groupKey:'advanced',
14
- },
15
- {
16
- label: '背景颜色:',
17
- ele: 'xd-color',
18
- valueKey: 'bgcolor',
19
- value: '',
20
- groupKey:'style',
21
- placeholder: '请输入占位框背景颜色',
22
- classNmae: 'input80',
23
- },
24
- {
25
- label: '高度:',
26
- ele: 'el-input',
27
- type: 'number',
28
- valueKey: 'height',
29
- groupKey:'style',
30
- value: null,
31
- classNmae: 'input60',
32
- inline: false,
33
- notice:'占位框高度,单位像素,默认:<span style="color:red">20</span>像素'
34
- },
35
- {
36
- label: '',
37
- ele: 'slot',
38
- slot: 'is_reference',
39
- groupKey:'advanced',
40
- },
41
- ],
10
+ content:(data, gValue, gColor, oldData)=>{
11
+ return [
12
+ {
13
+ label: '',
14
+ ele: 'slot',
15
+ slot: 'is_reference_title',
16
+ groupKey:'advanced',
17
+ },
18
+ {
19
+ ele: 'title',
20
+ label: '基础',
21
+ size: 'small',
22
+ groupKey:'content',
23
+ },
24
+ {
25
+ label: '外边距',
26
+ ele: 'xd-radio',
27
+ groupKey: 'content',
28
+ valueKey: 'marginStatus',
29
+ value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
30
+ labelInline:true,
31
+ list: [
32
+ {label: '默认', value: 'D'},
33
+ {label: '自定义', value: 'C'},
34
+ ]
35
+ },
36
+ {ele: 'group_start'},
37
+ {
38
+ label: '',
39
+ ele: 'xd-margin-padding',
40
+ groupKey:'content',
41
+ valueKey: 'margin',
42
+ value: dataVal({
43
+ data,
44
+ key:'margin',
45
+ dValue:0,
46
+ gValue,
47
+ isPM: true,
48
+ }),
49
+ hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
50
+ setting: {
51
+ type: 'margin',
52
+ },
53
+ },
54
+ {ele: 'group_end'},
55
+ {
56
+ label: '背景颜色',
57
+ ele: 'xd-radio',
58
+ groupKey: 'content',
59
+ valueKey: 'bgcolorStatus',
60
+ value: statusDataVal({data, key:'bgcolorStatus', fields:['bgcolor'],gValue}),
61
+ labelInline:true,
62
+ list: [
63
+ {label: '默认', value: 'D'},
64
+ {label: '自定义', value: 'C'},
65
+ ]
66
+ },
67
+ {ele: 'group_start'},
68
+ {
69
+ label: '',
70
+ ele: 'xd-color',
71
+ valueKey: 'bgcolor',
72
+ value: dataVal({data, key:'bgcolor', dValue:'', gValue}),
73
+ hidden: !statusShow({data, key: 'bgcolorStatus', fields:['bgcolor'], gValue}),
74
+ placeholder: '请输入占位框背景颜色',
75
+ classNmae: 'input80',
76
+ groupKey: 'content',
77
+ labelInline: true,
78
+ setting: {
79
+ showAlpha: true
80
+ }
81
+ },
82
+ {ele: 'group_end'},
83
+ {
84
+ label: '高度',
85
+ ele: 'xd-radio',
86
+ groupKey: 'content',
87
+ valueKey: 'heightStatus',
88
+ value: statusDataVal({data, key:'heightStatus', fields:['height'],gValue}),
89
+ labelInline:true,
90
+ list: [
91
+ {label: '默认', value: 'D'},
92
+ {label: '自定义', value: 'C'},
93
+ ]
94
+ },
95
+ {ele: 'group_start'},
96
+ {
97
+ label: '',
98
+ ele: 'el-input',
99
+ type: 'number',
100
+ valueKey: 'height',
101
+ groupKey:'content',
102
+ value: dataVal({data, key:'height', dValue:'', gValue}), //默认0
103
+ hidden: !statusShow({data, key: 'heightStatus', fields:['height'], gValue}),
104
+ classNmae: 'input100',
105
+ },
106
+ {ele: 'group_end'},
107
+ {
108
+ label: '圆角',
109
+ ele: 'xd-radio',
110
+ groupKey: 'content',
111
+ valueKey: 'radiusStatus',
112
+ value: statusDataVal({data, key:'radiusStatus',cValue: 'N', fields:['radius'],gValue}),
113
+ labelInline:true,
114
+ list: [
115
+ {label: '默认', value: 'D'},
116
+ {label: '无圆角', value: 'N'},
117
+ {label: '自定义', value: 'C'},
118
+ ]
119
+ },
120
+ {ele: 'group_start'},
121
+ {
122
+ label: '',
123
+ ele: 'xd-site-select-list',
124
+ labelInline: true,
125
+ valueKey: 'radius',
126
+ value: dataVal({data, key:'radius', dValue:'10', gValue}),
127
+ hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
128
+ placeholder: '请选择圆角',
129
+ multiple: false,
130
+ className: 'input80',
131
+ groupKey:'content',
132
+ handleCustom({action, data}) {
133
+ XdBus.getParentApi('getOptionsSettingList')({
134
+ setting_id: 'edtix_style_radius',
135
+ key: Date.now()
136
+ })
137
+ .then(res => {
138
+ res.list = res.list.filter(item=>{
139
+ return item.label !== '无';
140
+ });
141
+ data.cb(res.list)
142
+ })
143
+ .catch(error => {
144
+ console.error(error);
145
+ });
146
+ },
147
+ },
148
+ {ele: 'group_end'},
149
+ {
150
+ label: '版本号:',
151
+ ele: 'el-input',
152
+ type: 'text',
153
+ groupKey: 'content',
154
+ valueKey: 'version',
155
+ value: 'v2.0',
156
+ hidden: true,
157
+ },
158
+ {
159
+ label: '过滤引用模版字段:',
160
+ ele: 'el-input',
161
+ type: 'text',
162
+ groupKey: 'content',
163
+ valueKey: 'refFilterKey',
164
+ value: '[]',
165
+ hidden: true,
166
+ },
167
+ {
168
+ label: '',
169
+ ele: 'slot',
170
+ slot: 'is_reference',
171
+ groupKey:'advanced',
172
+ },
173
+ ]
174
+ },
42
175
  advanced: [],
43
176
  };
@@ -17,7 +17,7 @@
17
17
  </view>
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-block__body">
20
- <view :style="{height: height + 'rpx', background: bgcolor}"></view>
20
+ <view :style="[contentStyle]"></view>
21
21
  </view>
22
22
  </view>
23
23
  </template>
@@ -28,7 +28,7 @@
28
28
  import JfbBaseBlockMixin from "./JfbBaseBlockMixin";
29
29
  import componentsMixins from "@/mixins/componentsMixins";
30
30
  import extsMixins from "@/mixins/extsMixins"
31
- import {getContainerPropsValue} from "@/utils/xd.base";
31
+ import {getContainerPropsValue, gCPVal} from "@/utils/xd.base";
32
32
 
33
33
  export default {
34
34
  name: "JfbBaseBlock",
@@ -38,8 +38,7 @@
38
38
  mixins: [componentsMixins,extsMixins,JfbBaseBlockMixin],
39
39
  data() {
40
40
  return {
41
- height: 10,
42
- bgcolor: '#fff'
41
+ contentStyle:{},
43
42
  }
44
43
  },
45
44
  watch: {
@@ -52,11 +51,15 @@
52
51
  this.init(this.container);
53
52
  },
54
53
  methods: {
55
- init(value) {
56
- let bgcolor = getContainerPropsValue(value, 'content.bgcolor', 'rgba(0,0,0,0)');
57
- let height = getContainerPropsValue(value, 'content.height', 20);
58
- if (bgcolor) this.bgcolor = bgcolor;
59
- if (height) this.height = height;
54
+ init(container) {
55
+ let radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
56
+ let margin = gCPVal(container, 'margin', [0],{sKey: 'marginStatus', fields: ['margin'], isPMR: true});
57
+ this.contentStyle = {
58
+ backgroundColor: gCPVal(container, 'bgcolor', '',{sKey: 'bgcolorStatus', fields: ['bgcolor']}),
59
+ height: gCPVal(container, 'height', '20',{sKey: 'heightStatus', fields: ['height']}) + 'rpx',
60
+ borderRadius: radius + 'rpx',
61
+ margin: this.getMarginAndPadding(margin, 0)
62
+ };
60
63
  },
61
64
  }
62
65
  }
@@ -16,17 +16,5 @@ export default {
16
16
  },
17
17
  inline: false,
18
18
  },
19
- {
20
- label: '收集手机号地址:',
21
- ele: 'xd-select-pages-path',
22
- valueKey: 'collect_phone_url',
23
- groupKey:'advanced',
24
- placeholder: '请选择收集手机号地址',
25
- value: null,
26
- setting: {
27
- router: XdBus.getParentApi('getPagesTree'),
28
- },
29
- inline: false,
30
- },
31
19
  ],
32
20
  };
@@ -94,49 +94,6 @@
94
94
  <!-- @onClose="handlePwdClose"-->
95
95
  <!-- ></xd-pw-pay>-->
96
96
  </view>
97
- <xd-down-drawer
98
- :show.sync="showDialog"
99
- height="50vh"
100
- >
101
- <template>
102
- <view class="top_title">请务必先关联,否则影响此卡使用</view>
103
- <view class="method_item">
104
- <view class="method_item_top">
105
- <view class="method_title">方法一</view>
106
- <view>复制文本,打开支付宝APP</view>
107
- </view>
108
- <view class="method_item_bottom">
109
- <view class="method_item_bottom_left">吱口令:{{share_code}}</view>
110
- <view class="method_item_bottom_right" @click="copy(share_code)">复制吱口令</view>
111
- </view>
112
- </view>
113
- <view class="method_item">
114
- <view class="method_item_top">
115
- <view class="method_title">方法二</view>
116
- <view>复制链接,在默认浏览器打开</view>
117
- </view>
118
- <view class="method_item_bottom">
119
- <view class="method_item_bottom_left">{{sign_url}}</view>
120
- <view class="method_item_bottom_right" @click="copy(sign_url)">复制链接</view>
121
- </view>
122
- </view>
123
- <view class="method_item">
124
- <view class="method_item_top">
125
- <view class="method_title">方法三</view>
126
- <view>保存图片,使用支付宝APP扫码</view>
127
- </view>
128
- <view class="method_item_bottom code_img">
129
- <view>打开支付宝APP,点击扫一扫直接扫码或点击相册中保存图片</view>
130
- <view class="code_box">
131
- <view class="qr_code">
132
- <image mode="aspectFit" :src="sign_url_qrcode"></image>
133
- </view>
134
- <view>长按保存二维码</view>
135
- </view>
136
- </view>
137
- </view>
138
- </template>
139
- </xd-down-drawer>
140
97
  </view>
141
98
  </template>
142
99
 
@@ -153,7 +110,6 @@ import getBusinessImageUrl from "@/common/getBusinessImageUrl";
153
110
  import { Base64 } from "js-base64";
154
111
  import { getContainerPropsValue } from "@/utils/xd.base";
155
112
  import {mapState} from 'vuex';
156
- import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
157
113
 
158
114
  export default {
159
115
  name: "JfbBaseCardDetail",
@@ -162,7 +118,6 @@ export default {
162
118
  XdPwPay,
163
119
  XdEditPwd,
164
120
  XdUnit,
165
- XdDownDrawer,
166
121
  },
167
122
  mixins: [componentsMixins, extsMixins, JfbBaseCardDetailMixin],
168
123
  computed:{
@@ -216,25 +171,9 @@ export default {
216
171
  isBrandLogo: false,
217
172
 
218
173
  isShowUnbind: false, //是否启动绑定按钮
219
- collect_phone_url: "",//收集手机号地址
220
- showDialog:false,
221
- sign_url:'',
222
- share_code:'',
223
- sign_url_qrcode:'',
224
- toCollectPhoneUrl:'',
225
174
  };
226
175
  },
227
- created() {
228
- // ifDef小程序拼接问题
229
- let url = this.$xdUniHelper.parseURL();
230
- // #ifdef MP-WEIXIN
231
- this.toCollectPhoneUrl = url.relative
232
- // #endif
233
- // #ifdef H5
234
- this.toCollectPhoneUrl = '@site_domain@'+''+url.relative
235
- // #endif
236
- console.log(this.toCollectPhoneUrl,encodeURIComponent(this.toCollectPhoneUrl),'this.toCollectPhoneUrl')
237
- },
176
+ created() {},
238
177
  methods: {
239
178
  onJfbLoad(options) {
240
179
  if (options["x-params"]) {
@@ -445,8 +384,6 @@ export default {
445
384
  this.timeStr = "01分19秒"
446
385
  }
447
386
  this.backUrl = getContainerPropsValue( this.container, "content.back_url", { value: "" }).value;
448
- this.collect_phone_url = getContainerPropsValue(container, "content.collect_phone_url", { value: "" }).value;
449
- console.log(this.collect_phone_url,'collect_phone_url')
450
387
  },
451
388
 
452
389
  /**
@@ -476,19 +413,6 @@ export default {
476
413
  }
477
414
 
478
415
  this.isShowUnbind = (res["is_can_unbind"] === 'Y' || res["is_can_unbind"] === undefined);
479
- //支付宝弹框
480
- if(res.enterprise_info&&res.enterprise_info.is_need_activate==='Y'){
481
- this.share_code = res.enterprise_info.share_code;
482
- this.sign_url = res.enterprise_info.sign_url;
483
- this.sign_url_qrcode = res.enterprise_info.sign_url_qrcode;
484
- if(res.enterprise_info.is_need_collect_phone_number==='Y'){
485
- let url = `${this.collect_phone_url}?callback_url=${encodeURIComponent(this.toCollectPhoneUrl)}`
486
- this.$xdUniHelper.navigateTo({
487
- url:url,
488
- });
489
- }
490
- this.showDialog = true;
491
- }
492
416
  })
493
417
  .catch((err) => {
494
418
  // this.$refs["pwPay"].clearPwd();
@@ -512,26 +436,6 @@ export default {
512
436
  handlePwdClose() {
513
437
  this.$helper.navigateBack();
514
438
  },
515
- /**
516
- *@description 复制功能
517
- * @param text
518
- */
519
- copy(text) {
520
- // #ifdef H5
521
- this.$copyText(text).then((res) => {
522
- this.$xdAlert({ content: "复制成功" });
523
- });
524
- // #endif
525
- // #ifndef H5
526
- uni.setClipboardData({
527
- data: text,
528
- showToast: false,
529
- success: () => {
530
- //this.$xdAlert({ content: "复制成功" });
531
- },
532
- });
533
- // #endif
534
- },
535
439
  },
536
440
  };
537
441
  </script>
@@ -691,70 +595,5 @@ export default {
691
595
  }
692
596
  }
693
597
  }
694
- .method_item{
695
- padding: unit(32, rpx);
696
- border-bottom: 1px solid #F8F8F8;
697
- color: #333333;
698
- font-size: unit(28,rpx);
699
- &_top{
700
- display: flex;
701
- align-items: center;
702
- }
703
- &_bottom{
704
- display: flex;
705
- justify-content: space-between;
706
- align-items: flex-start;
707
- margin-top: unit(16, rpx);
708
- height: unit(32,rpx);
709
- line-height: unit(32,rpx);
710
- font-size: unit(24,rpx);
711
- color: #666666;
712
- &_right{
713
- min-width: unit(180,rpx);
714
- text-align: right;
715
- color: #FF8D1A;
716
- }
717
- &_left{
718
- color: #666666;
719
- white-space: nowrap;
720
- overflow: hidden;
721
- text-overflow: ellipsis;
722
- }
723
- }
724
- .code_img{
725
- height: auto!important;
726
- }
727
-
728
- }
729
- .method_title{
730
- color: #fff;
731
- background-color: #FF8D1A;
732
- width: unit(120,rpx);
733
- height: unit(50,rpx);
734
- line-height: unit(50,rpx);
735
- border-radius: unit(25,rpx);
736
- text-align: center;
737
- margin-right: unit(20,rpx);
738
- font-size: unit(24,rpx);
739
- }
740
- .top_title{
741
- height: unit(100,rpx);
742
- text-align: center;
743
- line-height:unit(100,rpx);
744
- color:#333333;
745
- font-size:unit(32,rpx);
746
- border-bottom: 1px solid #F8F8F8;
747
- }
748
- .code_box{
749
- text-align: center;
750
- .qr_code{
751
- width: unit(168,rpx);
752
- height: unit(168,rpx);
753
- image{
754
- width: 100%;
755
- height: 100%;
756
- }
757
- }
758
- }
759
598
  }
760
599
  </style>
@@ -73,17 +73,5 @@ export default {
73
73
  },
74
74
  inline: false,
75
75
  },
76
- {
77
- label: '收集手机号地址:',
78
- ele: 'xd-select-pages-path',
79
- valueKey: 'collect_phone_url',
80
- groupKey:'advanced',
81
- placeholder: '请选择收集手机号地址',
82
- value: null,
83
- setting: {
84
- router: XdBus.getParentApi('getPagesTree'),
85
- },
86
- inline: false,
87
- },
88
76
  ],
89
77
  };