Files
jx-callback/controllers/taobao_vegetable.go
richboo111 9aff97778c 1
2023-06-15 09:04:49 +08:00

39 lines
993 B
Go

package controllers
import (
"github.com/astaxie/beego/server/web"
)
type TaoBaoVegetableController struct {
web.Controller
}
// GetCode 淘菜菜获取商户授权code
//func (c *TaoBaoVegetableController) GetCode() {
// codeData := ""
// if c.Ctx.Input.Method() == http.MethodPost {
// body, err := ioutil.ReadAll(c.Ctx.Request.Body)
// if err != nil {
// globals.SugarLogger.Debugf("商户收取code获取:%s,%s", string(body), err.Error())
// c.Data["json"] = MsgFail()
// c.ServeJSON()
// return
// }
// globals.SugarLogger.Debugf("商户收取code获取:%s", string(body))
// codeData = string(body)
// } else {
// codeData = c.Ctx.Input.Query("code")
// }
//
// tokenInfo, err := api.TaoVegetableApi.GetStoreToken(codeData, "")
// if err != nil {
// globals.SugarLogger.Debugf("获取门店token错误:%s", err.Error())
// c.Data["json"] = MsgFail()
// c.ServeJSON()
// return
// }
// fmt.Println(tokenInfo)
// // 创建storeMap门店信息
// // 刷新token
//}