修改文件路径

master
kanade 3 years ago
parent b6edfce17d
commit 3b09d54948

@ -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

Loading…
Cancel
Save