|
@@ -34,7 +34,7 @@ public enum PremiumPeriod: String, CaseIterable {
|
|
|
var saveString: String {
|
|
|
switch self {
|
|
|
case .none:
|
|
|
- return "40%"
|
|
|
+ return "80%"//"40%" 增加月付费
|
|
|
default:
|
|
|
return "80%"
|
|
|
}
|
|
@@ -123,7 +123,7 @@ public class PurchaseManager: NSObject {
|
|
|
// 商品信息
|
|
|
public lazy var purchaseProducts: [PurchaseProduct] = {
|
|
|
[
|
|
|
- PurchaseProduct(productId: "101", period: .month),
|
|
|
+// PurchaseProduct(productId: "101", period: .month),//增加月付费
|
|
|
PurchaseProduct(productId: "102", period: .year),
|
|
|
PurchaseProduct(productId: "103", period: .week)
|
|
|
]
|
|
@@ -215,7 +215,7 @@ public class PurchaseManager: NSObject {
|
|
|
|
|
|
public var vipType: PremiumPeriod {
|
|
|
#if DEBUG
|
|
|
- return PremiumPeriod.month
|
|
|
+ return PremiumPeriod.none
|
|
|
#endif
|
|
|
guard isVip, let type = vipInformation["type"] as? String else {
|
|
|
return .none
|
|
@@ -625,20 +625,6 @@ extension PurchaseManager {
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
|
-// func findLatestSubscription(_ receipts: [[String: Any]]?) -> [String: Any]? {
|
|
|
-// guard let receiptInfo = receipts , !receiptInfo.isEmpty else {
|
|
|
-// return nil
|
|
|
-// }
|
|
|
-//
|
|
|
-// // 使用 max(by:) 找出 expires_date_ms 最大的对象
|
|
|
-// let latestSubscription = receiptInfo.max { (first, second) -> Bool in
|
|
|
-// let firstExpiry = Int(first["expires_date_ms"] as? String ?? "0") ?? 0
|
|
|
-// let secondExpiry = Int(second["expires_date_ms"] as? String ?? "0") ?? 0
|
|
|
-// return firstExpiry < secondExpiry
|
|
|
-// }
|
|
|
-//
|
|
|
-// return latestSubscription
|
|
|
-// }
|
|
|
|
|
|
// 终生会员过期时间:100年
|
|
|
var lifetimeExpireTime: String {
|