jufubao-base 1.0.189 → 1.0.191

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.
@@ -3,78 +3,114 @@
3
3
  class="jfb-base-phone-login"
4
4
  @click="handleEditxSelect"
5
5
  :class="{
6
- editx : isEditx && active,
7
- noBorder: noBorder
6
+ editx: isEditx && active,
7
+ noBorder: noBorder,
8
8
  }"
9
9
  >
10
10
  <!--#ifdef H5-->
11
11
  <view
12
12
  class="jfb-base-phone-login__edit"
13
- :class="{ editx : isEditx && active }"
13
+ :class="{ editx: isEditx && active }"
14
14
  v-if="isEditx && active && !noBorder"
15
15
  >
16
16
  <view class="jfb-base-phone-login__edit-icon" @click="delEdit">删除</view>
17
17
  </view>
18
18
  <!-- #endif -->
19
- <view class="jfb-base-phone-login__body">
20
- <view class="panel-login-password">
21
- <xd-form label-width="128"
22
- style="margin-top: 40rpx;"
23
- label-align="right"
24
- content-align="left"
19
+ <view :style="{
20
+ '--agreement-align': agreementAlign
21
+ }" class="jfb-base-phone-login__body">
22
+ <view :style="loginFormStyle" class="panel-login-password">
23
+ <xd-form
24
+ :label-align="labelAlign"
25
+ :labelPosition="labelPosition"
26
+ :key="formRenderKey"
25
27
  :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':
36
+ $rpxNum * parseInt(contentFont.fontSize) + 'px',
37
+ '--content-font-color': contentFont.color,
38
+ '--content-font-weight': contentFont.fontWeight,
39
+ '--placeholder-font-size':
40
+ $rpxNum * parseInt(placeholderFont.fontSize) + 'px',
41
+ '--placeholder-font-color': placeholderFont.color,
42
+ '--placeholder-font-weight': placeholderFont.fontWeight,
43
+ 'margin-top': '40rpx',
44
+ }"
26
45
  >
27
46
  <xd-form-item
47
+ class="form-item"
48
+ :class="[inputStyle]"
49
+ :leftIcon="phoneIcon"
50
+ :labelWidth="labelWidth"
28
51
  label="手机号"
29
52
  content-align="left"
30
53
  >
31
54
  <xd-form-input
32
55
  v-model="accountForm.phone_number"
33
- placeholder="请输入11位手机号"
56
+ :placeholder="phonePlaceholder"
34
57
  />
35
58
  </xd-form-item>
36
59
  <xd-form-item
60
+ class="form-item"
37
61
  label="验证码"
38
62
  content-align="left"
63
+ :class="[inputStyle]"
64
+ :leftIcon="codeIcon"
65
+ :labelWidth="labelWidth"
39
66
  >
40
67
  <view class="flex align-center">
41
68
  <xd-form-input
42
69
  v-model="accountForm.verification_code"
43
- placeholder="请输入验证码"
70
+ :placeholder="codePlaceholder"
44
71
  />
45
- <view
46
- class="get_code"
47
- @click="reGetCode"
48
- :style="{color: mainColor}"
49
- >{{jfbTimeer ? jfbTimeer + '秒后获取':'获取验证码'}}</view>
72
+ <view class="get_code" @click="reGetCode" :style="getCodeStyle">{{
73
+ jfbTimeer ? jfbTimeer + "秒后获取" : "获取验证码"
74
+ }}</view>
50
75
  </view>
51
76
  </xd-form-item>
52
77
  </xd-form>
53
- <view class="form-group" style="padding-bottom:0">
78
+ <view class="form-group" :style="agreementBoxStyle">
54
79
  <xd-form-checkbox
55
80
  class="xd-form-checkbox"
56
81
  v-model="panel_1_checked"
57
82
  mode="default"
58
83
  multiple
59
- :localdata="[{value: 1, text: '登录即同意《隐私政策》《用户服务协议》'}]"
84
+ :localdata="[
85
+ { value: 1, text: '登录即同意《隐私政策》《用户服务协议》' },
86
+ ]"
60
87
  >
61
88
  <template slot="a1">
62
- <view class="text-content">
89
+ <view class="text-content" :style="agreeFont">
63
90
  <text>请阅读并同意</text>
