1
This commit is contained in:
@@ -12,8 +12,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
prodURL = "http://api.jxc4.com/openapi/CallOpenAPI"
|
||||
signKey = "sign"
|
||||
prodURL = "http://api.jxc4.com/openapi/CallOpenAPI" // 老版本的URL
|
||||
prodURLNew = "http://print.jxcs.net/v2/openapi/CallOpenAPI" // 老版本的URL
|
||||
signKey = "sign"
|
||||
)
|
||||
const (
|
||||
// ResponseCodeSuccess 操作成功
|
||||
@@ -76,7 +77,7 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa
|
||||
params["timestamp"] = utils.Int64ToStr(time.Now().Unix())
|
||||
sign := a.signParams(params)
|
||||
params[signKey] = sign
|
||||
fullURL := prodURL
|
||||
fullURL := prodURLNew
|
||||
request, _ := http.NewRequest(http.MethodPost, fullURL, strings.NewReader(utils.Map2URLValues(params).Encode()))
|
||||
request.Header.Set("charset", "UTF-8")
|
||||
request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// 京西速食(蔬菜)
|
||||
var token1 = `{"access_token":"f0f8a7d0-8484-482b-8c3e-39da6a415c27","expires_in":1704307911,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8648acb6-35d1-4568-ba49-4f3295129845","authority_id":""}`
|
||||
var token1 = `{"access_token":"b8dbed2b-090d-4719-88b9-7d061595bf58","expires_in":1704909356,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"fa1028c8-2c3e-41b5-992d-a92bdc17ab0c","authority_id":""}`
|
||||
|
||||
// 美好菜市
|
||||
//var token1 = `{"access_token":"9a315a03-c737-4a82-ae52-c9a6ce827007","expires_in":1699490747,"scope":"SCOPE","shop_id":68032645,"shop_name":"美好菜市","refresh_token":"8334c006-5301-4d25-911b-4d8cc7b70ebb","authority_id":""}`
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestBillDetail(t *testing.T) {
|
||||
orderDetail, err := a.GetTiktokOrderDetail("6924471291044304141")
|
||||
orderDetail, err := a.GetTiktokOrderDetail("6925277063668307022")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func TestBillDetail(t *testing.T) {
|
||||
for _, v := range orderDetail.SkuOrderList {
|
||||
childrenOrderList = append(childrenOrderList, v.OrderId)
|
||||
}
|
||||
childrenOrderList = append(childrenOrderList, "6924471291044304141")
|
||||
childrenOrderList = append(childrenOrderList, "6925277063668307022")
|
||||
|
||||
date, datae, err := a.GetSettleBillDetailV3(&order_getSettleBillDetailV3_request.OrderGetSettleBillDetailV3Param{
|
||||
Size: 20,
|
||||
|
||||
Reference in New Issue
Block a user