京东商城订单取手机号修改mobile
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = ` <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)
|
||||
}
|
||||
//c5MSDWxbgDc698slnUlR1w==
|
||||
fmt.Println(DecryptDESECB([]byte("Av3VLNsKfmmGw70Wiw7Qdw=="), []byte(JdsMobileKey)))
|
||||
}
|
||||
|
||||
func DecryptDESECB(d, key []byte) string {
|
||||
|
||||
Reference in New Issue
Block a user