64
- <text @click.stop="handlePrivacy('privacy_privacy')" :style="{color: mainColor}">《隐私政策》</text>
65
- <text @click.stop="handlePrivacy('privacy_service')" :style="{color: mainColor}">《用户服务协议》</text>
91
+ <text
92
+ @click.stop="handlePrivacy('privacy_privacy')"
93
+ :style="privacyFont"
94
+ >《隐私政策》</text
95
+ >
96
+ <text
97
+ @click.stop="handlePrivacy('privacy_service')"
98
+ :style="privacyFont"
99
+ >《用户服务协议》</text
100
+ >
66
101
  </view>
67
102
  </template>
68
103
  </xd-form-checkbox>
69
104
  </view>
70
- <view class="form-group">
105
+ <view :style="btnWrapStyle" class="form-group">
71
106
  <xd-button
72
107
  :disabled="!panelIsChecked"
73
- style="flex: 1;"
108
+ style="flex: 1"
74
109
  type="primary"
75
- radius="10rpx"
110
+ :radius="btnRadius + 'rpx'"
76
111
  @click="doLoginForm"
77
- >登录</xd-button>
112
+ >登录</xd-button
113
+ >
78
114
  </view>
79
115
  <!-- <view
80
116
  class="not_login"
@@ -87,188 +123,506 @@
87
123
  </template>
88
124
 
89
125
  <script>
90
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
91
- import { jfbRootExec } from "@/utils/xd.event";
92
- import JfbBasePhoneLoginMixin from "./JfbBasePhoneLoginMixin";
93
- import componentsMixins from "@/mixins/componentsMixins";
94
- import extsMixins from "@/mixins/extsMixins"
95
- import { getContainerPropsValue } from "@/utils/xd.base";
96
- import XdFormItem from "@/components/XdFormItem/XdFormItem";
97
- import XdForm from "@/components/XdForm/XdForm";
98
- import XdFormInput from "@/components/XdFormInput/XdFormInput";
99
- import XdButton from "@/components/XdButton/XdButton";
100
- import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox"
126
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
127
+ import { jfbRootExec } from "@/utils/xd.event";
128
+ import JfbBasePhoneLoginMixin from "./JfbBasePhoneLoginMixin";
129
+ import componentsMixins from "@/mixins/componentsMixins";
130
+ import extsMixins from "@/mixins/extsMixins";
131
+ import { getContainerPropsValue } from "@/utils/xd.base";
132
+ import XdFormItem from "@/components/XdFormItem/XdFormItem";
133
+ import XdForm from "@/components/XdForm/XdForm";
134
+ import XdFormInput from "@/components/XdFormInput/XdFormInput";
135
+ import XdButton from "@/components/XdButton/XdButton";
136
+ import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox";
101
137
 
