专题和短剧 slug 改为 8 位随机小写字母
后台新建/修改(未填 slug)和媒资入库时生成随机 slug,不再按标题拼音生成;标签、分类不变。 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1276,8 +1276,7 @@ func ensureImportedPlayletSlug(ctx context.Context, playlet *playletmod.Playlet)
|
||||
if playlet == nil {
|
||||
return srvdef.New(srvdef.ErrParamError, "短剧数据为空", "")
|
||||
}
|
||||
source := utils.SlugSourceFromKeywordsOrTitle(playlet.SeoInfo.Keyworld, playlet.Title)
|
||||
playlet.Slug = utils.MakeUniqueSlug(source, func(slug string) bool {
|
||||
playlet.Slug = utils.MakeRandomSlug(func(slug string) bool {
|
||||
exist, _ := playletmod.FindOnePlaylet(ctx, bson.M{
|
||||
playletmod.FN.Playlet.Slug: slug,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user