Commit 45bee5172226e8a6aa6514627e745d2a43ce302b
1 parent
445542a61c
Exists in
20200117-axion-responsive
corregir pantalla mensaje final
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
src/app/modules/mensaje-final/mensaje-final.component.ts
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; | 2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
3 | import { Router } from '@angular/router'; | 3 | import { Router } from '@angular/router'; |
4 | 4 | ||
5 | @Component({ | 5 | @Component({ |
6 | selector: 'app-mensaje-final', | 6 | selector: 'app-mensaje-final', |
7 | templateUrl: './mensaje-final.component.html', | 7 | templateUrl: './mensaje-final.component.html', |
8 | styleUrls: ['./mensaje-final.component.scss'] | 8 | styleUrls: ['./mensaje-final.component.scss'] |
9 | }) | 9 | }) |
10 | export class MensajeFinalComponent implements OnInit { | 10 | export class MensajeFinalComponent implements OnInit { |
11 | timer: any; | 11 | timer: any; |
12 | 12 | ||
13 | constructor( | 13 | constructor( |
14 | public articuloService: ArticuloService, | 14 | public articuloService: ArticuloService, |
15 | private router: Router, | 15 | private router: Router, |
16 | ) { } | 16 | ) { } |
17 | 17 | ||
18 | ngOnInit() { | 18 | ngOnInit() { |
19 | this.timer = setTimeout(() => { | 19 | this.timer = setTimeout(() => { |
20 | this.goToSplash(); | 20 | this.goToSplash(); |
21 | }, 10000); | 21 | }, 10000); |
22 | $(document).ready(function() { | ||
23 | $('body').removeClass('media-pantalla'); | ||
24 | }); | ||
22 | } | 25 | } |
23 | 26 | ||
24 | ngOnDestroy() { | 27 | ngOnDestroy() { |
25 | clearTimeout(this.timer); | 28 | clearTimeout(this.timer); |
26 | } | 29 | } |
27 | 30 | ||
28 | goToSplash() { | 31 | goToSplash() { |
29 | this.articuloService.cleanShoppingCar(); | 32 | this.articuloService.cleanShoppingCar(); |
30 | this.router.navigate(['']); | 33 | this.router.navigate(['']); |
31 | } | 34 | } |
32 | 35 | ||
33 | } | 36 | } |
34 | 37 |
src/app/modules/splash-screen/splash-screen.component.ts
1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
2 | 2 | ||
3 | @Component({ | 3 | @Component({ |
4 | selector: 'app-splash-screen', | 4 | selector: 'app-splash-screen', |
5 | templateUrl: './splash-screen.component.html', | 5 | templateUrl: './splash-screen.component.html', |
6 | styleUrls: ['./splash-screen.component.scss'] | 6 | styleUrls: ['./splash-screen.component.scss'] |
7 | }) | 7 | }) |
8 | export class SplashScreenComponent implements OnInit { | 8 | export class SplashScreenComponent implements OnInit { |
9 | timerSplashScreen = 2000; | 9 | timerSplashScreen = 2000; |
10 | showSplashScreen = true; | 10 | showSplashScreen = true; |
11 | textWelcome = 'BIENVENIDO A SPOT!'; | 11 | textWelcome = 'BIENVENIDO A SPOT!'; |
12 | textComoEstas = '¿cómo estás?'; | 12 | textComoEstas = '¿cómo estás?'; |
13 | textInvitamos = 'TE INVITAMOS A HACER'; | 13 | textInvitamos = 'TE INVITAMOS A HACER'; |
14 | textTuPedido = 'tu pedido acá'; | 14 | textTuPedido = 'tu pedido acá'; |
15 | 15 | ||
16 | constructor() { } | 16 | constructor() { } |
17 | 17 | ||
18 | ngOnInit() { | 18 | ngOnInit() { |
19 | setTimeout(() => { | 19 | setTimeout(() => { |
20 | this.showSplashScreen = false; | 20 | this.showSplashScreen = false; |
21 | }, this.timerSplashScreen); | 21 | }, this.timerSplashScreen); |
22 | |||
23 | $(document).ready(function() { | 22 | $(document).ready(function() { |
24 | $('body').removeClass('media-pantalla'); | 23 | $('body').removeClass('media-pantalla'); |
25 | }); | 24 | }); |
26 | } | 25 | } |
27 | } | 26 | } |
28 | 27 |