From bb1393439b7c28e1ab190b5915a3627c528df36c Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Sat, 20 Dec 2025 15:04:24 +0800 Subject: [PATCH] commit --- src/main/resources/views/layouts/v4/home/user.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/views/layouts/v4/home/user.js b/src/main/resources/views/layouts/v4/home/user.js index 4e7212b..0944fe1 100644 --- a/src/main/resources/views/layouts/v4/home/user.js +++ b/src/main/resources/views/layouts/v4/home/user.js @@ -191,6 +191,9 @@ const user = { // 存localStorage 112.13,32.01 广州 113.27,23.14 const AppMapCenterPointX = await this.getConfigKey("AppMapCenterPointX") const AppMapCenterPointY = await this.getConfigKey("AppMapCenterPointY") + if (!AppMapCenterPointX || !AppMapCenterPointY){ + return + } // 1. 先通过城市名获取 locationId this.$axios.get("https://mx5rk62kvj.re.qweatherapi.com/geo/v2/city/lookup?location=" + AppMapCenterPointX + "," + AppMapCenterPointY + "&key=" + this.QWEATHER_KEY).then((geoRes) => {