From 9ac36d1e14d1fa4e253b7afdf7e58d92661ea1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 18 Jun 2020 08:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=8F=96=E6=89=8B=E6=9C=BA=E5=8F=B7=E4=BF=AE=E6=94=B9?= =?UTF-8?q?mobile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdshopapi/store_page.go | 6 +++--- platformapi/jdshopapi/store_page_test.go | 14 +++----------- 2 files changed, 6 insertions(+), 14 deletions(-) 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 = `