huangjiajun 1 maand geleden
bovenliggende
commit
dce1dd1069
4 gewijzigde bestanden met toevoegingen van 9 en 30 verwijderingen
  1. +5
    -10
      app/agent/hdl/hdl_file_img_req_upload.go
  2. +1
    -10
      app/hdl/hdl_file_img_req_upload.go
  3. +2
    -10
      app/store/hdl/hdl_file_img_req_upload.go
  4. +1
    -0
      app/store/svc/svc_agent_goods.go

+ 5
- 10
app/agent/hdl/hdl_file_img_req_upload.go Bestand weergeven

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


+ 1
- 10
app/hdl/hdl_file_img_req_upload.go Bestand weergeven

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


+ 2
- 10
app/store/hdl/hdl_file_img_req_upload.go Bestand weergeven

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


+ 1
- 0
app/store/svc/svc_agent_goods.go Bestand weergeven

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


Laden…
Annuleren
Opslaan