Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -105,7 +105,7 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit | ||||
|     const params = { | ||||
|       // phoneNumber: phone | ||||
|     }; | ||||
|     this.service.request(this.service.$api_get_current_user_info, params, 'POST', true, 'FORM').subscribe((res) => { | ||||
|     this.service.request(this.service.$api_get_current_user_smVerification, params, 'POST', true, 'FORM').subscribe((res) => { | ||||
|       console.log(res); | ||||
|       // code==503046 弹出网易盾 | ||||
|       if (res && res.code === '1') { | ||||
|  | ||||
| @ -7,17 +7,18 @@ | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\account\components\edit\edit.component.ts | ||||
|  */ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { FormBuilder, FormGroup, Validators,ValidatorFn } from '@angular/forms'; | ||||
| import { FormBuilder, FormGroup, Validators, ValidatorFn } from '@angular/forms'; | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'; | ||||
| import { NzFormTooltipIcon } from 'ng-zorro-antd/form'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { AccountService } from '../../services/account.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-account-components-edit', | ||||
|   templateUrl: './edit-password.component.html', | ||||
|   templateUrl: './edit-password.component.html' | ||||
| }) | ||||
| export class AccountComponentsCenterEditComponent implements OnInit { | ||||
|   url = `/rule?_allow_anonymous=true`; | ||||
| @ -40,8 +41,8 @@ export class AccountComponentsCenterEditComponent implements OnInit { | ||||
|     public ar: ActivatedRoute, | ||||
|     private modalRef: NzModalRef, | ||||
|     private fb: FormBuilder, | ||||
|   ) { | ||||
|   } | ||||
|     public service: AccountService | ||||
|   ) {} | ||||
|  | ||||
|   ngOnInit() { | ||||
|     this.validateForm = this.fb.group({ | ||||
| @ -51,11 +52,11 @@ export class AccountComponentsCenterEditComponent implements OnInit { | ||||
|           Validators.required, | ||||
|           Validators.maxLength(16), | ||||
|           Validators.minLength(8), | ||||
|           Validators.pattern('^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z-_]{8,16}$'), | ||||
|         ], | ||||
|           Validators.pattern('^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z-_]{8,16}$') | ||||
|         ] | ||||
|       ], | ||||
|       passWordTo: [null, [this.confirmPasswordValidator, Validators.required, Validators.maxLength(16), Validators.minLength(8)]], | ||||
|       voucher: [null, [Validators.required]], | ||||
|       voucher: [null, [Validators.required]] | ||||
|     }); | ||||
|   } | ||||
|  | ||||
| @ -63,8 +64,19 @@ export class AccountComponentsCenterEditComponent implements OnInit { | ||||
|     this.modalRef.destroy(); | ||||
|   } | ||||
|   getCaptcha(e: MouseEvent): void { | ||||
|     this.service.request(this.service.$api_get_current_user_smVerification).subscribe(res => { | ||||
|       console.log(res); | ||||
|       // code==503046 弹出网易盾 | ||||
|       if (res && res.code === '1') { | ||||
|         this.service.msgSrv.success('发送成功'); | ||||
|         e.preventDefault(); | ||||
|     this.codeCountDown() | ||||
|         this.codeCountDown(); | ||||
|       } else if (res.code === '503046') { | ||||
|         // this.dun.popUp(); | ||||
|       } else { | ||||
|         this.service.msgSrv.success(res.msg); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   save() { | ||||
|     // const params = { id: this.record.id, name: this.validateForm.value.name }; | ||||
|  | ||||
| @ -20,6 +20,9 @@ export class AccountService extends BaseService { | ||||
|  | ||||
|   // 获取当前登录用户详情 | ||||
|   $api_get_current_user_info = `/api/mdc/cuc/user/getUserInfo`; | ||||
|  | ||||
|   // 根据当前登录用户绑定的手机号码获取短信验证码 | ||||
|   $api_get_current_user_smVerification = `/api/mdc/pbc/smsSend/getSmVerificationCodeByToken`; | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|   } | ||||
|  | ||||
| @ -108,7 +108,7 @@ export class UserRetrievePasswordComponent implements OnInit, AfterViewInit { | ||||
|  | ||||
|   submitForm2() { | ||||
|     for (const i in this.formGroup2.controls) { | ||||
|       if ( this.formGroup2.controls[i]) { | ||||
|       if (this.formGroup2.controls[i]) { | ||||
|         this.formGroup2.controls[i].markAsDirty(); | ||||
|         this.formGroup2.controls[i].updateValueAndValidity(); | ||||
|       } | ||||
| @ -145,8 +145,8 @@ export class UserRetrievePasswordComponent implements OnInit, AfterViewInit { | ||||
|       return; | ||||
|     } | ||||
|     if (this.formGroup1.value.phone) { | ||||
|       this.service.http | ||||
|         .post(`${this.service.$getAccountSMVerificationCode}`, null, { phoneNumber: this.formGroup1.value.phone }) | ||||
|       this.service | ||||
|         .request(`${this.service.$api_send_sms_by_mobile}`, { phoneNumber: this.formGroup1.value.phone }) | ||||
|         .subscribe((res: any) => { | ||||
|           // console.log(res, 'res'); | ||||
|           if (res.success) { | ||||
|  | ||||
| @ -14,7 +14,7 @@ import { BaseService } from '../core/base.service'; | ||||
| }) | ||||
| export class EACaptchaService extends BaseService { | ||||
|   // 通过手机号发送短信验证码 | ||||
|   private $api_send_sms_by_mobile = `/scm/sms/sms/verification/getSMVerificationCode?_allow_anonymous=true&_allow_badcode=true`; | ||||
|   private $api_send_sms_by_mobile = `/api/mdc/pbc/smsSend/getSMVerificationCode?_allow_anonymous=true&_allow_badcode=true`; | ||||
|  | ||||
|   // 验证手机号为平台用户后发送短信验证码 | ||||
|   private $api_send_sms__by_validate_mobile = `/chiauserBasicInfo/forgetPassword/getAccountSMVerificationCode`; | ||||
|  | ||||
| @ -38,8 +38,8 @@ export class EAUserService extends BaseService { | ||||
|   public $api_get_agreement_info = `/scce/pbc/pbc/agreementInfo/getAgreementInfoByType?_allow_anonymous=true`; | ||||
|   // 未登录验证身份 | ||||
|   public $forgetPasswordVerifyIdentity = `/scm/cuc/cuc/userBasicInfo/forgetPassword/verifyIdentity?_allow_anonymous=true`; | ||||
|   // 未登录账号发送验证码 | ||||
|   public $getAccountSMVerificationCode = `/scm/cuc/cuc/userBasicInfo/forgetPassword/getAccountSMVerificationCode?_allow_anonymous=true`; | ||||
|   // 通过手机号发送短信验证码 | ||||
|   public $api_send_sms_by_mobile = `/api/mdc/pbc/smsSend/getSMVerificationCode?_allow_anonymous=true&_allow_badcode=true`; | ||||
|   // 未设置密码的用户设置用户密码 | ||||
|   public $api_set_password = `/scce/cuc/cuc/userBasicInfo/setPassword`; | ||||
|   // 凭证修改密码 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user