From 9c825ca87a14ae5a692bc67e8dc6741cbf32500c Mon Sep 17 00:00:00 2001 From: geek Date: Wed, 16 May 2018 15:01:30 +0900 Subject: [PATCH] recaptcha --- .../component/signup/signup.component.html | 2 - .../component/signup/signup.component.ts | 82 +------------------ src/packages/member/member.module.ts | 1 - 3 files changed, 1 insertion(+), 84 deletions(-) diff --git a/src/packages/member/component/signup/signup.component.html b/src/packages/member/component/signup/signup.component.html index 3b91add..67175dc 100644 --- a/src/packages/member/component/signup/signup.component.html +++ b/src/packages/member/component/signup/signup.component.html @@ -82,9 +82,7 @@ Privacy Policy
- - = new EventEmitter(); - // @Output() onExpire: EventEmitter = new EventEmitter(); constructor( private router: Router, private formBuilder: FormBuilder, private store: Store, - public el: ElementRef, - public _zone: NgZone, ) { } - ngAfterViewInit() { - // console.log('ddddd'); - } - - ngAfterContentInit() { - // if ((window).grecaptcha) { - // console.log((window).grecaptcha); - // this.init(); - // } else { - // (window)[this.initCallback] = () => { - // this.init(); - // }; - // } - } - - init() { - // console.log(this.el.nativeElement.children[2]); - // console.log((window).grecaptcha.render()); - // - // - // - // this._instance = (window).grecaptcha.render(this.el.nativeElement.children[2], { - // 'sitekey': this.siteKey, - // 'theme': this.theme, - // 'type': this.type, - // 'size': this.size, - // 'tabindex': this.tabindex, - // 'hl': this.language, - // 'callback': (response: string) => {this._zone.run(() => this.recaptchaCallback(response)); }, - // 'expired-callback': () => {this._zone.run(() => this.recaptchaExpiredCallback()); }, - // }); - } ngOnInit() { this.initForm(); } ngOnDestroy() { - // if (this._instance != null) { - // (window).grecaptcha.reset(this._instance); - // } - } - - reset() { - // if (this._instance === null) - // return; - // - // (window).grecaptcha.reset(this._instance); } initForm() { @@ -197,20 +131,6 @@ export class SignupComponent implements OnInit, AfterViewInit, AfterContentInit, this.policyDisplay = false; } - // showResponse(event) { - // this.msgs = []; - // this.msgs.push({severity: 'info', summary: 'Succees', detail: 'User Responded'}); - // } - - recaptchaCallback(response: string) { - // this.onResponse.emit({ - // response: response - // }); - } - - recaptchaExpiredCallback() { - // this.onExpire.emit(); - } onScriptLoad() { console.log('Google reCAPTCHA loaded and is ready for use!'); } diff --git a/src/packages/member/member.module.ts b/src/packages/member/member.module.ts index 7161433..347a60a 100644 --- a/src/packages/member/member.module.ts +++ b/src/packages/member/member.module.ts @@ -9,7 +9,6 @@ import { COMPONENTS } from './component'; import { SERVICES } from './service'; import { PrimeNGModules } from '../commons/prime-ng/prime-ng.module'; import { QRCodeModule } from 'angularx-qrcode'; -import { CaptchaModule } from 'primeng/captcha'; import { RecaptchaModule } from 'angular-google-recaptcha'; @NgModule({