This commit is contained in:
mubai
2024-10-30 23:41:50 +08:00
parent d1433e4b5b
commit 57323dae2f
48 changed files with 1134 additions and 425 deletions

View File

@@ -7,6 +7,7 @@ import (
"server/config"
"server/model/system"
"server/plugin/db"
"server/plugin/spider"
"strings"
)
@@ -52,11 +53,19 @@ func (i *IndexLogic) IndexPage() map[string]interface{} {
list = append(list, item)
}
Info["content"] = list
// 3. 获取首页轮播数据
Info["banners"] = system.GetBanners()
// 不存在首页数据缓存时将查询数据缓存到redis中
system.DataCache(config.IndexCacheKey, Info)
return Info
}
// ClearIndexCache 删除首页数据缓存
func (i *IndexLogic) ClearIndexCache() {
// 更新成功后删除首页缓存
spider.ClearCache()
}
// GetFilmDetail 影片详情信息页面处理
func (i *IndexLogic) GetFilmDetail(id int) system.MovieDetailVo {
// 通过Id 获取影片search信息