1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -149,6 +150,9 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
|||||||
}
|
}
|
||||||
signURL := a.genURL(cmd) + "?"
|
signURL := a.genURL(cmd) + "?"
|
||||||
params[signKey] = a.signParams(signURL, params)
|
params[signKey] = a.signParams(signURL, params)
|
||||||
|
if cmd == "retail/batchinitdata" {
|
||||||
|
globals.SugarLogger.Debugf("=====sgin := %s", params[signKey].(string))
|
||||||
|
}
|
||||||
//globals.SugarLogger.Debugf("test mtCancelAct cmd=%s sig=%s", cmd, utils.Format4Output(params, false))
|
//globals.SugarLogger.Debugf("test mtCancelAct cmd=%s sig=%s", cmd, utils.Format4Output(params, false))
|
||||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||||
func() *http.Request {
|
func() *http.Request {
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ func init() {
|
|||||||
baseapi.Init(sugarLogger)
|
baseapi.Init(sugarLogger)
|
||||||
|
|
||||||
// 菜市
|
// 菜市
|
||||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||||
|
|
||||||
// 果园
|
// 果园
|
||||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||||
|
|
||||||
//商超
|
//商超
|
||||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_lygKiWMoozaEx-w1m9ZMmw") //token_n4TwqCntWWuvQwAawzxC0w
|
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_lFmVkpgE8Jevux4i9IdISA") //token_n4TwqCntWWuvQwAawzxC0w
|
||||||
cookieStr := `
|
cookieStr := `
|
||||||
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -305,12 +305,12 @@ func TestErrList(t *testing.T) {
|
|||||||
|
|
||||||
// TestUpdateSkuBoxFee 修改打包费
|
// TestUpdateSkuBoxFee 修改打包费
|
||||||
func TestUpdateSkuBoxFee(t *testing.T) {
|
func TestUpdateSkuBoxFee(t *testing.T) {
|
||||||
api.RetailBatchInitData(utils.GetUUID(), "2461720", []map[string]interface{}{
|
api.RetailBatchInitData(utils.GetUUID(), "17901037", []map[string]interface{}{
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
"app_spu_code": "23923",
|
"app_spu_code": "34712",
|
||||||
"skus": []map[string]interface{}{
|
"skus": []map[string]interface{}{
|
||||||
{
|
{
|
||||||
"sku_id": "23923",
|
"sku_id": "34712",
|
||||||
"ladder_box_num": "0",
|
"ladder_box_num": "0",
|
||||||
"ladder_box_price": "0",
|
"ladder_box_price": "0",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user