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 {