您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

welcome.page.ts 813 B

12345678910111213141516171819202122232425262728293031323334
  1. import { Component, OnInit } from '@angular/core';
  2. import { Location } from '@angular/common';
  3. @Component({
  4. selector: 'app-welcome',
  5. templateUrl: './welcome.page.html',
  6. styleUrls: ['./welcome.page.scss'],
  7. })
  8. export class WelcomePage implements OnInit {
  9. user: any;
  10. constructor(
  11. private location: Location
  12. ) { }
  13. ngOnInit() {
  14. if (localStorage.getItem('FBUser')) {
  15. this.user = JSON.parse(localStorage.getItem('FBUser'));
  16. setTimeout(() => {
  17. this.location.back();
  18. setTimeout(() => {
  19. location.reload();
  20. }, 200);
  21. }, 3000);
  22. } else {
  23. this.user = null;
  24. this.location.back();
  25. }
  26. }
  27. }