- 不获取门店坐标信息(节约高德API配额)
This commit is contained in:
@@ -24,7 +24,8 @@ func (c *PurchaseHandler) GetStoreIDListByCoordinates(ctx *jxcontext.Context, co
|
||||
func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, storeID string) (storePageInfo *model.PageShop, err error) {
|
||||
shopInfo, err2 := api.EbaiAPI.GetStoreInfo2(storeID)
|
||||
if err = err2; err == nil && shopInfo != nil {
|
||||
_, _, districtCode := api.AutonaviAPI.GetCoordinateFromAddress(shopInfo.Address, cityInfo)
|
||||
districtCode := 0
|
||||
// districtCode := api.AutonaviAPI.GetCoordinateDistrictCode(shopInfo.Longitude, shopInfo.Latitude)
|
||||
return &model.PageShop{
|
||||
Name: shopInfo.Name,
|
||||
VendorID: model.VendorIDEBAI,
|
||||
|
||||
@@ -26,7 +26,10 @@ func (c *PurchaseHandler) GetStoreIDListByCoordinates(ctx *jxcontext.Context, co
|
||||
func (c *PurchaseHandler) GetStorePageInfo(ctx *jxcontext.Context, cityInfo, storeID string) (storePageInfo *model.PageShop, err error) {
|
||||
shopInfo, err2 := api.JdAPI.GetStoreInfo2(storeID)
|
||||
if err = err2; err == nil && shopInfo != nil {
|
||||
lng, lat, districtCode := api.AutonaviAPI.GetCoordinateFromAddress(shopInfo.StoreInfo.StoreAddress, cityInfo)
|
||||
var lng, lat float64
|
||||
districtCode := 0
|
||||
// 由于高德API免费有调用次数限制,暂时不取坐标信息
|
||||
// lng, lat, districtCode := api.AutonaviAPI.GetCoordinateFromAddress(shopInfo.StoreInfo.StoreAddress, cityInfo)
|
||||
return &model.PageShop{
|
||||
Name: shopInfo.StoreInfo.StoreName,
|
||||
VendorID: model.VendorIDJD,
|
||||
|
||||
Reference in New Issue
Block a user