- jdapi.GetAllCities
This commit is contained in:
@@ -35,6 +35,23 @@ type CreateShopResult struct {
|
||||
StationNo string `json:"stationNo"`
|
||||
}
|
||||
|
||||
type CityInfo struct {
|
||||
AreaCode int `json:"areaCode"`
|
||||
AreaLevel int `json:"areaLevel"`
|
||||
AreaName string `json:"areaName"`
|
||||
ParentAreaID int `json:"parentAreaId"`
|
||||
TencentAddressCode int `json:"tencentAddressCode"`
|
||||
Yn int `json:"yn"`
|
||||
}
|
||||
|
||||
func (a *API) GetAllCities() (cities []*CityInfo, err error) {
|
||||
result, err := a.AccessAPINoPage("address/allcities", nil, nil, nil, genNoPageResultParser("code", "msg", "result", "0"))
|
||||
if err == nil {
|
||||
err = utils.Map2StructByJson(result, &cities, false)
|
||||
}
|
||||
return cities, err
|
||||
}
|
||||
|
||||
// 获取门店编码列表接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=138426aa19b54c48ae8464af1ca3b681
|
||||
func (a *API) GetStationsByVenderId() ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user