+ ScheduleTimerFuncOnce

This commit is contained in:
gazebo
2019-08-21 17:22:02 +08:00
parent 5e94bf4dbd
commit cdc5ec75b3
3 changed files with 24 additions and 9 deletions

View File

@@ -4,7 +4,6 @@ import (
"net/http"
"git.rosy.net.cn/baseapi/platformapi/elmapi"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego"
)
@@ -16,10 +15,11 @@ type ElemeController struct {
// https://open.shop.ele.me/openapi/documents/httppushmethod
func (c *ElemeController) Msg() {
if c.Ctx.Input.Method() == http.MethodPost {
_, callbackResponse := api.ElmAPI.GetCallbackMsg(c.Ctx.Input.RequestBody)
if callbackResponse == nil {
// callbackResponse = elm.OnCallbackMsg(obj)
}
callbackResponse := elmapi.SuccessResponse
// obj, callbackResponse := api.ElmAPI.GetCallbackMsg(c.Ctx.Input.RequestBody)
// if callbackResponse == nil {
// callbackResponse = elm.OnCallbackMsg(obj)
// }
c.Data["json"] = callbackResponse
c.ServeJSON()
} else if c.Ctx.Input.Method() == http.MethodGet { // 应用需要支持推送地址的GET访问当GET请求访问时请直接返回{“message”:“ok”},用于推送地址的可用性测试。