jufubao-base 1.0.242 → 1.0.243-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.242",
3
+ "version": "1.0.243-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -157,10 +157,12 @@
157
157
  },
158
158
  handleBindCard(){
159
159
  if(!this.cardForm.valid_code){
160
- uni.showToast({
161
- title: "请输入验证码",
162
- icon: "none"
163
- })
160
+ this.$xdAlert({
161
+ content: '请输入验证码',
162
+ time: 2500,
163
+ isClose: false,
164
+ zIndex: 5000
165
+ });
164
166
  return;
165
167
  }
166
168
  jfbRootExec("pwdCardBind", {
@@ -265,10 +265,12 @@ export default {
265
265
  this.dialogShow = false;
266
266
  this.handleConfirm();
267
267
  }else{
268
- uni.showToast({
269
- title: "签名不能为空",
270
- icon: "none"
271
- })
268
+ this.$xdAlert({
269
+ content: '签名不能为空',
270
+ time: 2500,
271
+ isClose: false,
272
+ zIndex: 5000
273
+ });
272
274
  }
273
275
  }
274
276
  })
@@ -410,16 +412,20 @@ export default {
410
412
  },
411
413
  handleSendCode() {
412
414
  if (this.phoneNumber.length < 11) {
413
- uni.showToast({
414
- title: "请输入11位手机号",
415
- icon: "none",
415
+ this.$xdAlert({
416
+ content: '请输入11位手机号',
417
+ time: 2500,
418
+ isClose: false,
419
+ zIndex: 5000
416
420
  });
417
421
  return;
418
422
  }
419
423
  if (!this.validatePhoneNumber(this.phoneNumber)) {
420
- uni.showToast({
421
- title: "手机号格式不正确",
422
- icon: "none",
424
+ this.$xdAlert({
425
+ content: '手机号格式不正确',
426
+ time: 2500,
427
+ isClose: false,
428
+ zIndex: 5000
423
429
  });
424
430
  return;
425
431
  }
@@ -890,9 +890,11 @@ export default {
890
890
  if (this.time > 0) return;
891
891
  const { phone_number } = this.accountForm;
892
892
  if (!/^1[3-9]\d{9}$/.test(phone_number)) {
893
- uni.showToast({
894
- title: "请填写正确的手机号",
895
- icon: "none",
893
+ this.$xdAlert({
894
+ content: '请填写正确的手机号',
895
+ time: 2500,
896
+ isClose: false,
897
+ zIndex: 5000
896
898
  });
897
899
  return false;
898
900
  }
@@ -1028,9 +1030,11 @@ export default {
1028
1030
  else if (accountLoginType === "pwd" && !password)
1029
1031
  err_tip = "密码不能为空";
1030
1032
  if (err_tip) {
1031
- return uni.showToast({
1032
- title: err_tip,
1033
- icon: "none",
1033
+ return this.$xdAlert({
1034
+ content: err_tip,
1035
+ time: 2500,
1036
+ isClose: false,
1037
+ zIndex: 5000
1034
1038
  });
1035
1039
  }
1036
1040
 
@@ -154,9 +154,11 @@ export default {
154
154
  if (this.time > 0) return;
155
155
  const { phone_number } = this.resetForm;
156
156
  if (!/^1[3-9]\d{9}$/.test(phone_number)) {
157
- uni.showToast({
158
- title: "请填写正确的手机号",
159
- icon: "none",
157
+ this.$xdAlert({
158
+ content: '请填写正确的手机号',
159
+ time: 2500,
160
+ isClose: false,
161
+ zIndex: 5000
160
162
  });
161
163
  return false;
162
164
  }
@@ -185,9 +187,11 @@ export default {
185
187
  toResetPassword() {
186
188
  const { verification_code, phone_number } = this.resetForm;
187
189
  if (!verification_code || !phone_number) {
188
- return uni.showToast({
189
- title: "填写手机号跟验证码",
190
- icon: "none",
190
+ return this.$xdAlert({
191
+ content: '填写手机号跟验证码',
192
+ time: 2500,
193
+ isClose: false,
194
+ zIndex: 5000
191
195
  });
192
196
  }
193
197
  jfbRootExec("verifyPhoneCode", {
@@ -138,8 +138,22 @@
138
138
  },
139
139
  doSetPassword(){
140
140
  const { password, confirm_password } = this.resetForm;
141
- if(!password || !confirm_password) return uni.showToast({title: "请输入密码",icon: 'none'});
142
- if(password !== confirm_password) return uni.showToast({title: "密码不一致",icon: 'none'});
141
+ if(!password || !confirm_password){
142
+ return this.$xdAlert({
143
+ content: '请输入密码',
144
+ time: 2500,
145
+ isClose: false,
146
+ zIndex: 5000
147
+ });
148
+ }
149
+ if(password !== confirm_password){
150
+ return this.$xdAlert({
151
+ content: '密码不一致',
152
+ time: 2500,
153
+ isClose: false,
154
+ zIndex: 5000
155
+ });
156
+ }
143
157
 
144
158
  let typeFn = "resetPwd"
145
159
  if(this.pwd_type == 1) typeFn = "setPwd"
@@ -114,9 +114,11 @@
114
114
  if(res['is_ifream'] === 'Y') {
115
115
  // #ifdef MP
116
116
  if(!res.url){
117
- return uni.showToast({
118
- title: 'URL不存在',
119
- duration: 2000
117
+ return this.$xdAlert({
118
+ content: 'URL不存在',
119
+ time: 2500,
120
+ isClose: false,
121
+ zIndex: 5000
120
122
  });
121
123
  }
122
124
  this.$xdUniHelper.redirectTo({
@@ -302,10 +302,11 @@ export default {
302
302
  this.is_can_pay = is_can_pay;
303
303
  this.can_pay_message = can_pay_message;
304
304
  if(is_can_pay !== "Y"){
305
- uni.showToast({
306
- title: can_pay_message,
307
- icon: 'none',
308
- duration: 3000
305
+ this.$xdAlert({
306
+ content: can_pay_message,
307
+ time: 2500,
308
+ isClose: false,
309
+ zIndex: 5000
309
310
  });
310
311
  reject();
311
312
  // this.$xdNavigateBack()
@@ -368,9 +369,11 @@ export default {
368
369
  let {login_providers = []} = this.projectAttr;
369
370
  console.log(this.projectAttr)
370
371
  if (+payInfo.channel_amount > 0 && !this.channel_provider_id) {
371
- uni.showToast({
372
- title: "请选择支付方式",
373
- icon: "none",
372
+ this.$xdAlert({
373
+ content: '请选择支付方式',
374
+ time: 2500,
375
+ isClose: false,
376
+ zIndex: 5000
374
377
  });
375
378
  return false;
376
379
  }
@@ -442,23 +445,32 @@ export default {
442
445
  success: (res) => {
443
446
  this.$xdLog.setARMSInfo({options:this.options, res}, 'pay_success');
444
447
  console.log("pay success", res);
445
- uni.showToast({
446
- title: "支付成功",
448
+ this.$xdAlert({
449
+ content: '支付成功',
450
+ time: 2500,
451
+ isClose: false,
452
+ zIndex: 5000
447
453
  });
448
454
  cb(res);
449
455
  },
450
456
  cancel: () => {
451
457
  this.$xdLog.setARMSInfo(this.options, 'cancel_pay');
452
- uni.showToast({
453
- title: "取消支付",
458
+ this.$xdAlert({
459
+ content: '取消支付',
460
+ time: 2500,
461
+ isClose: false,
462
+ zIndex: 5000
454
463
  });
455
464
  },
456
465
  fail: (error) => {
457
466
  if (typeof error === 'string') error = {error: error}
458
467
  if (window['jwxJfbSDKParams']) error = Object.assign(error, paySignData, window['jwxJfbSDKParams'])
459
468
  this.$xdLog.setARMSError(error)
460
- uni.showToast({
461
- title: "支付失败",
469
+ this.$xdAlert({
470
+ content: '支付失败',
471
+ time: 2500,
472
+ isClose: false,
473
+ zIndex: 5000
462
474
  });
463
475
  },
464
476
  });
@@ -468,9 +480,11 @@ export default {
468
480
  ...paySignData,
469
481
  success: (res) => {
470
482
  this.$xdLog.setARMSInfo({options: this.options, res}, 'pay_success');
471
- uni.showToast({
472
- title: "支付成功",
473
- icon: "none",
483
+ this.$xdAlert({
484
+ content: '支付成功',
485
+ time: 2500,
486
+ isClose: false,
487
+ zIndex: 5000
474
488
  });
475
489
  cb(res);
476
490
  },
@@ -479,9 +493,11 @@ export default {
479
493
  options: this.options,
480
494
  error: JSON.stringify(err)
481
495
  });
482
- uni.showToast({
483
- title: "支付失败",
484
- icon: "none",
496
+ this.$xdAlert({
497
+ content: '支付失败',
498
+ time: 2500,
499
+ isClose: false,
500
+ zIndex: 5000
485
501
  });
486
502
  },
487
503
  });
@@ -395,9 +395,11 @@ export default {
395
395
  if (this.jfbTimeer > 0) return;
396
396
  const { phone_number } = this.accountForm;
397
397
  if (!/^1[3-9]\d{9}$/.test(phone_number)) {
398
- uni.showToast({
399
- title: "请填写正确的手机号",
400
- icon: "none",
398
+ this.$xdAlert({
399
+ content: '请填写正确的手机号',
400
+ time: 2500,
401
+ isClose: false,
402
+ zIndex: 5000
401
403
  });
402
404
  return false;
403
405
  }
@@ -434,8 +436,22 @@ export default {
434
436
  doLoginForm() {
435
437
  const { provider_id } = this;
436
438
  const { phone_number, verification_code, user_name } = this.accountForm;
437
- if (!phone_number || !verification_code) return uni.showToast({ title: "手机号跟验证码不能为空", icon: "none" });
438
- if(this.isCollectUsername && !user_name) return uni.showToast({ title: "用户名不能为空", icon: "none" });
439
+ if (!phone_number || !verification_code) {
440
+ return this.$xdAlert({
441
+ content: '手机号跟验证码不能为空',
442
+ time: 2500,
443
+ isClose: false,
444
+ zIndex: 5000
445
+ });
446
+ }
447
+ if(this.isCollectUsername && !user_name){
448
+ return this.$xdAlert({
449
+ content: '用户名不能为空',
450
+ time: 2500,
451
+ isClose: false,
452
+ zIndex: 5000
453
+ });
454
+ }
439
455
 
440
456
  this.$xdShowLoading({})
441
457
  jfbRootExec("phoneCollect", {
@@ -133,27 +133,16 @@
133
133
  >暂不登录,去逛逛</view> -->
134
134
  </view>
135
135
  <xd-dialog :show.sync="showDialog"
136
+ title="系统提示"
136
137
  :showClose="false"
137
- maskAutoClose
138
- :showTitle="false">
138
+ :btnRadius="60"
139
+ maskAutoClose>
139
140
  <view class="p_dialog_content">
140
- <view class="">
141
- <xd-font-icon icon="iconmingchengtubiao" :size="48" color="#666"></xd-font-icon>
142
- </view>
143
- <view class="cont_text">检测到短信发送异常<br/>是否跳过手机号收集?</view>
141
+ <view class="cont_text">检测到短信发送异常<br/>您是否跳过当前步骤</view>
144
142
  </view>
145
- <view slot="btn" class="btn_foot" style="background-color: #DDD;">
146
- <view class="btn_item not_jump_btn" :style="{
147
- backgroundColor: '#FFF',
148
- }"
149
- @click="p_loginNotJump"
150
- >不跳过</view>
151
- <view class="btn_item" :style="{
152
- backgroundColor: mainColor,
153
- color: '#FFF'
154
- }"
155
- @click="p_loginJumpPhone"
156
- >跳过</view>
143
+ <view slot="btn" class="btn_foot">
144
+ <xd-button width="240rpx" type="info" @click="p_loginNotJump">取消</xd-button>
145
+ <xd-button width="240rpx" type="primary" @click="p_loginJumpPhone">跳过</xd-button>
157
146
  </view>
158
147
  </xd-dialog>
159
148
  </view>
@@ -508,9 +497,11 @@ export default {
508
497
  if (this.jfbTimeer > 0) return;
509
498
  const { phone_number } = this.accountForm;
510
499
  if (!/^1[3-9]\d{9}$/.test(phone_number)) {
511
- uni.showToast({
512
- title: "请填写正确的手机号",
513
- icon: "none",
500
+ this.$xdAlert({
501
+ content: '请填写正确的手机号',
502
+ time: 2500,
503
+ isClose: false,
504
+ zIndex: 5000
514
505
  });
515
506
  return false;
516
507
  }
@@ -583,10 +574,20 @@ export default {
583
574
  const { auth_code, provider_id } = this;
584
575
  const { phone_number, verification_code, user_name } = this.accountForm;
585
576
  if (!phone_number || !verification_code){
586
- return uni.showToast({ title: "手机号跟验证码不能为空", icon: "none" });
577
+ return this.$xdAlert({
578
+ content: '手机号跟验证码不能为空',
579
+ time: 2500,
580
+ isClose: false,
581
+ zIndex: 5000
582
+ });
587
583
  }
588
584
  if(this.isCollectUsername && !user_name){
589
- return uni.showToast({ title: "用户名不能为空", icon: "none" });
585
+ return this.$xdAlert({
586
+ content: '用户名不能为空',
587
+ time: 2500,
588
+ isClose: false,
589
+ zIndex: 5000
590
+ });
590
591
  }
591
592
  this.$xdShowLoading({});
592
593
  jfbRootExec("phoneLogin", {
@@ -653,12 +654,12 @@ export default {
653
654
  ::v-deep .xd-dailog__body{
654
655
  overflow: hidden;
655
656
  }
656
- ::v-deep .xd-dailog__body-content{
657
- padding: 0;
658
- overflow: hidden;
659
- }
657
+ // ::v-deep .xd-dailog__body-content{
658
+ // padding: 0;
659
+ // overflow: hidden;
660
+ // }
660
661
  .p_dialog_content{
661
- padding: 100rpx 0rpx;
662
+ padding: 20rpx 0rpx;
662
663
  display: flex;
663
664
  align-items: center;
664
665
  justify-content: center;
@@ -666,7 +667,7 @@ export default {
666
667
  text-align: left;
667
668
  margin-left: 12rpx;
668
669
  font-size: 32rpx;
669
- color: #333;
670
+ color: #999999;
670
671
  }
671
672
  }
672
673
  .btn_foot{
@@ -528,10 +528,14 @@
528
528
  async toBindCardTicket(){
529
529
  console.log(this.form, 'this.form')
530
530
  const { card_password, card_number, valid_code } = this.form;
531
- if(!valid_code) return uni.showToast({
532
- title: '请输入验证码',
533
- icon: "none"
534
- })
531
+ if(!valid_code){
532
+ return this.$xdAlert({
533
+ content: '请输入验证码',
534
+ time: 2500,
535
+ isClose: false,
536
+ zIndex: 5000
537
+ });
538
+ }
535
539
  this.$xdShowLoading({});
536
540
 
537
541
  this.checkValidToken().then(() => {
@@ -556,9 +560,11 @@
556
560
  const { code } = this.form;
557
561
 
558
562
  if(!code) {
559
- uni.showToast({
560
- title: '请输入电子码',
561
- icon: "none"
563
+ this.$xdAlert({
564
+ content: '请输入电子码',
565
+ time: 2500,
566
+ isClose: false,
567
+ zIndex: 5000
562
568
  });
563
569
  return ""
564
570
  };
@@ -586,10 +592,11 @@
586
592
  if(res.is_valid){
587
593
  r();
588
594
  }else{
589
- uni.showToast({
590
- title: '验证码错误',
591
- duration: 2000,
592
- icon: "none"
595
+ this.$xdAlert({
596
+ content: '验证码错误',
597
+ time: 2500,
598
+ isClose: false,
599
+ zIndex: 5000
593
600
  });
594
601
  this.switchValidToken();
595
602
  j();
@@ -303,9 +303,11 @@ export default {
303
303
  },
304
304
  fail: function () {
305
305
  // 复制失败,提示用户
306
- uni.showToast({
307
- title: "复制失败",
308
- icon: "none",
306
+ this.$xdAlert({
307
+ content: '复制失败',
308
+ time: 2500,
309
+ isClose: false,
310
+ zIndex: 5000
309
311
  });
310
312
  },
311
313
  });