feat:完善项目
This commit is contained in:
@ -319,6 +319,9 @@ func registerAdminAPI(app *gin.Engine) {
|
||||
technology.POST("/paper", _api.Paper)
|
||||
technology.POST("/paper/detail", _api.PaperDetail)
|
||||
technology.POST("/paper/delete", _api.PaperDelete)
|
||||
technology.POST("/product", _api.Product)
|
||||
technology.POST("/product/detail", _api.ProductDetail)
|
||||
technology.POST("/product/delete", _api.ProductDelete)
|
||||
}
|
||||
// Activity 活动管理
|
||||
activity := v1.Group("/activity")
|
||||
|
@ -37,10 +37,13 @@ func (this *Router) Init() *gin.Engine {
|
||||
if this.IsCors {
|
||||
app.Use(Cors())
|
||||
}
|
||||
app.LoadHTMLFiles("./dist/*") // 添加资源路径
|
||||
//app.LoadHTMLFiles("./dist/*") // 添加资源路径
|
||||
app.LoadHTMLGlob("./dist/index.html") // 添加资源路径
|
||||
app.StaticFS("/static", http.Dir("./dist/static"))
|
||||
app.StaticFile("/", "dist/index.html") //前端接口
|
||||
|
||||
app.GET("", func(c *gin.Context) {
|
||||
c.HTML(http.StatusOK, "index.html", nil)
|
||||
})
|
||||
//app.NoRoute(NoRouteHandler())
|
||||
app.NoMethod(NoMethodHandler())
|
||||
app.Use(LoggerHandle("log/gin.log", 3))
|
||||
|
Reference in New Issue
Block a user