京东商城定时达订单

This commit is contained in:
苏尹岚
2020-06-22 08:33:41 +08:00
parent 9ac36d1e14
commit b007c6c034
6 changed files with 20 additions and 12 deletions

View File

@@ -421,7 +421,7 @@ func (a *API) OrderDetail(orderId string) (orderDetailResult *OrderDetailResult,
}
}
if len(expectedDeliveredTime) > 0 {
orderDetailResult.ExpectedDeliveredTime = expectedDeliveredTime[1][:strings.LastIndex(expectedDeliveredTime[1], "-")] + ":00"
orderDetailResult.ExpectedDeliveredTime = expectedDeliveredTime[1][strings.LastIndex(expectedDeliveredTime[1], "-")+1:] + ":00"
} else {
expectedDeliveredTime2 := regexpOrderDetailDay2.FindStringSubmatch(body)
if len(expectedDeliveredTime2) > 0 {

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"git.rosy.net.cn/baseapi/utils"
@@ -59,9 +60,9 @@ func Test11(t *testing.T) {
func TestAllOrders(t *testing.T) {
result, err := api.AllOrders(&AllOrdersParam{
Current: 1,
PageSize: 999,
OrderCreateDateRange: []string{"2020-06-17 00:00:00", "2020-06-17 23:59:59"},
Current: 1,
PageSize: 1,
OrderID: "118793082128",
})
if err != nil {
t.Fatal(err)
@@ -102,8 +103,8 @@ func TestTryGetCookie(t *testing.T) {
}
func TestAAADS(t *testing.T) {
//c5MSDWxbgDc698slnUlR1w==
fmt.Println(DecryptDESECB([]byte("Av3VLNsKfmmGw70Wiw7Qdw=="), []byte(JdsMobileKey)))
str := "16:00-17:00"
fmt.Println(str[strings.LastIndex(str, "-")+1:])
}
func DecryptDESECB(d, key []byte) string {