jufubao-base 1.0.311-beta101 → 1.0.311-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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBlock/Attr.js +34 -167
  3. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +9 -12
  4. package/src/components/JfbBaseCardDetail/Attr.js +12 -0
  5. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +162 -1
  6. package/src/components/JfbBaseCardDetailEntry/Attr.js +12 -0
  7. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +163 -2
  8. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +2 -2
  9. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +3 -3
  10. package/src/components/JfbBaseEntry/Attr.js +72 -5
  11. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +47 -183
  12. package/src/components/JfbBaseImageBlock/Attr.js +23 -150
  13. package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +27 -29
  14. package/src/components/JfbBaseNotice/Attr.js +512 -5
  15. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +181 -188
  16. package/src/components/JfbBaseVideo/Attr.js +297 -5
  17. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +62 -36
  18. package/src/components/JfbBaseEntry/cusAttr/content.js +0 -77
  19. package/src/components/JfbBaseEntry/cusAttr/style.js +0 -288
  20. package/src/components/JfbBaseNotice/cusAttr/content.js +0 -308
  21. package/src/components/JfbBaseNotice/cusAttr/cssOne.js +0 -395
  22. package/src/components/JfbBaseNotice/cusAttr/cssThree.js +0 -101
  23. package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +0 -208
  24. package/src/components/JfbBaseNotice/cusAttr/style.js +0 -31
  25. package/src/components/JfbBaseVideo/cusAttr/content.js +0 -236
  26. package/src/components/JfbBaseVideo/cusAttr/image.js +0 -213
  27. package/src/components/JfbBaseVideo/cusAttr/style.js +0 -172
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.311-beta101",
3
+ "version": "1.0.311-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -1,176 +1,43 @@
1
1
  'use strict';
2
2
 
3
- import {dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
4
-
5
3
  /**
6
4
  * @description 当表单组件中有联动操作时候,使用方法进行返回
7
5
  */
8
6
  export default {
9
7
  style: [],
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
- },
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
+ ],
175
42
  advanced: [],
176
43
  };
@@ -17,7 +17,7 @@
17
17
  </view>
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-block__body">
20
- <view :style="[contentStyle]"></view>
20
+ <view :style="{height: height + 'rpx', background: bgcolor}"></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, gCPVal} from "@/utils/xd.base";
31
+ import {getContainerPropsValue} from "@/utils/xd.base";
32
32
 
33
33
  export default {
34
34
  name: "JfbBaseBlock",
@@ -38,7 +38,8 @@
38
38
  mixins: [componentsMixins,extsMixins,JfbBaseBlockMixin],
39
39
  data() {
40
40
  return {
41
- contentStyle:{},
41
+ height: 10,
42
+ bgcolor: '#fff'
42
43
  }
43
44
  },
44
45
  watch: {
@@ -51,15 +52,11 @@
51
52
  this.init(this.container);
52
53
  },
53
54
  methods: {
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
- };
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;
63
60
  },
64
61
  }
65
62
  }
@@ -16,5 +16,17 @@ 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
+ },
19
31
  ],
20
32
  };
@@ -94,6 +94,49 @@
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>
97
140
  </view>
98
141
  </template>
99
142
 
@@ -110,6 +153,7 @@ import getBusinessImageUrl from "@/common/getBusinessImageUrl";
110
153
  import { Base64 } from "js-base64";
111
154
  import { getContainerPropsValue } from "@/utils/xd.base";
112
155
  import {mapState} from 'vuex';
156
+ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer"
113
157
 
114
158
  export default {
115
159
  name: "JfbBaseCardDetail",
@@ -118,6 +162,7 @@ export default {
118
162
  XdPwPay,
119
163
  XdEditPwd,
120
164
  XdUnit,
165
+ XdDownDrawer,
121
166
  },
122
167
  mixins: [componentsMixins, extsMixins, JfbBaseCardDetailMixin],
123
168
  computed:{
@@ -171,9 +216,25 @@ export default {
171
216
  isBrandLogo: false,
172
217
 
173
218
  isShowUnbind: false, //是否启动绑定按钮
219
+ collect_phone_url: "",//收集手机号地址
220
+ showDialog:false,
221
+ sign_url:'',
222
+ share_code:'',
223
+ sign_url_qrcode:'',
224
+ toCollectPhoneUrl:'',
174
225
  };
175
226
  },
176
- created() {},
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
+ },
177
238
  methods: {
178
239
  onJfbLoad(options) {
179
240
  if (options["x-params"]) {
@@ -384,6 +445,8 @@ export default {
384
445
  this.timeStr = "01分19秒"
385
446
  }
386
447
  this.backUrl = getContainerPropsValue( this.container, "content.back_url", { value: "" }).value;
448
+ this.collect_phone_url = getContainerPropsValue(this.container, "content.collect_phone_url", { value: "" }).value;
449
+ console.log(this.collect_phone_url,'collect_phone_url')
387
450
  },
388
451
 
389
452
  /**
@@ -413,6 +476,19 @@ export default {
413
476
  }
414
477
 
415
478
  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
+ }
416
492
  })
417
493
  .catch((err) => {
418
494
  // this.$refs["pwPay"].clearPwd();
@@ -436,6 +512,26 @@ export default {
436
512
  handlePwdClose() {
437
513
  this.$helper.navigateBack();
438
514
  },
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
+ },
439
535
  },
440
536
  };
441
537
  </script>
@@ -595,5 +691,70 @@ export default {
595
691
  }
596
692
  }
597
693
  }
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
+ }
598
759
  }
599
760
  </style>
@@ -73,5 +73,17 @@ 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
+ },
76
88
  ],
77
89
  };