diff --git a/internal/v2/controller/manage/third/supply/sku.go b/internal/v2/controller/manage/third/supply/sku.go index 80f1768..1f94acd 100644 --- a/internal/v2/controller/manage/third/supply/sku.go +++ b/internal/v2/controller/manage/third/supply/sku.go @@ -5,7 +5,9 @@ import ( "github.com/360EntSecGroup-Skylar/excelize/v2" "github.com/gin-gonic/gin" "github.com/shopspring/decimal" + "path/filepath" "recook/internal/libs/bean" + "recook/internal/static_path" "recook/internal/v2/lib/back" "recook/internal/v2/lib/excel" "recook/internal/v2/logic/third" @@ -116,7 +118,7 @@ func (s *Sku) Import(c *gin.Context) { back.Fail(c, err.Error()) return } - file, err := excelize.OpenFile(args.Path) + file, err := excelize.OpenFile(filepath.Join(static_path.Dir.Root, args.Path)) if err != nil { back.Fail(c, "上传文件错误") return