feat(payment): 支持赛里木湖品牌收款页与独立缓存
This commit is contained in:
@@ -35,6 +35,14 @@ struct PayPageConfig: Codable, Sendable, Equatable {
|
||||
subtitle: "那拉提景区"
|
||||
)
|
||||
|
||||
/// 赛里木湖景区随包默认文案,图片由展示层选择本地资源。
|
||||
static let sailimuDefault = PayPageConfig(
|
||||
background: "",
|
||||
logo: "",
|
||||
title: "赛里木湖旅拍管理\n收费平台",
|
||||
subtitle: "赛里木湖景区"
|
||||
)
|
||||
|
||||
/// 将服务端非空有效字段合并到当前可用配置。
|
||||
func merging(_ response: PayPageConfigResponse) -> PayPageConfig {
|
||||
PayPageConfig(
|
||||
@@ -61,10 +69,22 @@ enum PayPageBrandingPolicy {
|
||||
/// 那拉提景区正式 ID。
|
||||
static let nalatiScenicId = 128
|
||||
|
||||
/// 判断当前景区是否启用品牌收款页。
|
||||
/// 赛里木湖景区正式 ID。
|
||||
static let sailimuScenicId = 125
|
||||
|
||||
/// 判断当前景区是否为那拉提。
|
||||
static func isNalati(scenicId: Int) -> Bool {
|
||||
scenicId == nalatiScenicId
|
||||
}
|
||||
|
||||
/// 返回支持品牌收款页的景区默认配置;其他景区继续使用普通页面。
|
||||
static func defaultConfig(scenicId: Int) -> PayPageConfig? {
|
||||
switch scenicId {
|
||||
case nalatiScenicId: return .nalatiDefault
|
||||
case sailimuScenicId: return .sailimuDefault
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 收款页当前账号信息的展示文本格式化规则。
|
||||
|
||||
Reference in New Issue
Block a user