更新小程序,优化单页模式下的用户引导逻辑,确保用户在朋友圈等环境中能够顺利登录和访问完整内容。调整章节内容获取逻辑,确保未授权用户无法访问完整内容。新增手机号同步功能,提升用户资料管理体验。
This commit is contained in:
@@ -199,9 +199,13 @@ func findChapterAndRespond(c *gin.Context, whereFn func(*gorm.DB) *gorm.DB) {
|
||||
returnContent = previewContent(ch.Content)
|
||||
}
|
||||
|
||||
// data 中的 content 必须与外层 content 一致,避免泄露完整内容给未授权用户
|
||||
chForResponse := ch
|
||||
chForResponse.Content = returnContent
|
||||
|
||||
out := gin.H{
|
||||
"success": true,
|
||||
"data": ch,
|
||||
"data": chForResponse,
|
||||
"content": returnContent,
|
||||
"chapterTitle": ch.ChapterTitle,
|
||||
"partTitle": ch.PartTitle,
|
||||
|
||||
Reference in New Issue
Block a user