From 99554af658a50d432ff223b31bf2f7deac1104e4 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Thu, 12 Jul 2018 14:09:43 +0800
Subject: [PATCH] updates

---
 src/app/app.component.ts |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index deb9587..8879e25 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,10 +1,12 @@
 import { element } from 'protractor';
 import { LoginService } from '@business/services/http/login.service';
-import { Component, HostBinding, OnInit } from '@angular/core';
+import { Component, HostBinding, OnInit, Inject } from '@angular/core';
 import { Router, NavigationEnd, NavigationStart } from '@angular/router';
 import { ThemesService, SettingsService, TitleService } from '@delon/theme';
 import { filter } from 'rxjs/operators';
 import * as $ from 'jquery';
+import { TokenService, DA_SERVICE_TOKEN } from '@delon/auth';
+
 @Component({
   selector: 'app-root',
   template: `<router-outlet></router-outlet>`
@@ -20,10 +22,20 @@
     private settings: SettingsService,
     private router: Router,
     private titleSrv: TitleService,
-    private loginService: LoginService) {
+    private loginService: LoginService,
+    @Inject(DA_SERVICE_TOKEN) private tokenService: TokenService) {
   }
 
   ngOnInit() {
+    // ������Token������
+    this.tokenService.set({
+      token: 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsIm9pZCI6NSwibW9kZSI6IldlYiIsInNjb3BlcyI6WyJ0ZW1wIl0sImlzcyI6Imh0dHA6Ly9tb25pdG9yLjdkcmxiLmNvbSIsImlhdCI6MTUzMTMxNjU4MCwiZXhwIjoxNTM5MDkyNTgwfQ.tWE7AqGfLwwK-nO1FUveJ8xKqpxitqG1GdhKHp9JDyRPjNDYX7ocgkEw0W2G8hKL_tJIjjrQ1pc0zvCmLTJ-pg',
+      name: 'admin',
+      email: `admin@qq.com`,
+      id: 10000,
+      time: +new Date(),
+    });
+
     this.router.events
       .pipe(filter(evt => evt instanceof NavigationEnd))
       .subscribe(() => this.titleSrv.setTitle());

--
Gitblit v1.8.0