|
@@ -255,6 +255,18 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @objc static func currentCode(_ productCode: String) -> KMPurchaseEmbeddedWindowController {
|
|
|
+ if currentWindowController != nil {
|
|
|
+ currentWindowController.product_code = productCode
|
|
|
+ return currentWindowController
|
|
|
+ } else {
|
|
|
+ let configWC: KMPurchaseEmbeddedWindowController = KMPurchaseEmbeddedWindowController.init(windowNibName: "KMPurchaseEmbeddedWindowController")
|
|
|
+ currentWindowController = configWC;
|
|
|
+ currentWindowController.product_code = productCode
|
|
|
+ return currentWindowController
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc static func currentFirstTrialWC(_ productId: String) -> KMPurchaseEmbeddedWindowController {
|
|
|
if currentWindowController != nil {
|
|
|
currentWindowController.productID = productId
|
|
@@ -1795,7 +1807,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
if product.code == self?.product_code {
|
|
|
self?.product_Info = product;
|
|
|
//更新价格
|
|
|
- self.updateProduct_Info()
|
|
|
+ self?.updateProduct_Info()
|
|
|
break
|
|
|
}
|
|
|
}
|