From bc33f3fbd3179346c438ed0bc04528cc867e1e49 Mon Sep 17 00:00:00 2001 From: username <1105965053@qq.com> Date: Sun, 20 Sep 2020 17:05:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 75e2f4a..75659d8 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -6,6 +6,7 @@ import { OutlineFilter } from 'pixi-filters'; import { CanvasShareDataService, GameMode } from '../canvas-share-data.service'; import {CacheTokenService} from '../http-interceptors/cache-token.service' //引入自动登录 获取token服务 import * as ObjectID from 'bson-objectid'; +import { Router } from '@angular/router'; @Component({ @@ -16,7 +17,7 @@ import * as ObjectID from 'bson-objectid'; export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterViewInit { - constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService, public token: CacheTokenService) { + constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService, public token: CacheTokenService,private router: Router,) { super(); } @@ -110,6 +111,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // 根据ID 找到数据 //是否登录 + public verificationURL = '/ui/collectionTools' //验证url地址是否为验证页面 isLogin () { let token = sessionStorage.getItem('token') // 判断 是否登录状态 if (token) { @@ -228,7 +230,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV backgroundColor: 0xE9FAFF }); this.content.nativeElement.appendChild(this.app.view); - this.isLogin() + let url = this.router.url + url == this.verificationURL? this.isLogin() : null this.createBackgroundImage(); // this.createPreviewSinglePointIcon();