feat:完善项目信息

This commit is contained in:
henry
2022-01-13 15:23:27 +08:00
parent e3909112ce
commit 0494bbf5d0
18 changed files with 396 additions and 15 deletions

View File

@ -48,6 +48,17 @@ func (this *ImageForm) FilterImageURL() string {
return strings.Replace(this.Image, config.SettingInfo.Domain, "", -1)
}
type ImagesForm struct {
Images []string `json:"images" form:"images"`
}
func (this *ImagesForm) FilterImageURL() []string {
for _, v := range this.Images {
v = strings.Replace(v, config.SettingInfo.Domain, "", -1)
}
return this.Images
}
type FileForm struct {
File string `json:"file" form:"file"`
}

View File

@ -19,7 +19,7 @@ var (
)
// GetIndustryInfo 获取行业信息
func GetIndustryInfo(industry, mark string) string {
func GetIndustryInfo(industry, mark, sep string) string {
obj := strings.Split(industry, mark)
out := make([]string, 0)
@ -31,5 +31,5 @@ func GetIndustryInfo(industry, mark string) string {
}
out = append(out, data)
}
return strings.Join(out, "-")
return strings.Join(out, sep)
}