|
@@ -61,13 +61,13 @@ func Launch() {
|
|
|
|
|
|
// 前端
|
|
|
if config.WebIndex != "" {
|
|
|
- app.Use(static.Serve("/", static.LocalFile(config.WebIndex, false)))
|
|
|
+ app.Use(static.Serve("/static", static.LocalFile(config.WebIndex, false)))
|
|
|
app.NoRoute(func(ctx *gin.Context) {
|
|
|
ctx.File(config.WebIndex + "/index.html")
|
|
|
})
|
|
|
} else {
|
|
|
// 使用内置的 public 目录
|
|
|
- app.Use(static.Serve("/", static.LocalFile("public", false)))
|
|
|
+ app.Use(static.Serve("/static", static.LocalFile("public", false)))
|
|
|
app.NoRoute(func(ctx *gin.Context) {
|
|
|
ctx.File("public/index.html")
|
|
|
})
|