From 4e7efb7b8c7d797fba004152aa551e8fec633ed9 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 20 Jul 2022 18:11:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/autonavi/autonavi_page.go | 10 ++++++---- platformapi/autonavi/autonavi_test.go | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/platformapi/autonavi/autonavi_page.go b/platformapi/autonavi/autonavi_page.go index acbc52ab..d8bb6fbb 100644 --- a/platformapi/autonavi/autonavi_page.go +++ b/platformapi/autonavi/autonavi_page.go @@ -42,8 +42,9 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}) func (a *API) GetCoordinateFromAddressByPage(address string, cityCode int) (lng, lat float64, err error) { result, err := a.AccessStorePage("https://restapi.amap.com/v3/place/text", map[string]interface{}{ - "s": "rsv3", - "key": "e07ffdf58c8e8672037bef0d6cae7d4a", + "s": "rsv3", + "key": "49ae7e4552909cf33faba70443ad775b", + //"key": "e07ffdf58c8e8672037bef0d6cae7d4a", "page": 1, "offset": 10, "city": cityCode, @@ -78,8 +79,9 @@ type GetCoordinateFromAddressByPageAllResult struct { func (a *API) GetCoordinateFromAddressByPageAll(address string, cityCode int) (getCoordinateFromAddressByPageAllResult *GetCoordinateFromAddressByPageAllResult, err error) { getCoordinateFromAddressByPageAllResult = &GetCoordinateFromAddressByPageAllResult{} result, err := a.AccessStorePage("https://restapi.amap.com/v3/place/text", map[string]interface{}{ - "s": "rsv3", - "key": "e07ffdf58c8e8672037bef0d6cae7d4a", + "s": "rsv3", + "key": "49ae7e4552909cf33faba70443ad775b", + //"key": "e07ffdf58c8e8672037bef0d6cae7d4a", "page": 1, "offset": 10, "city": cityCode, diff --git a/platformapi/autonavi/autonavi_test.go b/platformapi/autonavi/autonavi_test.go index 33dc056e..15756d4d 100644 --- a/platformapi/autonavi/autonavi_test.go +++ b/platformapi/autonavi/autonavi_test.go @@ -19,7 +19,7 @@ func init() { sugarLogger = logger.Sugar() baseapi.Init(sugarLogger) - autonaviAPI = New("ef64f638f31e05cb7bde28790f7309fe") + autonaviAPI = New("49ae7e4552909cf33faba70443ad775b") autonaviAPI.SetCookieWithStr(`cna=dyUYGJ5k1VICAbffYm17n9kQ; UM_distinctid=176036a06055e-0ee495abe2301e-5c173a1b-15f900-176036a060673; isg=BOrqQBinfq1rFcyHs0cHGEFiO1CMW261b382TXSjAz3bp4phXO9bxTLWM9O7V-ZN; l=eBLn3bArQD-PVZ6OBO5ZPurza77tgIRb4sPzaNbMiInca6GF9FPIpNCI6EvkWdtjgtC33etzuK-oqdLHR3xJ2xDDB5XXG7RE3xvO.; tfstk=cgmVBA_rmnK25ur6JoZNGm2q2UqAZinnX3yUoV3YnkeyezzcifCTEIYxUAPpqrf..`) }