Commit ecc7b134 by Chao Sun

添加过渡

parent ffe8b4eb
import {Component, OnInit} from '@angular/core';
import {CommonService} from "./common.service";
import { Component, OnInit } from '@angular/core';
import { CommonService } from "./common.service";
@Component({
selector: 'app-root',
......@@ -12,11 +12,15 @@ export class AppComponent implements OnInit {
}
ngOnInit() {
setTimeout(() => {
if (!this.commonService.getQueryString('t_reload')) {
let {search, href} = window.location;
let { search, href } = window.location;
href = href.replace(/&?t_reload=(\d+)/g, '');
window.location.href = href + (search ? '&' : '?') + 't_reload=' + new Date().getTime();
}
}, 300)
console.log(this.commonService.getQueryString('t_reload'))
let customerId = this.commonService.getQueryString('customerId');
const double12_customerInfo = localStorage.getItem('double12_customerInfo') ? JSON.parse(localStorage.getItem('double12_customerInfo')) : null;
if (double12_customerInfo) {
......
import {Injectable} from '@angular/core';
import {environment} from './../environments/environment';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {Subject} from "rxjs/index";
import { Injectable } from '@angular/core';
import { environment } from './../environments/environment';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Subject } from "rxjs/index";
@Injectable({
providedIn: 'root'
})
......@@ -65,7 +65,7 @@ export class CommonService {
const res = await this.obtainToken();
this.httpOptions.headers = this.httpOptions.headers.set('X-Authorization', res['data']['token']);
return this.http
.post(url, JSON.stringify({orderId: orderId}), this.httpOptions).toPromise().then(response => {
.post(url, JSON.stringify({ orderId: orderId }), this.httpOptions).toPromise().then(response => {
return response;
});
}
......
<div class="limbo">
<img *ngIf="advFlag" src="assets/images/first.jpg">
<div *ngIf="!advFlag">
<div class="title" *ngIf="!picFlag">
<img src="assets/images/bg_1.png"/>
<img src="assets/images/bg_1.png" />
</div>
<div class="specialWrapper" *ngIf="picFlag">
<div class="specialContent part1">
......@@ -40,6 +42,8 @@
<div class="footer" routerLink="/family">
<div>开始评测</div>
</div>
</div>
</div>
<!--分享引导页-->
......
import {ChangeDetectorRef, Component, OnInit} from '@angular/core';
import {CommonService} from "../common.service";
import {ActivatedRoute} from "@angular/router";
import {environment} from "../../environments/environment";
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { CommonService } from "../common.service";
import { ActivatedRoute } from "@angular/router";
import { environment } from "../../environments/environment";
import set = Reflect.set;
declare const wx: any;
@Component({
......@@ -16,7 +16,7 @@ export class TransitComponent implements OnInit {
customerId: string;
deviceType: number;
dialogTips: string;
advFlag: boolean = true;
constructor(private commonService: CommonService, private activatedRoute: ActivatedRoute, private changeDetectorRef: ChangeDetectorRef) {
}
......@@ -34,9 +34,12 @@ export class TransitComponent implements OnInit {
if (this.deviceType === 3) {
this.configWX();
}
setTimeout(() => {
this.advFlag = false;
}, 1000)
}
// 分享给朋友
// 分享给朋友
wxShare() {
this.wxShareFlag = true;
if (this.customerId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment