- zhongwuapi

This commit is contained in:
gazebo
2019-04-10 13:52:17 +08:00
parent 851125cca1
commit df987cd93e
4 changed files with 194 additions and 0 deletions

View File

@@ -84,6 +84,15 @@ func (a *API) signParams(params url.Values) string {
return fmt.Sprintf("%X", md5.Sum([]byte(finalStr)))
}
func (a *API) getShopID(body map[string]interface{}) (shopID string) {
if body[KeyShopID] != nil {
return body[KeyShopID].(string)
} else if body[KeyBaiduShopID] != nil {
return fmt.Sprint(body[KeyBaiduShopID])
}
return ""
}
func (a *API) AccessAPI(cmd string, body map[string]interface{}) (retVal *ResponseResult, err error) {
baseapi.SugarLogger.Debugf("ebai AccessAPI cmd:%s", cmd)
// a.speedLimiter.AccessAPI(allAPI)