You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
747 B

package DatahyperController
import (
"dsDataex/MyHyper/DataHyper/DatahyperOpenapi"
"github.com/gin-gonic/gin"
)
//Gin 路由配置
func Routers(r *gin.RouterGroup) {
rr := r.Group("/hyper_:platform")
{
rr.POST("/Query", DatahyperOpenapi.Query)
rr.POST("/QueryByID", DatahyperOpenapi.QueryByID)
rr.POST("/QueryFE", DatahyperOpenapi.QueryFE)
rr.OPTIONS("/QueryFE", HandleOptions)
rr.POST("/QueryFEByID", DatahyperOpenapi.QueryFEByID)
rr.OPTIONS("/QueryFEByID", HandleOptions)
}
}
func HandleOptions(c *gin.Context) {
c.Header("Access-Control-Allow-Origin", "*")
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS")
c.Header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type")
c.String(200, "ok")
}