feat: support background_color background_image_url

This commit is contained in:
line-6000
2026-05-11 16:03:32 +08:00
parent 84972ea0f0
commit 1c805ed061
178 changed files with 278 additions and 242 deletions
+8
View File
@@ -184,6 +184,14 @@ func GetBrandSupportURL() string {
return strings.TrimSpace(GetSettingString(mdb.SettingKeyBrandSupportUrl, ""))
}
func GetBrandBackgroundColor() string {
return strings.TrimSpace(GetSettingString(mdb.SettingKeyBrandBackgroundColor, ""))
}
func GetBrandBackgroundImageURL() string {
return strings.TrimSpace(GetSettingString(mdb.SettingKeyBrandBackgroundImageUrl, ""))
}
// OkPay settings helpers keep the provider-specific defaults in one place so
// business logic does not need to repeat raw settings keys.
func GetOkPayEnabled() bool {
+2
View File
@@ -38,6 +38,8 @@ const (
SettingKeyBrandSuccessCopy = "brand.success_copy"
SettingKeyBrandPaySuccess = "brand.pay_success_text"
SettingKeyBrandSupportUrl = "brand.support_url"
SettingKeyBrandBackgroundColor = "brand.background_color"
SettingKeyBrandBackgroundImageUrl = "brand.background_image_url"
SettingKeyRateForcedUsdt = "rate.forced_usdt_rate"
SettingKeyRateAdjustPercent = "rate.adjust_percent"
SettingKeyRateOkxC2cEnabled = "rate.okx_c2c_enabled"
+6 -4
View File
@@ -12,10 +12,12 @@ type EpayPublicConfig struct {
}
type SitePublicConfig struct {
CashierName string `json:"cashier_name" example:"Acme Cashier"`
LogoURL string `json:"logo_url" example:"https://cdn.example.com/logo.png"`
WebsiteTitle string `json:"website_title" example:"Acme Payments"`
SupportLink string `json:"support_link" example:"https://example.com/support"`
CashierName string `json:"cashier_name" example:"Acme Cashier"`
LogoURL string `json:"logo_url" example:"https://cdn.example.com/logo.png"`
WebsiteTitle string `json:"website_title" example:"Acme Payments"`
SupportLink string `json:"support_link" example:"https://example.com/support"`
BackgroundColor string `json:"background_color" example:"#0f172a"`
BackgroundImageURL string `json:"background_image_url" example:"https://cdn.example.com/background.png"`
}
type OkPayPublicConfig struct {