Initial commit: web_hghl_server

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 16:28:14 +08:00
co-authored by Claude Opus 4.7
commit 65fca60622
653 changed files with 135901 additions and 0 deletions
+122
View File
@@ -0,0 +1,122 @@
package lawandtrust
import (
"videoweb/app/api/proto"
"videoweb/app/service/configser"
"videoweb/app/service/searchser"
"videoweb/app/service/translationser"
"videoweb/pub/common"
"videoweb/pub/common/srvdef"
"github.com/gin-gonic/gin"
)
// UserAgreementApi 用户协议
// @Tags 用户协议
// @Summary 用户协议
// @Description 用户协议
// @Accept json
// @Produce json
// @Param param body string true "参数列表"
// @Success 200 {object} proto.LawAndTrustHtmlData "成功"
// @Failure 400 {string} string "获取失败的返回结果"
// @Security ApiKeyAuth
// @Router /useragreement [get]
func UserAgreementApi(c *gin.Context) {
data := proto.LawAndTrustHtmlData{
Path: c.Request.URL.Path,
Translations: translationser.GetTranslationData(),
BottonTranslations: translationser.GetTranslationBottomList(),
Config: configser.GetRequestConfig(c),
Announcement: configser.GetAnnouncement(),
Advitise: configser.GetAdvitise(),
HotSearch: searchser.GetHotSearchItem(c),
}
data.CompletePath = "/useragreement"
configser.RewriteImageCdn(c, &data)
common.JSONWriterCache(c, srvdef.Success, data)
}
// PrivacyPolicyApi 隐私策略
// @Tags 隐私策略
// @Summary 隐私策略
// @Description 隐私策略
// @Accept json
// @Produce json
// @Param param body string true "参数列表"
// @Success 200 {object} proto.LawAndTrustHtmlData "成功"
// @Failure 400 {string} string "获取失败的返回结果"
// @Security ApiKeyAuth
// @Router /privacyPolicy [get]
func PrivacyPolicyApi(c *gin.Context) {
data := proto.LawAndTrustHtmlData{
Path: c.Request.URL.Path,
Translations: translationser.GetTranslationData(),
BottonTranslations: translationser.GetTranslationBottomList(),
Config: configser.GetRequestConfig(c),
Announcement: configser.GetAnnouncement(),
Advitise: configser.GetAdvitise(),
HotSearch: searchser.GetHotSearchItem(c),
}
data.CompletePath = "/useragreement"
configser.RewriteImageCdn(c, &data)
common.JSONWriterCache(c, srvdef.Success, data)
}
// DmcaApi dmca
// @Tags dmca
// @Summary dmca
// @Description dmca
// @Accept json
// @Produce json
// @Param param body string true "参数列表"
// @Success 200 {object} proto.LawAndTrustHtmlData "成功"
// @Failure 400 {string} string "获取失败的返回结果"
// @Security ApiKeyAuth
// @Router /dmca [get]
func DmcaApi(c *gin.Context) {
data := proto.LawAndTrustHtmlData{
Path: c.Request.URL.Path,
Translations: translationser.GetTranslationData(),
BottonTranslations: translationser.GetTranslationBottomList(),
Config: configser.GetRequestConfig(c),
Announcement: configser.GetAnnouncement(),
Advitise: configser.GetAdvitise(),
HotSearch: searchser.GetHotSearchItem(c),
}
data.CompletePath = "/useragreement"
configser.RewriteImageCdn(c, &data)
common.JSONWriterCache(c, srvdef.Success, data)
}
// StatementApi 合规声明
// @Tags 合规声明
// @Summary 合规声明
// @Description 合规声明
// @Accept json
// @Produce json
// @Param param body string true "参数列表"
// @Success 200 {object} proto.LawAndTrustHtmlData "成功"
// @Failure 400 {string} string "获取失败的返回结果"
// @Security ApiKeyAuth
// @Router /statement [get]
func StatementApi(c *gin.Context) {
data := proto.LawAndTrustHtmlData{
Path: c.Request.URL.Path,
Translations: translationser.GetTranslationData(),
BottonTranslations: translationser.GetTranslationBottomList(),
Config: configser.GetRequestConfig(c),
Announcement: configser.GetAnnouncement(),
Advitise: configser.GetAdvitise(),
HotSearch: searchser.GetHotSearchItem(c),
}
data.CompletePath = "/useragreement"
configser.RewriteImageCdn(c, &data)
common.JSONWriterCache(c, srvdef.Success, data)
}