From 9b5d84b2f370e8a7bb524be57014d86007fb2b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 27 May 2020 09:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/tempop/tempop.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 9257cd023..97aff3325 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -4,12 +4,12 @@ import ( "bytes" "context" "fmt" + "io/ioutil" + "net/http" "regexp" "strings" "time" - "git.rosy.net.cn/baseapi/platformapi/jdshopapi" - "git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin" "git.rosy.net.cn/jx-callback/business/partner/delivery" "github.com/360EntSecGroup-Skylar/excelize" @@ -1611,9 +1611,17 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { // continue // } // } - _, err = api.JdShopAPI.AllOrders(&jdshopapi.AllOrdersParam{ - Current: 1, - PageSize: 10, - }) + request, _ := http.NewRequest(http.MethodGet, "https://stores.shop.jd.com/stores/updateStoreStatus?storeId=24339301&storeStatus=1", nil) + c := &http.Cookie{ + Name: "thor", + Value: "80FAF09E9A09B6E618A68057BDFCFCB88A0E4CE7743FBEC84F10D992F9C6A4119DF98DA3CAAE9C7F17BEB62884625B4E7BC82422A90F45F02EA293572D951B055EF0B5F603AEA568DFD4234138F841EC1AC1F67B30B48AAC9EAD5FBAE7943E1DCC99E99D8358C82F7832B71A2BCB31624E16BBF561720443DE966BDA3588406233A90224D9089710B102AA98B979B9B3", + } + request.AddCookie(c) + client := &http.Client{} + fmt.Println("test1", request.URL) + response, _ := client.Do(request) + defer response.Body.Close() + bodyData, _ := ioutil.ReadAll(response.Body) + fmt.Println("test1", string(bodyData)) return err }