增加多图片自动生成功能

This commit is contained in:
piexlMax
2023-07-18 22:19:12 +08:00
parent 350ce2ad35
commit c618fcafaa
11 changed files with 130 additions and 10 deletions

View File

@@ -145,8 +145,13 @@ func (autoCodeService *AutoCodeService) PreviewTemp(autoCode system.AutoCodeStru
if autoCode.Fields[i].FieldType == "picture" {
autoCode.HasPic = true
}
if autoCode.Fields[i].FieldType == "pictures" {
autoCode.HasPic = true
autoCode.NeedJSON = true
}
if autoCode.Fields[i].FieldType == "file" {
autoCode.HasFile = true
autoCode.NeedJSON = true
}
}
dataList, _, needMkdir, err := autoCodeService.getNeedList(&autoCode)
@@ -241,7 +246,12 @@ func (autoCodeService *AutoCodeService) CreateTemp(autoCode system.AutoCodeStruc
if autoCode.Fields[i].FieldType == "picture" {
autoCode.HasPic = true
}
if autoCode.Fields[i].FieldType == "pictures" {
autoCode.NeedJSON = true
autoCode.HasPic = true
}
if autoCode.Fields[i].FieldType == "file" {
autoCode.NeedJSON = true
autoCode.HasFile = true
}
}