diff --git a/platformapi/jdshopapi/store_page.go b/platformapi/jdshopapi/store_page.go index 931df58a..783393db 100644 --- a/platformapi/jdshopapi/store_page.go +++ b/platformapi/jdshopapi/store_page.go @@ -451,10 +451,10 @@ func (a *API) PhoneSensltiveInfo(orderId, accessKey string) (fakeMobile string, "token": JdsMobileToken, }, true) if err == nil { - if result["model"].(map[string]interface{})["phone"] == nil { - fakeMobile = result["model"].(map[string]interface{})["mobile"].(string) - } else { + if result["model"].(map[string]interface{})["mobile"] == nil { fakeMobile = result["model"].(map[string]interface{})["phone"].(string) + } else { + fakeMobile = result["model"].(map[string]interface{})["mobile"].(string) } } return fakeMobile, err diff --git a/platformapi/jdshopapi/store_page_test.go b/platformapi/jdshopapi/store_page_test.go index c1d7e9bb..10aad76f 100644 --- a/platformapi/jdshopapi/store_page_test.go +++ b/platformapi/jdshopapi/store_page_test.go @@ -6,7 +6,6 @@ import ( "fmt" "io/ioutil" "net/http" - "strings" "testing" "git.rosy.net.cn/baseapi/utils" @@ -79,7 +78,7 @@ func TestOrderDetail(t *testing.T) { } func TestPhoneSensltiveInfo(t *testing.T) { - result, err := api.PhoneSensltiveInfo("122792618177", "1e608a10060e75be7fc6c85645d6b2b7") + result, err := api.PhoneSensltiveInfo("124396047880", "10b1707dc87755373d488a7a4f422f7d") if err != nil { t.Fatal(err) } @@ -103,15 +102,8 @@ func TestTryGetCookie(t *testing.T) { } func TestAAADS(t *testing.T) { - var s = ` 配送日期: - 2020-06-17,13:00-14:00 -` - 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) - } + //c5MSDWxbgDc698slnUlR1w== + fmt.Println(DecryptDESECB([]byte("Av3VLNsKfmmGw70Wiw7Qdw=="), []byte(JdsMobileKey))) } func DecryptDESECB(d, key []byte) string {