huangjiajun pirms 2 mēnešiem
vecāks
revīzija
dce1dd1069
4 mainītis faili ar 9 papildinājumiem un 30 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt