123 lines
3.9 KiB
Go
123 lines
3.9 KiB
Go
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)
|
|
}
|