京东商城预订单匹配修改

This commit is contained in:
苏尹岚
2020-06-17 15:21:51 +08:00
parent 3d1c0b3ab0
commit 28b52e4536
5 changed files with 27 additions and 74 deletions

View File

@@ -70,7 +70,7 @@ func TestAllOrders(t *testing.T) {
}
func TestOrderDetail(t *testing.T) {
result, err := api.OrderDetail("117078663807")
result, err := api.OrderDetail("124350112427")
if err != nil {
t.Fatal(err)
}
@@ -102,8 +102,15 @@ func TestTryGetCookie(t *testing.T) {
}
func TestAAADS(t *testing.T) {
var s float64 = 200
fmt.Println(strings.TrimRight(fmt.Sprintf("%.2f", s), "0."))
var s = ` <td class="pubwhite">配送日期:</td>
<td colspan="2">2020-06-17,13:00-14:00</td>
`
expectedDeliveredTime2 := regexpOrderDetailDay2.FindStringSubmatch(s)
if len(expectedDeliveredTime2) > 0 {
times := strings.Split(expectedDeliveredTime2[1], ",")
ss := times[0] + " " + times[1][:strings.Index(times[1], ":")] + ":00:00"
fmt.Println(ss)
}
}
func DecryptDESECB(d, key []byte) string {