jufubao-base 1.0.186-beta3 → 1.0.186

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.
@@ -16,66 +16,37 @@
16
16
  <view class="jfb-base-phone-collect__edit-icon" @click="delEdit">删除</view>
17
17
  </view>
18
18
  <!-- #endif -->
19
- <view :style="{
20
- '--agreement-align': agreementAlign
21
- }" class="jfb-base-phone-collect__body">
22
- <view :style="loginFormStyle" class="panel-login-password">
19
+ <view class="jfb-base-phone-collect__body">
20
+ <view class="panel-login-password">
23
21
  <xd-form
24
- :label-align="labelAlign"
25
- :labelPosition="labelPosition"
26
- :key="formRenderKey"
22
+ label-width="128"
23
+ style="margin-top: 40rpx"
24
+ label-align="right"
25
+ content-align="left"
27
26
  :border="true"
28
- paddingBetween="0"
29
- :style="{
30
- '--form-border-color': formBorderColor,
31
- '--form-border-width': formBorderWidth + 'px',
32
- '--label-font-size': ($rpxNum * parseInt(labelFont.fontSize)) + 'px',
33
- '--label-font-color': labelFont.color,
34
- '--label-font-weight': labelFont.fontWeight,
35
- '--content-font-size': ($rpxNum * parseInt(contentFont.fontSize)) + 'px',
36
- '--content-font-color': contentFont.color,
37
- '--content-font-weight': contentFont.fontWeight,
38
- '--placeholder-font-size': ($rpxNum * parseInt(placeholderFont.fontSize)) + 'px',
39
- '--placeholder-font-color': placeholderFont.color,
40
- '--placeholder-font-weight': placeholderFont.fontWeight,
41
- 'margin-top': '40rpx'
42
- }"
43
27
  >
44
- <xd-form-item
45
- class="form-item"
46
- :class="[inputStyle]"
47
- :leftIcon="phoneIcon"
48
- :labelWidth="labelWidth"
49
- label="手机号"
50
- content-align="left">
28
+ <xd-form-item label="手机号" content-align="left">
51
29
  <xd-form-input
52
30
  v-model="accountForm.phone_number"
53
- :placeholder="phonePlaceholder"
31
+ placeholder="请输入11位手机号"
54
32
  />
55
33
  </xd-form-item>
56
- <xd-form-item
57
- class="form-item"
58
- label="验证码"
59
- content-align="left"
60
- :class="[inputStyle]"
61
- :leftIcon="codeIcon"
62
- :labelWidth="labelWidth"
63
- >
34
+ <xd-form-item label="验证码" content-align="left">
64
35
  <view class="flex align-center">
65
36
  <xd-form-input
66
37
  v-model="accountForm.verification_code"
67
- :placeholder="codePlaceholder"
38
+ placeholder="请输入验证码"
68
39
  />
69
40
  <view
70
41
  class="get_code"
71
42
  @click="reGetCode"
72
- :style="getCodeStyle"
43
+ :style="{ color: mainColor }"
73
44
  >{{ jfbTimeer ? jfbTimeer + "秒后获取" : "获取验证码" }}</view
74
45
  >
75
46
  </view>
76
47
  </xd-form-item>
77
48
  </xd-form>
78
- <view class="form-group" :style="agreementBoxStyle">
49
+ <view class="form-group" style="padding-bottom: 0">
79
50
  <xd-form-checkbox
80
51
  class="xd-form-checkbox"
81
52
  v-model="panel_1_checked"
@@ -84,19 +55,19 @@
84
55
  :localdata="[{ value: 1, text: '登录即同意《隐私政策》《用户服务协议》' },]"
85
56
  >
86
57
  <template slot="a1">
87
- <view class="text-content" :style="agreeFont">
58
+ <view class="text-content">
88
59
  <text>请阅读并同意</text>
89
- <text @click.stop="handlePrivacy('privacy_privacy')" :style="privacyFont">《隐私政策》</text>
90
- <text @click.stop="handlePrivacy('privacy_service')" :style="privacyFont">《用户服务协议》</text>
60
+ <text @click.stop="handlePrivacy('privacy_privacy')" :style="{color: mainColor}">《隐私政策》</text>
61
+ <text @click.stop="handlePrivacy('privacy_service')" :style="{color: mainColor}">《用户服务协议》</text>
91
62
  </view>
92
63
  </template>
93
64
  </xd-form-checkbox>
94
65
  </view>
95
- <view :style="btnWrapStyle" class="form-group">
66
+ <view class="form-group">
96
67
  <xd-button
97
68
  style="flex: 1"
98
69
  type="primary"
99
- :radius="btnRadius + 'rpx'"
70
+ radius="10rpx"
100
71
  :disabled="!panelIsChecked"
101
72
  @click="doLoginForm"
102
73
  >登录</xd-button
