作者 yangfu

fix: 封面

... ... @@ -430,10 +430,12 @@ func (l *MiniCreateArticleLogic) validateTextLimit(req *types.MiniArticleCreateR
for i := range req.Section {
num := utf8.RuneCountInString(req.Section[i])
wordNum += num
if num > 1000 {
return xerr.NewErrMsg("内容最多只能输入1000字")
}
}
if wordNum > 1000 {
return xerr.NewErrMsg("内容最多只能输入1000字")
//return xerr.NewErrMsg("内容最多只能输入1000字")
}
return nil
}
... ...
... ... @@ -188,9 +188,9 @@ func (l *SystemCreateArticleLogic) validate(req *types.SystemArticleCreateReques
return errors.New("标题最多只能输入64字")
}
//文章内容
if utf8.RuneCountInString(req.Content) > 1000 {
return errors.New("内容最多只能输入1000字")
}
//if utf8.RuneCountInString(req.Content) > 1000 {
// return errors.New("内容最多只能输入1000字")
//}
//图片
if len(req.Images) > 9 {
return errors.New("图片数量最多9张")
... ...
... ... @@ -200,10 +200,13 @@ func (l *SystemUpdateArticleLogic) validateTextLimit(req *types.SystemArticleUpd
wordNum := 0
for i := range req.Section {
num := utf8.RuneCountInString(req.Section[i].Content)
if num > 1000 {
return xerr.NewErrMsg("内容最多只能输入1000字")
}
wordNum += num
}
if wordNum > 1000 {
return xerr.NewErrMsg("内容最多只能输入1000字")
//return xerr.NewErrMsg("内容最多只能输入1000字")
}
return nil
}
... ...