From 19fd07d35d59b54ad9154eab18d253fac1fa49f0 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期五, 22 八月 2025 16:20:20 +0800 Subject: [PATCH] fix: bug --- packages/utils/location.ts | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/utils/location.ts b/packages/utils/location.ts index 69bf88e..b261689 100644 --- a/packages/utils/location.ts +++ b/packages/utils/location.ts @@ -26,7 +26,7 @@ static currentProvinceName: string; - static blackList = ['姹熻タ鐪�']; + static blackList = []; static async getLocation() { if (!this.wxLocation) { @@ -45,7 +45,7 @@ } static async getLocationImp() { - let geocoderRes = await this.getLocationByIp().catch(() => this.getLocationByIp()); + let geocoderRes = await this.getLocationByGeocoder().catch(() => this.getLocationByIp()); console.log('geocoderRes: ', geocoderRes); return geocoderRes; @@ -87,7 +87,10 @@ static getLocationByIp() { return axios .get<LocationResponse>( - `https://apis.map.qq.com/ws/location/v1/ip?key=HH7BZ-5L2KI-TN3GW-U5HKU-MK5H3-VOBZH` + `https://apis.map.qq.com/ws/location/v1/ip?key=HH7BZ-5L2KI-TN3GW-U5HKU-MK5H3-VOBZH`, + { + timeout: 3000, + } ) .then((res) => res.data); } -- Gitblit v1.9.1