diff --git a/app/agent/hdl/hdl_file_img_req_upload.go b/app/agent/hdl/hdl_file_img_req_upload.go index 6f3b8bf..4d84cea 100644 --- a/app/agent/hdl/hdl_file_img_req_upload.go +++ b/app/agent/hdl/hdl_file_img_req_upload.go @@ -24,11 +24,11 @@ func ImgReqUpload(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS) return } - // 限制用户上传目录 - if _, ok := md.FileUserDir[args.Dir]; !ok { - e.OutErr(c, e.ERR_FORBIDEN) - return - } + //// 限制用户上传目录 + //if _, ok := md.FileUserDir[args.Dir]; !ok { + // e.OutErr(c, e.ERR_FORBIDEN) + // return + //} scheme := "http" if c.Request.TLS != nil { scheme = "https" @@ -65,11 +65,6 @@ func ImgReqUploadNoUser(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS) return } - // 限制用户上传目录 - if _, ok := md.FileUserDir[args.Dir]; !ok { - e.OutErr(c, e.ERR_FORBIDEN) - return - } scheme := "http" if c.Request.TLS != nil { scheme = "https" diff --git a/app/hdl/hdl_file_img_req_upload.go b/app/hdl/hdl_file_img_req_upload.go index c7dd759..bf24e81 100644 --- a/app/hdl/hdl_file_img_req_upload.go +++ b/app/hdl/hdl_file_img_req_upload.go @@ -24,11 +24,6 @@ func ImgReqUpload(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS) return } - // 限制用户上传目录 - if _, ok := md.FileUserDir[args.Dir]; !ok { - e.OutErr(c, e.ERR_FORBIDEN) - return - } scheme := "http" if c.Request.TLS != nil { scheme = "https" @@ -65,11 +60,7 @@ func ImgReqUploadNoUser(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS) return } - // 限制用户上传目录 - if _, ok := md.FileUserDir[args.Dir]; !ok { - e.OutErr(c, e.ERR_FORBIDEN) - return - } + scheme := "http" if c.Request.TLS != nil { scheme = "https" diff --git a/app/store/hdl/hdl_file_img_req_upload.go b/app/store/hdl/hdl_file_img_req_upload.go index 711733c..ad567fc 100644 --- a/app/store/hdl/hdl_file_img_req_upload.go +++ b/app/store/hdl/hdl_file_img_req_upload.go @@ -24,11 +24,7 @@ func ImgReqUpload(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS) return } - // 限制用户上传目录 - if _, ok := md.FileUserDir[args.Dir]; !ok { - e.OutErr(c, e.ERR_FORBIDEN) - return - } + scheme := "http" if c.Request.TLS != nil { scheme = "https" @@ -65,11 +61,7 @@ func ImgReqUploadNoUser(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS) return } - // 限制用户上传目录 - if _, ok := md.FileUserDir[args.Dir]; !ok { - e.OutErr(c, e.ERR_FORBIDEN) - return - } + scheme := "http" if c.Request.TLS != nil { scheme = "https" diff --git a/app/store/svc/svc_agent_goods.go b/app/store/svc/svc_agent_goods.go index 4bffd12..885a048 100644 --- a/app/store/svc/svc_agent_goods.go +++ b/app/store/svc/svc_agent_goods.go @@ -78,6 +78,7 @@ func AgentGoodsCopy(c *gin.Context) { v.Stock = 0 v.Uid = user.Info.Uid v.StoreType = 1 + v.Cid = 0 _, err := sess.Insert(&v) if err != nil { sess.Rollback()