import { Component, OnInit } from "@angular/core";
|
import { _HttpClient } from "@delon/theme";
|
import { zip } from "rxjs";
|
|
@Component({
|
selector: "app-home-page",
|
templateUrl: "./home-page.component.html",
|
styleUrls: ["./home-page.component.less"]
|
})
|
export class HomePageComponent implements OnInit {
|
public cardData: {'api'?:number,'temperature'?:number,'windDirection'?: string,'pm2.5'?: number}
|
= {};
|
constructor(
|
private http:_HttpClient,
|
) {
|
}
|
|
ngOnInit() {
|
// zip(
|
// this.http.get('http://sapi.7drlb.com/api/mj?cityID=1102&apiKey=condition'),
|
// this.http.get('http://sapi.7drlb.com/api/mj?cityID=1102&apiKey=aqi')
|
|
// ).subscribe(
|
// (value) => {
|
// debugger;
|
// console.log(value);
|
// // console.log(aqiRes);
|
// }
|
// )
|
this.http.get('/user-context').subscribe(
|
res => {
|
console.log(res);
|
}
|
);
|
}
|
}
|