@@ -105,13 +76,6 @@
105
76
  <view
106
77
  v-if="is_show_skip === 'Y'"
107
78
  class="jump_collect"
108
- :style="{
109
- '--font-size': ($rpxNum * parseInt(jumpFont.fontSize)) + 'px',
110
- '--font-color': jumpFont.color,
111
- '--font-weight': jumpFont.fontWeight,
112
- '--line-height': ($rpxNum * parseInt(jumpFont.lineHeight)) + 'px',
113
- '--text-align': jumpAlign
114
- }"
115
79
  @click="jumpCollect"
116
80
  >跳过</view>
117
81
  </view>
@@ -159,123 +123,12 @@ export default {
159
123
  provider_id: "",
160
124
  callback_url: "",
161
125
  is_show_skip: "Y",
162
-
163
- inputStyle: "linear", //输入框样式 linear:线性 face: 面性
164
- formBorderColor: "#F9F9F9", //
165
- formBorderWidth: 1, //表单边框宽度
166
- formWrapBorderWidth: 1, //表单外边框宽度
167
- formWrapBorderColor: "#F9F9F9", //表单外边框宽度
168
- formShadowW: 0, //表单阴影宽度
169
- formShadowColor: '#fff', //表单阴影颜色
170
- formBorderRadius: 20, //表单圆角
171
- formBgColor: "", //表单背景颜色
172
- formPadding: {
173
- top: 0,
174
- left: 0,
175
- right: 0,
176
- bottom: 0
177
- },
178
- formMargin: {
179
- top: 0,
180
- left: 0,
181
- right: 0,
182
- bottom: 0
183
- },
184
- labelAlign: "left", //表单label对齐方式
185
- labelPosition: "left", //表单label位置
186
- labelWidth: 160, //表单label宽度
187
- phoneIcon: "", //手机号登录输入框图标
188
- codeIcon: "", //验证码登录输入框图标
189
- passwordIcon: "", //密码登录输入框图标
190
- labelFont: { //表单label字体
191
- color: "#333",
192
- fontSize: "24rpx",
193
- fontWeight: "normal",
194
- },
195
- placeholderFont: {
196
- color: "#d4d4d4",
197
- fontSize: "24rpx",
198
- fontWeight: "normal",
199
- },
200
- contentFont: { //表单内容字体
201
- color: "#333",
202
- fontSize: "24rpx",
203
- fontWeight: "normal",
204
- },
205
- getCodeFont: {
206
- color: "#ff5a39",
207
- fontSize: "24rpx",
208
- fontWeight: "normal",
209
- },
210
- getCodeShowType: "text", //获取验证码展示方式
211
- btnMargin: {},
212
- btnRadius: 20, //按钮圆角
213
- agreeFont: {}, //条款字体
214
- privacyFont: {}, //隐私字体
215
- agreementAlign: "center", //条款对齐方式
216
- agreePadding: {
217
- top: 0,
218
- left: 0,
219
- right: 0,
220
- bottom: 0
221
- }, //条款内边距
222
- formRenderKey: "formRenderKey",
223
- jumpFont: {}, //跳过字体
224
- jumpAlign: 'right'
225
126
  };
226
127
  },
227
128
  computed: {
228
129
  panelIsChecked() {
229
130
  return this.panel_1_checked.includes(1);
230
131
  },
231
- loginFormStyle(){
232
- let padding = `${this.checkValue(this.formPadding.top, 20)}rpx`;
233
- padding = `${padding} ${this.checkValue(this.formPadding.right, 20)}rpx`;
234
- padding = `${padding} ${this.checkValue(this.formPadding.bottom, 20)}rpx`;
235
- padding = `${padding} ${this.checkValue(this.formPadding.left, 20)}rpx`;
236
- let margin = `${this.checkValue(this.formMargin.top, 20)}rpx`;
237
- margin = `${margin} ${this.checkValue(this.formMargin.right, 20)}rpx`;
238
- margin = `${margin} ${this.checkValue(this.formMargin.bottom, 20)}rpx`;
239
- margin = `${margin} ${this.checkValue(this.formMargin.left, 20)}rpx`;
240
- let borderRadius = `${this.checkValue(this.formRadius, 20)}rpx`;
241
- let border = `${this.formWrapBorderWidth}px solid ${this.formWrapBorderColor}`;
242
- let boxShadow = `0 0 ${this.formShadowW}rpx ${this.formShadowColor}`
243
-
244
- return this.styleObjectToString({
245
- background: this.formBgColor,
246
- padding: padding,
247
- margin,
248
- borderRadius,
249
- border,
250
- boxShadow
251
- })
252
- },
253
- getCodeStyle(){
254
- return this.styleObjectToString({
255
- color: this.getCodeFont.color,
256
- borderColor: this.getCodeShowType === 'button' ? this.getCodeFont.color : 'transparent',
257
- fontSize: this.getCodeFont.fontSize,
258
- fontWeight: this.getCodeFont.fontWeight,
259
- })
260
- },
261
- agreementBoxStyle(){
262
- let padding = `${this.checkValue(this.agreePadding.top, 20)}rpx`;
263
- padding = `${padding} ${this.checkValue(this.agreePadding.right, 20)}rpx`;
264
- padding = `${padding} ${this.checkValue(this.agreePadding.bottom, 20)}rpx`;
265
- padding = `${padding} ${this.checkValue(this.agreePadding.left, 20)}rpx`;
266
- return this.styleObjectToString({
267
- padding: padding,
268
- })
269
- },
270
- btnWrapStyle(){
271
- let padding = `${this.checkValue(this.btnMargin.top, 20)}rpx`;
272
- padding = `${padding} ${this.checkValue(this.btnMargin.right, 20)}rpx`;
273
- padding = `${padding} ${this.checkValue(this.btnMargin.bottom, 20)}rpx`;
274
- padding = `${padding} ${this.checkValue(this.btnMargin.left, 20)}rpx`;
275
- return this.styleObjectToString({
276
- padding: padding,
277
- })
278
- },
279
132
  },
