feat: mobile app promotion page
This commit is contained in:
parent
4519dc025b
commit
8c5ba89f7d
3 changed files with 4 additions and 0 deletions
|
@ -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_theme_color", Value: "#000000", Type: "pwa"},
|
||||||
{Name: "pwa_background_color", Value: "#ffffff", 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: "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"`
|
CaptchaType string `json:"captcha_type"`
|
||||||
TCaptchaCaptchaAppId string `json:"tcaptcha_captcha_app_id"`
|
TCaptchaCaptchaAppId string `json:"tcaptcha_captcha_app_id"`
|
||||||
RegisterEnabled bool `json:"registerEnabled"`
|
RegisterEnabled bool `json:"registerEnabled"`
|
||||||
|
AppPromotion bool `json:"app_promotion"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type task struct {
|
type task struct {
|
||||||
|
@ -83,6 +84,7 @@ func BuildSiteConfig(settings map[string]string, user *model.User) Response {
|
||||||
CaptchaType: checkSettingValue(settings, "captcha_type"),
|
CaptchaType: checkSettingValue(settings, "captcha_type"),
|
||||||
TCaptchaCaptchaAppId: checkSettingValue(settings, "captcha_TCaptcha_CaptchaAppId"),
|
TCaptchaCaptchaAppId: checkSettingValue(settings, "captcha_TCaptcha_CaptchaAppId"),
|
||||||
RegisterEnabled: model.IsTrueVal(checkSettingValue(settings, "register_enabled")),
|
RegisterEnabled: model.IsTrueVal(checkSettingValue(settings, "register_enabled")),
|
||||||
|
AppPromotion: model.IsTrueVal(checkSettingValue(settings, "show_app_promotion")),
|
||||||
}}
|
}}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ func SiteConfig(c *gin.Context) {
|
||||||
"captcha_type",
|
"captcha_type",
|
||||||
"captcha_TCaptcha_CaptchaAppId",
|
"captcha_TCaptcha_CaptchaAppId",
|
||||||
"register_enabled",
|
"register_enabled",
|
||||||
|
"show_app_promotion",
|
||||||
)
|
)
|
||||||
|
|
||||||
// 如果已登录,则同时返回用户信息和标签
|
// 如果已登录,则同时返回用户信息和标签
|
||||||
|
|
Loading…
Add table
Reference in a new issue