|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | static currentProvinceName: string; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | static blackList = ['江西省']; | 
|---|
|  |  |  | static blackList = []; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | static async getLocation() { | 
|---|
|  |  |  | if (!this.wxLocation) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|