102
- export default {
103
- // #ifdef MP-WEIXIN
104
- options: { styleIsolation: 'shared' },
105
- // #endif
138
+ export default {
139
+ // #ifdef MP-WEIXIN
140
+ options: { styleIsolation: "shared" },
141
+ // #endif
142
+
143
+ name: "JfbBasePhoneLogin",
144
+ components: {
145
+ XdFontIcon,
146
+ XdForm,
147
+ XdFormItem,
148
+ XdFormInput,
149
+ XdButton,
150
+ XdFormCheckbox,
151
+ },
152
+ mixins: [componentsMixins, extsMixins, JfbBasePhoneLoginMixin],
153
+ data() {
154
+ return {
155
+ panel_1_checked: "",
156
+ accountForm: {
157
+ phone_number: "",
158
+ verification_code: "",
159
+ },
160
+ jfbTimeer: 0,
161
+ interval: null,
162
+ auth_code: "",
163
+ provider_id: "",
164
+ callback_url: "",
106
165
 
107
- name: "JfbBasePhoneLogin",
108
- components: {
109
- XdFontIcon,
110
- XdForm,
111
- XdFormItem,
112
- XdFormInput,
113
- XdButton,
114
- XdFormCheckbox
166
+ inputStyle: "linear", //输入框样式 linear:线性 face: 面性
167
+ formBorderColor: "#F9F9F9", //
168
+ formBorderWidth: 1, //表单边框宽度
169
+ formWrapBorderWidth: 1, //表单外边框宽度
170
+ formWrapBorderColor: "#F9F9F9", //表单外边框宽度
171
+ formShadowW: 0, //表单阴影宽度
172
+ formShadowColor: '#fff', //表单阴影颜色
173
+ formBorderRadius: 20, //表单圆角
174
+ formBgColor: "", //表单背景颜色
175
+ formPadding: {
176
+ top: 0,
177
+ left: 0,
178
+ right: 0,
179
+ bottom: 0
180
+ },
181
+ formMargin: {
182
+ top: 0,
183
+ left: 0,
184
+ right: 0,
185
+ bottom: 0
186
+ },
187
+ labelAlign: "left", //表单label对齐方式
188
+ labelPosition: "left", //表单label位置
189
+ labelWidth: 160, //表单label宽度
190
+ phoneIcon: "", //手机号登录输入框图标
191
+ codeIcon: "", //验证码登录输入框图标
192
+ passwordIcon: "", //密码登录输入框图标
193
+ labelFont: {
194
+ //表单label字体
195
+ color: "#333",
196
+ fontSize: "24rpx",
197
+ fontWeight: "normal",
198
+ },
199
+ placeholderFont: {
200
+ color: "#d4d4d4",
201
+ fontSize: "24rpx",
202
+ fontWeight: "normal",
203
+ },
204
+ contentFont: {
205
+ //表单内容字体
206
+ color: "#333",
207
+ fontSize: "24rpx",
208
+ fontWeight: "normal",
209
+ },
210
+ getCodeFont: {
211
+ color: "#ff5a39",
212
+ fontSize: "24rpx",
213
+ fontWeight: "normal",
214
+ },
215
+ getCodeShowType: "text", //获取验证码展示方式
216
+ btnMargin: {},
217
+ btnRadius: 20, //按钮圆角
218
+ agreeFont: {}, //条款字体
219
+ privacyFont: {}, //隐私字体
220
+ agreementAlign: "center", //条款对齐方式
221
+ agreePadding: {
222
+ top: 0,
223
+ left: 0,
224
+ right: 0,
225
+ bottom: 0,
226
+ }, //条款内边距
227
+ formRenderKey: "formRenderKey",
228
+ jumpFont: {}, //跳过字体
229
+ jumpAlign: 'right'
230
+ };
231
+ },
232
+ computed: {
233
+ panelIsChecked() {
234
+ return this.panel_1_checked.includes(1);
115
235
  },
116
- mixins: [componentsMixins,extsMixins,JfbBasePhoneLoginMixin],
117
- data() {
118
- return {
119
- panel_1_checked: "",
120
- accountForm: {
121
- phone_number: '',
122
- verification_code: '',
123
- },
124
- jfbTimeer: 0,
125
- interval: null,
126
- auth_code: "",
127
- provider_id: "",
128
- callback_url: ""
129
- //todo
130
- }
236
+ loginFormStyle(){
237
+ let padding = `${this.checkValue(this.formPadding.top, 20)}rpx`;
238
+ padding = `${padding} ${this.checkValue(this.formPadding.right, 20)}rpx`;
239
+ padding = `${padding} ${this.checkValue(this.formPadding.bottom, 20)}rpx`;
240
+ padding = `${padding} ${this.checkValue(this.formPadding.left, 20)}rpx`;
241
+ let margin = `${this.checkValue(this.formMargin.top, 20)}rpx`;
242
+ margin = `${margin} ${this.checkValue(this.formMargin.right, 20)}rpx`;
243
+ margin = `${margin} ${this.checkValue(this.formMargin.bottom, 20)}rpx`;
244
+ margin = `${margin} ${this.checkValue(this.formMargin.left, 20)}rpx`;
245
+ let borderRadius = `${this.checkValue(this.formRadius, 20)}rpx`;
246
+ let border = `${this.formWrapBorderWidth}px solid ${this.formWrapBorderColor}`;
247
+ let boxShadow = `0 0 ${this.formShadowW}rpx ${this.formShadowColor}`
248
+
249
+ return this.styleObjectToString({
250
+ background: this.formBgColor,
251
+ padding: padding,
252
+ margin,
253
+ borderRadius,
254
+ border,
255
+ boxShadow
256
+ })
131
257
  },
132
- computed: {
133
- panelIsChecked(){
134
- return this.panel_1_checked.includes(1);
135
- }
258
+ getCodeStyle() {
259
+ return this.styleObjectToString({
260
+ color: this.getCodeFont.color,
261
+ borderColor:
262
+ this.getCodeShowType === "button"
263
+ ? this.getCodeFont.color
264
+ : "transparent",
265
+ fontSize: this.getCodeFont.fontSize,
266
+ fontWeight: this.getCodeFont.fontWeight,
267
+ });
136
268
  },
137
- watch: {
138
- container(value,oldValue) {
139
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
140
- if (this.$configProject['isPreview']) this.init(value)
141
- },
142
- "accountForm.verification_code"(value) {
143
- if (value && value.length >= 8 && value.length % 2 === 0) {
144
- let start = value.slice(0, value.length / 2);
145
- let end = value.slice(value.length / 2);
146
- if (start === end) {
147
- this.accountForm.verification_code = start;
148
- }
269
+ agreementBoxStyle() {
270
+ let padding = `${this.checkValue(this.agreePadding.top, 20)}rpx`;
271
+ padding = `${padding} ${this.checkValue(this.agreePadding.right, 20)}rpx`;
272
+ padding = `${padding} ${this.checkValue(
273
+ this.agreePadding.bottom,
274
+ 20
275
+ )}rpx`;
276
+ padding = `${padding} ${this.checkValue(this.agreePadding.left, 20)}rpx`;
277
+ return this.styleObjectToString({
278
+ padding: padding,
279
+ });
280
+ },
281
+ btnWrapStyle() {
282
+ let padding = `${this.checkValue(this.btnMargin.top, 20)}rpx`;
283
+ padding = `${padding} ${this.checkValue(this.btnMargin.right, 20)}rpx`;
284
+ padding = `${padding} ${this.checkValue(this.btnMargin.bottom, 20)}rpx`;
285
+ padding = `${padding} ${this.checkValue(this.btnMargin.left, 20)}rpx`;
286
+ return this.styleObjectToString({
287
+ padding: padding,
288
+ });
289
+ },
290
+ },
291
+ watch: {
292
+ container(value, oldValue) {
293
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
294
+ if (this.$configProject["isPreview"]) this.init(value);
295
+ },
296
+ "accountForm.verification_code"(value) {
297
+ if (value && value.length >= 8 && value.length % 2 === 0) {
298
+ let start = value.slice(0, value.length / 2);
299
+ let end = value.slice(value.length / 2);
300
+ if (start === end) {
301
+ this.accountForm.verification_code = start;
149
302
  }
150
303
  }
151
304
  },
152
- created() {
153
- this.init(this.container);
305
+ },
306
+ created() {
307
+ this.init(this.container);
308
+ },
309
+ methods: {
310
+ handlePrivacy(code) {
311
+ let params = `page_id=${this.pageAttr["page_id"]}`;
312
+ params = `${params}&container_id=${this.containerId}${code}`;
313
+ this.$xdUniHelper.navigateTo({
314
+ url: `/pages/content/content?${params}`,
315
+ });
154
316
  },
155
- methods: {
156
- handlePrivacy(code) {
157
- let params = `page_id=${this.pageAttr["page_id"]}`;
158
- params = `${params}&container_id=${this.containerId}${code}`;
159
- this.$xdUniHelper.navigateTo({
160
- url: `/pages/content/content?${params}`
161
- })
162
- },
163
317
 
164
- onJfbLoad(options) {
165
- this.auth_code = options.auth_code;
166
- this.provider_id = options.provider_id;
167
- this.callback_url = options.callback_url;
168
- },
169
- /**
170
- * @description 监听事件变化
171
- * @param container {object} 业务组件对象自己
172
- */
173
- init(container) {
174
- //this.bgcolor = getContainerPropsValue(value, 'content.bgcolor', '#fff');
175
- //this.height = getContainerPropsValue(value, 'content.height', 10);
176
- },
177
- reGetCode(){
178
- this.$xdLog.setProject('get.code.handle', {
179
- time: this.time,
180
- jfbTimeer: this.jfbTimeer
318
+ onJfbLoad(options) {
319
+ this.auth_code = options.auth_code;
320
+ this.provider_id = options.provider_id;
321
+ this.callback_url = options.callback_url;
322
+ },
323
+ /**
324
+ * @description 监听事件变化
325
+ * @param container {object} 业务组件对象自己
326
+ */
327
+ init(value) {
328
+ this.inputStyle = getContainerPropsValue(
329
+ value,
330
+ "content.inputStyle",
331
+ "linear"
332
+ );
333
+ this.formBorderColor = getContainerPropsValue(
334
+ value,
335
+ "content.formBorderColor",
336
+ "#F9F9F9"
337
+ );
338
+ this.is_show_skip = getContainerPropsValue(
339
+ value,
340
+ "content.is_show_skip",
341
+ "Y"
342
+ );
343
+ this.formBorderWidth = getContainerPropsValue(
344
+ value,
345
+ "content.formBorderWidth",
346
+ "1"
347
+ );
348
+ this.formBgColor = getContainerPropsValue(
349
+ value,
350
+ "content.formBgColor",
351
+ "#FFFFFF"
352
+ );
353
+ this.formPadding = getContainerPropsValue(value, "content.formPadding", {
354
+ top: 20,
355
+ left: 20,
356
+ right: 20,
357
+ bottom: 20,
358
+ });
359
+ this.formMargin = getContainerPropsValue(value, "content.formMargin", {top: 0, left: 0, right: 0, bottom: 0});
360
+ this.formRadius = getContainerPropsValue(value, "content.formRadius", '0');
361
+ this.formWrapBorderColor = getContainerPropsValue(value, "content.formWrapBorderColor", '#F9F9F9');
362
+ this.formWrapBorderWidth = getContainerPropsValue(value, "content.formWrapBorderWidth", '0');
363
+ this.formShadowColor = getContainerPropsValue(value, "content.formShadowColor", '#F9F9F9');
364
+ this.formShadowW = getContainerPropsValue(value, "content.formShadowW", '0');
365
+ this.labelAlign = getContainerPropsValue(
366
+ value,
367
+ "content.labelAlign",
368
+ "left"
369
+ );
370
+ this.labelPosition = getContainerPropsValue(
371
+ value,
372
+ "content.labelPosition",
373
+ "left"
374
+ );
375
+ this.labelWidth = getContainerPropsValue(
376
+ value,
377
+ "content.labelWidth",
378
+ "180"
379
+ );
380
+ this.phoneIcon = getContainerPropsValue(value, "content.phoneIcon", "");
381
+ this.codeIcon = getContainerPropsValue(value, "content.codeIcon", "");
382
+ this.passwordIcon = getContainerPropsValue(
383
+ value,
384
+ "content.passwordIcon",
385
+ ""
386
+ );
387
+ this.labelFont = getContainerPropsValue(value, "content.labelFont", {});
388
+ this.placeholderFont = getContainerPropsValue(
389
+ value,
390
+ "content.placeholderFont",
391
+ {}
392
+ );
393
+ this.contentFont = getContainerPropsValue(
394
+ value,
395
+ "content.contentFont",
396
+ {}
397
+ );
398
+ this.getCodeFont = getContainerPropsValue(
399
+ value,
400
+ "content.getCodeFont",
401
+ {}
402
+ );
403
+ this.getCodeShowType = getContainerPropsValue(
404
+ value,
405
+ "content.getCodeShowType",
406
+ "text"
407
+ );
408
+ this.btnMargin = getContainerPropsValue(value, "content.btnMargin", {});
409
+ this.btnRadius = getContainerPropsValue(value, "content.btnRadius", "20");
410
+ this.phonePlaceholder = getContainerPropsValue(
411
+ value,
412
+ "content.phonePlaceholder",
413
+ "请输入手机号"
414
+ );
415
+ this.codePlaceholder = getContainerPropsValue(
416
+ value,
417
+ "content.codePlaceholder",
418
+ "请输入验证码"
419
+ );
420
+ let agreeFont = getContainerPropsValue(value, "content.agreeFont", {});
421
+ if (!agreeFont.color) {
422
+ agreeFont.color = "#666";
423
+ }
424
+ this.agreeFont = agreeFont;
425
+ let privacyFont = getContainerPropsValue(
426
+ value,
427
+ "content.privacyFont",
428
+ {}
429
+ );
430
+ if (!privacyFont.color) {
431
+ privacyFont.color = this.mainColor;
432
+ }
433
+ this.privacyFont = privacyFont;
434
+ this.agreementAlign = getContainerPropsValue(
435
+ value,
436
+ "content.agreementAlign",
437
+ "center"
438
+ );
439
+ this.agreePadding = getContainerPropsValue(
440
+ value,
441
+ "content.agreePadding",
442
+ {}
443
+ );
444
+ if (this.inputStyle === "face") {
445
+ this.labelPosition = "top";
446
+ this.labelAlign = "left";
447
+ }
448
+ if (this.$configProject.isPreview) {
449
+ this.formRenderKey = Date.now();
450
+ }
451
+ },
452
+ reGetCode() {
453
+ this.$xdLog.setProject("get.code.handle", {
454
+ time: this.time,
455
+ jfbTimeer: this.jfbTimeer,
456
+ });
457
+ if (this.jfbTimeer > 0) return;
458
+ const { phone_number } = this.accountForm;
459
+ if (!/^1[3-9]\d{9}$/.test(phone_number)) {
460
+ uni.showToast({
461
+ title: "请填写正确的手机号",
462
+ icon: "none",
181
463
  });
182
- if(this.jfbTimeer > 0) return;
183
- const { phone_number } = this.accountForm;
184
- if(!/^1[3-9]\d{9}$/.test(phone_number)){
185
- uni.showToast({
186
- title: "请填写正确的手机号",
187
- icon: 'none'
188
- });
189
- return false;
190
- }
191
- this.$xdShowLoading({})
192
- console.log("jfbRootExec: sendMsg");
193
- jfbRootExec('sendMsg', {
194
- vm: this,
195
- data: {
196
- phone_number,
197
- biz_name: "login"
198
- }
199
- }).then(res => {
200
- this.$xdHideLoading()
464
+ return false;
465
+ }
466
+ this.$xdShowLoading({});
467
+ console.log("jfbRootExec: sendMsg");
468
+ jfbRootExec("sendMsg", {
469
+ vm: this,
470
+ data: {
471
+ phone_number,
472
+ biz_name: "login",
473
+ },
474
+ })
475
+ .then((res) => {
476
+ this.$xdHideLoading();
201
477
  this.jfbTimeer = 120;
202
478
  this.interval = setInterval(() => {
203
479
  this.jfbTimeer--;
204
- if(this.jfbTimeer == 0){
480
+ if (this.jfbTimeer == 0) {
205
481
  clearTimeout(this.interval);
206
482
  }
207
- }, 1000)
208
- }).catch(error=>{
209
- this.$xdHideLoading()
210
- this.$xdLog.catch(error)
483
+ }, 1000);
211
484
  })
212
- },
213
- doLoginForm(){
214
- const { auth_code, provider_id } = this;
215
- const { phone_number, verification_code } = this.accountForm;
216
- if(!phone_number || !verification_code) return uni.showToast({title: "手机号跟验证码不能为空",icon: 'none'});
217
- this.$xdShowLoading({})
218
- jfbRootExec('phoneLogin', {
219
- vm: this,
220
- data: {
221
- auth_code,
222
- provider_id,
223
- phone_number,
224
- verification_code
225
- },
226
- }).then(res => {
227
- this.$xdHideLoading()
485
+ .catch((error) => {
486
+ this.$xdHideLoading();
487
+ this.$xdLog.catch(error);
488
+ });
489
+ },
490
+ doLoginForm() {
491
+ const { auth_code, provider_id } = this;
492
+ const { phone_number, verification_code } = this.accountForm;
493
+ if (!phone_number || !verification_code)
494
+ return uni.showToast({ title: "手机号跟验证码不能为空", icon: "none" });
495
+ this.$xdShowLoading({});
496
+ jfbRootExec("phoneLogin", {
497
+ vm: this,
498
+ data: {
499
+ auth_code,
500
+ provider_id,
501
+ phone_number,
502
+ verification_code,
503
+ },
504
+ })
505
+ .then((res) => {
506
+ this.$xdHideLoading();
228
507
  let { callback_url } = this;
229
- if(callback_url) callback_url = decodeURIComponent(callback_url);
508
+ if (callback_url) callback_url = decodeURIComponent(callback_url);
230
509
  this.$xdUniHelper.redirectTo({
231
- url: callback_url || this.settings.index
232
- })
233
- }).catch(error=>{
234
- this.$xdHideLoading()
235
- this.$xdLog.catch(error)
510
+ url: callback_url || this.settings.index,
511
+ });
236
512
  })
237
- },
238
- // onJfbScroll(options) {
239
- // console.log('event.onJfbScroll', options)
240
- // },
241
- // onJfbReachBottom(options) {
242
- // console.log('event.onJfbReachBottom', options)
243
- // },
244
- // onJfbShow(options) {
245
- // console.log('event.onJfbShow', options)
246
- // },
247
- // onJfbHide(options) {
248
- // console.log('event.onJfbHide', options)
249
- // },
250
- onJfbBack(options) {
251
- this.$xdUniHelper.navigateBack();
252
- },
253
- }
254
- }
255
-
513
+ .catch((error) => {
514
+ this.$xdHideLoading();
515
+ this.$xdLog.catch(error);
516
+ });
517
+ },
518
+ // onJfbScroll(options) {
519
+ // console.log('event.onJfbScroll', options)
520
+ // },
521
+ // onJfbReachBottom(options) {
522
+ // console.log('event.onJfbReachBottom', options)
523
+ // },
524
+ // onJfbShow(options) {
525
+ // console.log('event.onJfbShow', options)
526
+ // },
527
+ // onJfbHide(options) {
528
+ // console.log('event.onJfbHide', options)
529
+ // },
530
+ onJfbBack(options) {
531
+ this.$xdUniHelper.navigateBack();
532
+ },
533
+ },
534
+ };
256
535
  </script>
257
536
 
258
537
  <style scoped lang="less">
259
- @import "./JfbBasePhoneLoginLess.less";
538
+ @import "./JfbBasePhoneLoginLess.less";
260
539
 
261
- .jfb-base-phone-login {
262
- &__body {
263
- .xd-form-checkbox {
540
+ .jfb-base-phone-login {
541
+ &__body {
542
+ // #ifdef H5
543
+ .form-item {
544
+ ::v-deep &.uni-forms-item {
545
+ // padding-left: unit(30,rpx) !important;
546
+ .uni-input-input{
547
+ font-size: var(--content-font-size);
548
+ color: var(--content-font-color);
549
+ font-weight: var(--content-font-weight);
550
+ }
551
+ .label-text {
552
+ font-size: var(--label-font-size) !important;
553
+ color: var(--label-font-color) ;
554
+ font-weight: var(--label-font-weight);
555
+ }
556
+ .uni-easyinput__placeholder-class{
557
+ font-size: var(--placeholder-font-size);
558
+ color: var(--placeholder-font-color);
559
+ font-weight: var(--placeholder-font-weight);
560
+ }
561
+ }
562
+ &.linear{
563
+ ::v-deep &.uni-forms-item--border{
564
+ border-color: var(--form-border-color) !important;
565
+ border-width: var(--form-border-width) !important;
566
+ }
567
+ }
568
+ &.face{
569
+ ::v-deep .uni-forms-item__content{
570
+ background: #F7F7F7;
571
+ border-radius: 16rpx;
572
+ }
573
+ ::v-deep &.uni-forms-item--border{
574
+ border: none;
575
+ }
576
+
577
+ }
578
+ }
579
+ // #endif
580
+
581
+ // #ifdef MP
582
+ ::v-deep .uni-forms-item {
583
+ // padding-left: 30rpx !important;
584
+ .uni-input-input{
585
+ font-size: var(--content-font-size);
586
+ color: var(--content-font-color);
587
+ font-weight: var(--content-font-weight);
588
+ }
589
+ .label-text {
590
+ font-size: var(--label-font-size);
591
+ color: var(--label-font-color);
592
+ font-weight: var(--label-font-weight);
593
+ }
594
+ .uni-easyinput__placeholder-class{
595
+ font-size: var(--placeholder-font-size);
596
+ color: var(--placeholder-font-color);
597
+ font-weight: var(--placeholder-font-weight);
598
+ }
599
+ }
600
+ .linear{
601
+ ::v-deep .uni-forms-item--border{
602
+ border-top: none !important;
603
+ border-bottom: var(--form-border-width) solid var(--form-border-color) !important;
604
+ }
605
+ }
606
+ .face{
607
+ ::v-deep .uni-forms-item__content{
608
+ background: #F7F7F7;
609
+ border-radius: 16rpx;
610
+ }
611
+ ::v-deep .uni-forms-item--border{
612
+ border: none;
613
+ }
614
+ }
615
+ // #endif
616
+ .xd-form-checkbox {
264
617
  /deep/ .checklist-content .checklist-text {
265
618
  font-size: 26rpx !important;
266
619
  }
267
620
  }
268
621
 
269
622
  .xd-form-checkbox {
270
- /deep/ .checklist-box {
271
- margin: 0 !important;
623
+ ::v-deep .checklist-box {
624
+ margin: 0;
625
+ align-items: var(--agreement-align);
272
626
  }
273
627
  }
274
628
  .xd-form-checkbox {
@@ -279,7 +633,7 @@
279
633
 
280
634
  .xd-form-checkbox {
281
635
  /deep/ .checklist-text {
282
- margin-left: unit(20,rpx) !important;
636
+ margin-left: unit(20, rpx) !important;
283
637
  }
284
638
  }
285
639
 
@@ -287,95 +641,97 @@
287
641
  padding: 40rpx 70rpx;
288
642
  }
289
643
 
290
- .get_code {
291
- color: @xd-base-color;
292
- font-size: 24rpx;
644
+ .get_code {
645
+ color: @xd-base-color;
646
+ font-size: 24rpx;
647
+ margin-right: unit(20, rpx);
648
+ padding: 10rpx 24rpx;
649
+ border: 1px solid @xd-base-color;
650
+ border-radius: 40rpx;
651
+ white-space: nowrap;
652
+ }
653
+ .panel-login-password {
654
+ /deep/ .uni-forms-item__label {
655
+ font-size: 26rpx;
656
+ color: #a6a6a6;
293
657
  }
294
- .panel-login-password {
295
- /deep/ .uni-forms-item__label {
296
- .label-text {
297
- font-size: 26rpx;
298
- color: #A6A6A6;
299
- }
300
- }
301
658
 
302
- /deep/ .uni-easyinput__placeholder-class {
303
- font-size: 26rpx;
304
- color: #D4D4D4;
305
- }
659
+ /deep/ .uni-easyinput__placeholder-class {
660
+ font-size: 26rpx;
661
+ color: #d4d4d4;
662
+ }
306
663
 
307
- .phone-login-type {
308
- display: flex;
309
- color: #808080;
310
- font-size: 32rpx;
311
- padding: 20rpx 70rpx;
312
- align-items: center;
664
+ .phone-login-type {
665
+ display: flex;
666
+ color: #808080;
667
+ font-size: 32rpx;
668
+ padding: 20rpx 70rpx;
669
+ align-items: center;
313
670
 
314
- ._item {
315
- margin: 0 30rpx;
316
- position: relative;
317
- line-height: 2;
671
+ ._item {
672
+ margin: 0 30rpx;
673
+ position: relative;
674
+ line-height: 2;
318
675
 
319
- &:first-child {
320
- margin-left: 0;
321
- }
676
+ &:first-child {
677
+ margin-left: 0;
678
+ }
322
679
 
323
- &.active {
324
- color: #383838;
325
- font-size: 36rpx;
680
+ &.active {
681
+ color: #383838;
682
+ font-size: 36rpx;
326
683
 
327
- text {
328
- position: absolute;
329
- height: 6rpx;
330
- width: 90rpx;
331
- border-radius: 6rpx;
332
- left: 50%;
333
- bottom: 0;
334
- transform: translateX(-50%);
335
- }
684
+ text {
685
+ position: absolute;
686
+ height: 6rpx;
687
+ width: 90rpx;
688
+ border-radius: 6rpx;
689
+ left: 50%;
690
+ bottom: 0;
691
+ transform: translateX(-50%);
336
692
  }
337
693
  }
338
694
  }
695
+ }
339
696
 
340
- .forget_password {
341
- font-size: 24rpx;
342
- color: #A6A6A6;
343
- text-align: right;
344
- margin: 20rpx 70rpx 0 0;
345
-
346
- }
697
+ .forget_password {
698
+ font-size: 24rpx;
699
+ color: #a6a6a6;
700
+ text-align: right;
701
+ margin: 20rpx 70rpx 0 0;
702
+ }
347
703
 
348
- .not_login {
349
- position: fixed;
350
- width: 100%;
351
- text-align: center;
352
- bottom: 100rpx;
353
- font-size: 24rpx;
354
- color: #FE7A63;
355
- }
704
+ .not_login {
705
+ position: fixed;
706
+ width: 100%;
707
+ text-align: center;
708
+ bottom: 100rpx;
709
+ font-size: 24rpx;
710
+ color: #fe7a63;
356
711
  }
357
712
  }
358
713
  }
359
- .flex{
360
- display: flex;
361
- }
362
- .flex-sub{
363
- flex: 1;
364
- }
365
- .align-center{
366
- align-items: center;
367
- }
368
- /* #ifdef MP-WEIXIN */
369
- /deep/ .xd-form-checkbox .checklist-group {
370
- justify-content: center;
371
- display: flex;
372
- align-items: center;
373
- }
374
- .text-content {
375
- width: 100%;
376
- & > text {
377
- font-size: 26rpx;
378
- }
714
+ }
715
+ .flex {
716
+ display: flex;
717
+ }
718
+ .flex-sub {
719
+ flex: 1;
720
+ }
721
+ .align-center {
722
+ align-items: center;
723
+ }
724
+ /* #ifdef MP-WEIXIN */
725
+ /deep/ .xd-form-checkbox .checklist-group {
726
+ justify-content: center;
727
+ display: flex;
728
+ align-items: center;
729
+ }
730
+ .text-content {
731
+ width: 100%;
732
+ & > text {
733
+ font-size: 26rpx;
379
734
  }
380
- /* #endif */
735
+ }
736
+ /* #endif */
381
737
  </style>