feat: 更新项目代码

This commit is contained in:
2026-04-01 22:03:57 +08:00
parent 1c81d4e6ea
commit 284b5a5260
53 changed files with 6240 additions and 22665 deletions

View File

@@ -131,6 +131,19 @@ func resolve60sUpstream(sourceID string) (id string, info sixtySrcInfo) {
return id, info
}
// EffectiveSixtyUpstream 返回当前站点配置的 60s API 根地址(读库;无记录或库不可用则回落默认 self
func EffectiveSixtyUpstream(db *gorm.DB) (sourceID string, base string, label string) {
sid := ""
if db != nil {
var row model.Site60sUpstream
if err := db.First(&row, 1).Error; err == nil {
sid = row.SourceID
}
}
id, info := resolve60sUpstream(sid)
return id, info.Base, info.Label
}
// Get60sSource 公开:当前站点使用的 60s 上游 base_url供静态页 iframe 传参)
func (h *SiteConfigHandler) Get60sSource(c *gin.Context) {
var row model.Site60sUpstream