Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2022-10-24 18:06:52 +08:00

View File

@@ -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,8 +19,18 @@ type TiktokShopController struct {
// TokenMsg 抖音用户授权
func (c *TiktokShopController) TokenMsg() {
codeList := c.Ctx.Request.URL.Query().Get("code")
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))
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 {
globals.SugarLogger.Debugf("codeList=====err%s", utils.Format4Output(err, false))