From ae51226ce036e0201e94b60ffa92b92e893767ee Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期日, 19 十月 2025 17:29:17 +0800
Subject: [PATCH] feat: 1.2.0.1
---
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