feat:完善项目信息
This commit is contained in:
@ -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"`
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user