|
@@ -21,7 +21,7 @@ export class TianqiComponent implements OnInit {
|
|
|
];
|
|
|
async fetchWeatherData() {
|
|
|
// 第一个请求,获取 adcode
|
|
|
- const apiUrl = '/api/api/weather/city/101240101';
|
|
|
+ const apiUrl = '/api/weather/city/101240101';
|
|
|
try {
|
|
|
const response: any = await this.http.get(apiUrl).toPromise(); // 使用 toPromise()
|
|
|
const adcode = response; // 获取 adcode 字段
|