diff --git a/conf/app.conf b/conf/app.conf index 1baf8c612..64ba82034 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -171,8 +171,8 @@ jd2AppKey = "7fb947624ff847ae94ff2f068cc99652" jd2Secret = "1097abd7ef09427099b4922784af123a" jdEclpAccessToken = "" -jdEclpAppKey = "" -jdEclpAppSecret = "" +jdEclpAppKey = "0D397F05CF11C51BCDCC81744680EBC3" +jdEclpAppSecret = "f16a5e57ff4f4f428b702c40d2d4b933" jdEclpRedirectUri = "" elmIsProd = true diff --git a/controllers/eclp_callback.go b/controllers/eclp_callback.go new file mode 100644 index 000000000..40b0b8635 --- /dev/null +++ b/controllers/eclp_callback.go @@ -0,0 +1,22 @@ +package controllers + +import ( + "fmt" + "net/http" + + "github.com/astaxie/beego" +) + +type EclpController struct { + beego.Controller +} + +func (c *EclpController) Msg() { + if c.Ctx.Input.Method() == http.MethodPost { + fmt.Println("testElcp", c.Ctx.Request.Body) + c.Data["json"] = c.Ctx.Request.Body + c.ServeJSON() + } else { + c.Abort("404") + } +} diff --git a/routers/router.go b/routers/router.go index 20a064c30..5a12568a9 100644 --- a/routers/router.go +++ b/routers/router.go @@ -156,6 +156,7 @@ func init() { beego.AutoRouter(&controllers.WXPayController{}) beego.AutoRouter(&controllers.Djsw2Controller{}) beego.AutoRouter(&controllers.TongLianController{}) + beego.AutoRouter(&controllers.EclpController{}) // 如下都是用于检测存活的空接口 beego.Any("/", func(ctx *beecontext.Context) {