From 172778ff03dbeadf50a7011b9d1e15ade1db4cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 24 Oct 2022 17:51:58 +0800 Subject: [PATCH 1/3] 1 --- controllers/tiktok_store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/tiktok_store.go b/controllers/tiktok_store.go index 8fca2e008..0554a560f 100644 --- a/controllers/tiktok_store.go +++ b/controllers/tiktok_store.go @@ -19,7 +19,10 @@ type TiktokShopController struct { // TokenMsg 抖音用户授权 func (c *TiktokShopController) TokenMsg() { codeList := c.Ctx.Request.URL.Query().Get("code") + codeList2 := c.Ctx.Request.URL.Query().Get("Code") + globals.SugarLogger.Debugf("codeList0=====%s", utils.Format4Output(c.Ctx.Request.URL.Query(), false)) globals.SugarLogger.Debugf("codeList=====%s", utils.Format4Output(codeList, false)) + globals.SugarLogger.Debugf("codeList2=====%s", utils.Format4Output(codeList2, false)) var code []string if err := json.Unmarshal([]byte(codeList), &code); err != nil { globals.SugarLogger.Debugf("codeList=====err%s", utils.Format4Output(err, false)) From 1ec7da442b1b6c27ae7e6a7e1378cbb01dba6431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 24 Oct 2022 17:58:23 +0800 Subject: [PATCH 2/3] 1 --- controllers/tiktok_store.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/controllers/tiktok_store.go b/controllers/tiktok_store.go index 0554a560f..9ab3d3964 100644 --- a/controllers/tiktok_store.go +++ b/controllers/tiktok_store.go @@ -18,10 +18,13 @@ type TiktokShopController struct { // TokenMsg 抖音用户授权 func (c *TiktokShopController) TokenMsg() { - codeList := c.Ctx.Request.URL.Query().Get("code") - codeList2 := c.Ctx.Request.URL.Query().Get("Code") - globals.SugarLogger.Debugf("codeList0=====%s", utils.Format4Output(c.Ctx.Request.URL.Query(), false)) + codeValues := c.Ctx.Request.URL.Query() + globals.SugarLogger.Debugf("codeValues=====%s", utils.Format4Output(codeValues, false)) + + codeList := codeValues.Get("code") globals.SugarLogger.Debugf("codeList=====%s", utils.Format4Output(codeList, false)) + + codeList2 := codeValues.Get("Code") globals.SugarLogger.Debugf("codeList2=====%s", utils.Format4Output(codeList2, false)) var code []string if err := json.Unmarshal([]byte(codeList), &code); err != nil { From 51855b92513466b4c0f037d59fc00ea3cf398042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 24 Oct 2022 18:05:18 +0800 Subject: [PATCH 3/3] 1 --- controllers/tiktok_store.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/tiktok_store.go b/controllers/tiktok_store.go index 9ab3d3964..fce674d7c 100644 --- a/controllers/tiktok_store.go +++ b/controllers/tiktok_store.go @@ -9,6 +9,7 @@ import ( "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego/server/web" + "io/ioutil" "time" ) @@ -18,6 +19,10 @@ type TiktokShopController struct { // TokenMsg 抖音用户授权 func (c *TiktokShopController) TokenMsg() { + + body, _ := ioutil.ReadAll(c.Ctx.Request.Body) + globals.SugarLogger.Debugf("body=====%s", string(body)) + codeValues := c.Ctx.Request.URL.Query() globals.SugarLogger.Debugf("codeValues=====%s", utils.Format4Output(codeValues, false))