美团配送名字
This commit is contained in:
@@ -25,7 +25,7 @@ func init() {
|
||||
// prod
|
||||
api = New("3c0a05d464c247c19d7ec13accc78605", "b1M}9?:sTbsB[OF2gNORnN(|(iy9rB8(`7]|[wGLnbmt`evfM>E:A90DjHAW:UPE")
|
||||
|
||||
api.SetCookie("token", "ht4RWbL5klQMupzHjARWOLgiHhGW1X3WlAmZ0Zfal0MRY6KkSE0XJJ-86x2duX2ufQil1Sm5jJrVqM2KlUWnjQ")
|
||||
api.SetCookie("token", "N1oMKRJNAzIcgBLC-tz6b83kmc-hkam-yXoCirAYfvqkg9Em_FLn88S60bEzj8HtYZVZqx7NyQ7WL8ErvoI9eA")
|
||||
}
|
||||
|
||||
func handleError(t *testing.T, err error) {
|
||||
|
||||
@@ -149,3 +149,22 @@ func (a *API) GetStoreStatusAll() (getStoreStatusResult []*GetStoreStatusResultA
|
||||
}
|
||||
return getStoreStatusResult, err
|
||||
}
|
||||
|
||||
type GetStoreInfoResult struct {
|
||||
OuterPoiID string `json:"outerPoiId"`
|
||||
PoiName string `json:"poiName"`
|
||||
AccountInfo interface{} `json:"accountInfo"`
|
||||
}
|
||||
|
||||
func (a *API) GetStoreInfo(outerPoiId int) (getStoreInfoResult []*GetStoreInfoResult, err error) {
|
||||
params := map[string]interface{}{
|
||||
"outerPoiId": outerPoiId,
|
||||
"pageNum": 1,
|
||||
"pageSize": 20,
|
||||
}
|
||||
result, err := a.AccessAPI2("https://page.peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/account/list", params)
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result.Data["dataList"], &getStoreInfoResult, false)
|
||||
}
|
||||
return getStoreInfoResult, err
|
||||
}
|
||||
|
||||
@@ -35,3 +35,11 @@ func TestRefreshToken(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestGetStoreInfo(t *testing.T) {
|
||||
result, err := api.GetStoreInfo(666772)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user