feat: mobile app promotion page

pull/1561/head
HFO4 2 years ago
parent 4519dc025b
commit 8c5ba89f7d

@ -113,4 +113,5 @@ Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; verti
{Name: "pwa_theme_color", Value: "#000000", Type: "pwa"},
{Name: "pwa_background_color", Value: "#ffffff", Type: "pwa"},
{Name: "office_preview_service", Value: "https://view.officeapps.live.com/op/view.aspx?src={$src}", Type: "preview"},
{Name: "show_app_promotion", Value: "1", Type: "mobile"},
}

@ -22,6 +22,7 @@ type SiteConfig struct {
CaptchaType string `json:"captcha_type"`
TCaptchaCaptchaAppId string `json:"tcaptcha_captcha_app_id"`
RegisterEnabled bool `json:"registerEnabled"`
AppPromotion bool `json:"app_promotion"`
}
type task struct {
@ -83,6 +84,7 @@ func BuildSiteConfig(settings map[string]string, user *model.User) Response {
CaptchaType: checkSettingValue(settings, "captcha_type"),
TCaptchaCaptchaAppId: checkSettingValue(settings, "captcha_TCaptcha_CaptchaAppId"),
RegisterEnabled: model.IsTrueVal(checkSettingValue(settings, "register_enabled")),
AppPromotion: model.IsTrueVal(checkSettingValue(settings, "show_app_promotion")),
}}
return res
}

@ -27,6 +27,7 @@ func SiteConfig(c *gin.Context) {
"captcha_type",
"captcha_TCaptcha_CaptchaAppId",
"register_enabled",
"show_app_promotion",
)
// 如果已登录,则同时返回用户信息和标签

Loading…
Cancel
Save