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();