From a3a8c23b196980732a795713a5eb5fe0c7075bf9 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Wed, 11 Jul 2018 21:47:13 +0800 Subject: [PATCH] Revert "提交" --- src/app/routes/callback/callback.component.ts | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/src/app/routes/callback/callback.component.ts b/src/app/routes/callback/callback.component.ts new file mode 100644 index 0000000..33392ad --- /dev/null +++ b/src/app/routes/callback/callback.component.ts @@ -0,0 +1,35 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { SocialService } from '@delon/auth'; + +@Component({ + selector: 'app-callback', + template: ``, + providers: [SocialService], +}) +export class CallbackComponent implements OnInit { + type: string; + + constructor( + private socialService: SocialService, + private route: ActivatedRoute, + private router: Router, + ) {} + + ngOnInit(): void { + this.route.params.subscribe(params => { + this.type = params['type']; + this.mockModel(); + }); + } + + private mockModel() { + this.socialService.callback({ + token: '123456789', + name: 'cipchk', + email: `${this.type}@${this.type}.com`, + id: 10000, + time: +new Date(), + }); + } +} -- Gitblit v1.8.0