280
133
  watch: {
281
134
  container(value,oldValue) {
@@ -312,61 +165,10 @@ export default {
312
165
  * @description 监听事件变化
313
166
  * @param container {object} 业务组件对象自己
314
167
  */
315
- init(value) {
316
- this.inputStyle = getContainerPropsValue(value, "content.inputStyle", 'linear');
317
- this.formBorderColor = getContainerPropsValue(value, "content.formBorderColor", '#F9F9F9');
318
- this.is_show_skip = getContainerPropsValue(value, 'content.is_show_skip', "Y");
319
- this.formBorderWidth = getContainerPropsValue(value, "content.formBorderWidth", '1');
320
- this.formBgColor = getContainerPropsValue(value, "content.formBgColor", '#FFFFFF');
321
- this.formPadding = getContainerPropsValue(value, "content.formPadding", {top: 20, left: 20, right: 20, bottom: 20});
322
- this.formMargin = getContainerPropsValue(value, "content.formMargin", {top: 0, left: 0, right: 0, bottom: 0});
323
- this.formRadius = getContainerPropsValue(value, "content.formRadius", '0');
324
- this.formWrapBorderColor = getContainerPropsValue(value, "content.formWrapBorderColor", '#F9F9F9');
325
- this.formWrapBorderWidth = getContainerPropsValue(value, "content.formWrapBorderWidth", '0');
326
- this.formShadowColor = getContainerPropsValue(value, "content.formShadowColor", '#F9F9F9');
327
- this.formShadowW = getContainerPropsValue(value, "content.formShadowW", '0');
328
- this.labelAlign = getContainerPropsValue(value, "content.labelAlign", 'left');
329
- this.labelPosition = getContainerPropsValue(value, "content.labelPosition", 'left');
330
- this.labelWidth = getContainerPropsValue(value, "content.labelWidth", '180');
331
- this.phoneIcon = getContainerPropsValue(value, "content.phoneIcon", '');
332
- this.codeIcon = getContainerPropsValue(value, "content.codeIcon", '');
333
- this.passwordIcon = getContainerPropsValue(value, "content.passwordIcon", '');
334
- this.labelFont = getContainerPropsValue(value, "content.labelFont", {});
335
- this.placeholderFont = getContainerPropsValue(value, "content.placeholderFont", {});
336
- this.contentFont = getContainerPropsValue(value, "content.contentFont", {});
337
- this.getCodeFont = getContainerPropsValue(value, "content.getCodeFont", {});
338
- this.getCodeShowType = getContainerPropsValue(value, "content.getCodeShowType", 'text');
339
- this.btnMargin = getContainerPropsValue(value, "content.btnMargin", {});
340
- this.btnRadius = getContainerPropsValue(value, "content.btnRadius", '20');
341
- this.phonePlaceholder = getContainerPropsValue(value, "content.phonePlaceholder", '请输入手机号');
342
- this.codePlaceholder = getContainerPropsValue(value, "content.codePlaceholder", '请输入验证码');
343
- let agreeFont = getContainerPropsValue(value, "content.agreeFont", {});
344
- if(!agreeFont.color) {
345
- agreeFont.color = '#666'
346
- }
347
- this.agreeFont = agreeFont;
348
- let privacyFont = getContainerPropsValue(value, "content.privacyFont", {});
349
- if(!privacyFont.color) {
350
- privacyFont.color = this.mainColor
351
- }
352
- this.privacyFont = privacyFont;
353
- this.agreementAlign = getContainerPropsValue(value, "content.agreementAlign", 'center');
354
- this.agreePadding = getContainerPropsValue(value, "content.agreePadding", {});
355
- if(this.inputStyle === 'face'){
356
- this.labelPosition = 'top';
357
- this.labelAlign = 'left';
358
- }
359
- if(this.$configProject.isPreview){
360
- this.formRenderKey = Date.now();
361
- }
362
- let jumpFont = getContainerPropsValue(value, "content.jumpFont", {});
363
- if(!jumpFont.color) {
364
- jumpFont.color = '#a6a6a6'
365
- }
366
- this.jumpFont = jumpFont;
367
- console.log(this.jumpFont,'this.jumpFont');
368
-
369
- this.jumpAlign = getContainerPropsValue(value, "content.jumpAlign", 'right');
168
+ init(container) {
169
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
170
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
171
+ this.is_show_skip = getContainerPropsValue(container, 'content.is_show_skip', "Y");
370
172
  },
371
173
  reGetCode() {
372
174
  this.$xdLog.setProject('get.code.handle', {
@@ -459,9 +261,8 @@ export default {
459
261
  }
460
262
 
461
263
  .xd-form-checkbox {
462
- ::v-deep .checklist-box {
463
- margin: 0;
464
- align-items: var(--agreement-align);
264
+ /deep/ .checklist-box {
265
+ margin: 0 !important;
465
266
  }
466
267
  }
467
268
  .xd-form-checkbox {
@@ -483,11 +284,6 @@ export default {
483
284
  .get_code {
484
285
  color: @xd-base-color;
485
286
  font-size: 24rpx;
486
- margin-right: unit(20,rpx);
487
- padding: 10rpx 24rpx;
488
- border: 1px solid @xd-base-color;
489
- border-radius: 40rpx;
490
- white-space: nowrap;
491
287
  }
492
288
  .panel-login-password {
493
289
  /deep/ .uni-forms-item__label {
@@ -511,88 +307,12 @@ export default {
511
307
  color: #fe7a63;
512
308
  }
513
309
  .jump_collect{
514
- font-size: var(--font-size);
515
- color: var(--font-color);
516
- text-align: var(--text-align);
517
- font-weight: var(--font-weight);
518
- line-height: var(--line-height);
519
- margin: 20rpx 70rpx 0 70rpx;
520
- }
521
- }
522
- // #ifdef H5
523
- .form-item {
524
- ::v-deep &.uni-forms-item {
525
- // padding-left: unit(30,rpx) !important;
526
- .uni-input-input{
527
- font-size: var(--content-font-size);
528
- color: var(--content-font-color);
529
- font-weight: var(--content-font-weight);
530
- }
531
- .label-text {
532
- font-size: var(--label-font-size);
533
- color: var(--label-font-color);
534
- font-weight: var(--label-font-weight);
535
- }
536
- .uni-easyinput__placeholder-class{
537
- font-size: var(--placeholder-font-size);
538
- color: var(--placeholder-font-color);
539
- font-weight: var(--placeholder-font-weight);
540
- }
541
- }
542
- &.linear{
543
- ::v-deep &.uni-forms-item--border{
544
- border-color: var(--form-border-color) !important;
545
- border-width: var(--form-border-width) !important;
546
- }
547
- }
548
- &.face{
549
- ::v-deep .uni-forms-item__content{
550
- background: #F7F7F7;
551
- border-radius: 16rpx;
552
- }
553
- ::v-deep &.uni-forms-item--border{
554
- border: none;
555
- }
556
-
557
- }
558
- }
559
- // #endif
560
-
561
- // #ifdef MP
562
- ::v-deep .uni-forms-item {
563
- // padding-left: 30rpx !important;
564
- .uni-input-input{
565
- font-size: var(--content-font-size);
566
- color: var(--content-font-color);
567
- font-weight: var(--content-font-weight);
568
- }
569
- .label-text {
570
- font-size: var(--label-font-size);
571
- color: var(--label-font-color);
572
- font-weight: var(--label-font-weight);
573
- }
574
- .uni-easyinput__placeholder-class{
575
- font-size: var(--placeholder-font-size);
576
- color: var(--placeholder-font-color);
577
- font-weight: var(--placeholder-font-weight);
578
- }
579
- }
580
- .linear{
581
- ::v-deep .uni-forms-item--border{
582
- border-top: none !important;
583
- border-bottom: var(--form-border-width) solid var(--form-border-color) !important;
584
- }
585
- }
586
- .face{
587
- ::v-deep .uni-forms-item__content{
588
- background: #F7F7F7;
589
- border-radius: 16rpx;
590
- }
591
- ::v-deep .uni-forms-item--border{
592
- border: none;
310
+ font-size: 24rpx;
311
+ color: #a6a6a6;
312
+ text-align: right;
313
+ margin: 20rpx 70rpx 0 0;
593
314
  }
594
315
  }
595
- // #endif
596
316
  }
597
317
  }
598
318