q-koa 12.6.6 → 12.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,7 +54,9 @@ module.exports = class Singleton {
|
|
|
54
54
|
async getToLngAndLat(name) {
|
|
55
55
|
if (!name) throw new Error('没输入地理名称')
|
|
56
56
|
if (!this.key) throw new Error('没有key')
|
|
57
|
-
const url = encodeURI(
|
|
57
|
+
const url = encodeURI(
|
|
58
|
+
util.format(toLngAndLatUrl, `${name.replace(/\#/g, '-')}`, this.key)
|
|
59
|
+
)
|
|
58
60
|
const data = await axios.get(url).then((res) => res.data)
|
|
59
61
|
|
|
60
62
|
if (data.status === 0) return data.result
|