|
@@ -285,6 +285,38 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+ func isSubscribeCode()-> Bool {//是否是订阅
|
|
|
+ if(product_code == "standard-annual-subscription" ||
|
|
|
+ product_code == "advanced-annual-subscription-blackFive" ||
|
|
|
+ product_code == "advanced-annual-subscription-trail" ||
|
|
|
+ product_code == "advanced-annual-subscription" ||
|
|
|
+ product_code == "ai-subscription-year-trail" ||
|
|
|
+ product_code == "ai-subscription-month") {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ func isOneTimePurchaseCode()-> Bool { //是否是一次次购买
|
|
|
+ if(product_code == "advanced-permanent-blackFive" ||
|
|
|
+ product_code == "advanced-permanent") {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ func isBlackFiveCode()-> Bool { //是否是黑五
|
|
|
+ if(product_code == "advanced-permanent-blackFive" ||
|
|
|
+ product_code == "advanced-annual-subscription-blackFive") {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ func isHaveAvailableCoupon()-> Bool { //是否有优惠卷
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
func updateKMDMGProductType(_ productinfo: KMListingProductsModel) -> Void {
|
|
|
switch productinfo.code {
|
|
|
case "advanced-annual-subscription-trail":
|
|
@@ -353,6 +385,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
addbox.fillColor = NSColor(named: "0E1114 1") ?? .white
|
|
|
removebox.fillColor = NSColor(named: "0E1114 1") ?? .white
|
|
|
|
|
|
+
|
|
|
textbox.fillColor = NSColor(named: "0E1114 2") ?? .white
|
|
|
yourOrderLabel.stringValue = NSLocalizedString("Your Order", comment: "")
|
|
|
yourOrderLabel.textColor = NSColor(named: "KMPurchaseTitleColor")
|
|
@@ -1101,6 +1134,9 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
wechatPayButton.isHidden = false
|
|
|
}
|
|
|
amountTextField1.stringValue = String(pdfCount)
|
|
|
+
|
|
|
+ let viewHidden = pdfCount <= 1
|
|
|
+ firmLabel.isHidden = viewHidden
|
|
|
}
|
|
|
|
|
|
// 价格刷新
|
|
@@ -1967,6 +2003,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
self.payTypeImageView.image = NSImage(named: "EmbeddedPayment28")
|
|
|
}
|
|
|
let img = self.convertBase64StringToNSImage(base64String: urlPath)
|
|
|
+
|
|
|
self.qrCodeImageView.image = img
|
|
|
|
|
|
}
|