邵佳豪 4 years ago
parent
commit
5731744b7d
  1. 11
      src/app/working-area/working-area.component.ts

11
src/app/working-area/working-area.component.ts

@ -7,7 +7,6 @@ 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';
import { isThisSecond } from 'date-fns';
import { Charm } from './charm';
@ -19,7 +18,8 @@ import { Charm } from './charm';
export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterViewInit {
constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService, public token: CacheTokenService, private router: Router, ) {
constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService,
public token: CacheTokenService, private router: Router) {
super();
}
@ -134,6 +134,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
public verificationURL = '/plan'; // 验证url地址是否为验证页面
public verificationURLTwo = '/similarPlans'; // 验证url地址是否为验证页面
count = 0;
clumn = 1;
isLogin() {
const token = sessionStorage.getItem('token'); // 判断 是否登录状态
if (token) {
@ -1611,7 +1612,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
carButton.setParent(this.app.stage);
carButton.position.set(25, this.count * 65);
if (this.count >= 12) {
this.count = 0;
this.clumn +=3;
}
carButton.position.set(this.clumn * 25, this.count * 65);
this.count++;
}
/**

Loading…
Cancel
Save