This commit is contained in:
蒋海成 2025-05-12 15:28:55 +08:00
parent 348ce14ed8
commit 69a771a0cb
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ func NewRouter() *gin.Engine {
} }
//静态文件 //静态文件
r.StaticFS("/static", http.Dir("./runtime")) r.StaticFS("/api/static", http.Dir("./runtime"))
r.NoRoute(func(c *gin.Context) { r.NoRoute(func(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{ c.JSON(http.StatusNotFound, gin.H{
"status": 1, "status": 1,

View File

@ -426,7 +426,7 @@ func ExportOrderInfo(c *gin.Context) {
} }
} }
var exportUrl = strings.Replace(strings.Replace(filePath, ".", fmt.Sprintf("%s://%s", httpType, c.Request.Host), 1), "runtime", "static", 1) var exportUrl = strings.Replace(strings.Replace(filePath, ".", fmt.Sprintf("%s://%s", httpType, c.Request.Host), 1), "runtime", "api/static", 1)
//var exportUrl = fmt.Sprintf("%s%s/%s", httpType, c.Request.Host, dirPath + path) //var exportUrl = fmt.Sprintf("%s%s/%s", httpType, c.Request.Host, dirPath + path)
fmt.Println("exportUrl : ", exportUrl) fmt.Println("exportUrl : ", exportUrl)
service.Success(c, &bundleModel.ExportResponse{ExportUrl: exportUrl}) service.Success(c, &bundleModel.ExportResponse{ExportUrl: exportUrl})