This commit is contained in:
邹宗楠
2023-07-13 11:20:01 +08:00
parent 63e51b8f0a
commit 6349a28868

View File

@@ -397,11 +397,21 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku
}
func checkNameLength(name string) string {
lastName := ""
if strings.Contains(name, "其它") {
name = strings.ReplaceAll(name, "其它", "")
}
if strings.Contains(name, "其她") {
name = strings.ReplaceAll(name, "其她", "")
}
if strings.Contains(name, "其他") {
name = strings.ReplaceAll(name, "其他", "")
}
if len(name) <= tao_vegetable.NameMaxLength {
return name
}
lastName := ""
if strings.Contains(name, "(") {
startIndex := strings.Index(name, "(")
endIndex := strings.Index(name, ")")