|
@@ -700,7 +700,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
self?.product_Info.displayCnyPriceString = nil
|
|
|
self?.product_Info.individualPriceString = batchProductPrice.price
|
|
|
self?.product_Info.individualCnyPriceString = batchProductPrice.cnyPrice
|
|
|
-
|
|
|
+
|
|
|
+ if self?._paymentMethod == .alipay || self?._paymentMethod == .wxpay {
|
|
|
+ self?.updatePrice()
|
|
|
+ }
|
|
|
self?.priceRefresh(productsModel: self?.product_Info ?? KMListingProductsModel())
|
|
|
}
|
|
|
} else {
|
|
@@ -782,6 +785,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
self?.product_Info.individualCnyPriceString = couponModel.cnyPriceString
|
|
|
self?.product_Info.verifyofferCode = self?.coupomTextField.stringValue ?? ""
|
|
|
|
|
|
+ if self?._paymentMethod == .alipay || self?._paymentMethod == .wxpay {
|
|
|
+ self?.updatePrice()
|
|
|
+ }
|
|
|
+
|
|
|
self?.priceRefresh(productsModel: self?._product_Info ?? KMListingProductsModel())
|
|
|
}else {
|
|
|
let alert = NSAlert()
|
|
@@ -1161,6 +1168,22 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private func updatePrice() {
|
|
|
+ if _paymentMethod == .wxpay {
|
|
|
+ wechatPayButton.image = NSImage(named: "EmbeddedPayment22")
|
|
|
+ wechatPayButton2.image = NSImage(named: "EmbeddedPayment22")
|
|
|
+ payBox.contentView = weChatPayView
|
|
|
+ weChatBox.fillColor = NSColor(named: "KMPurchaseBoxColor") ?? NSColor.blue
|
|
|
+ payBoxHeight.constant = 92.0
|
|
|
+ } else if _paymentMethod == .alipay {
|
|
|
+ alipayButton.image = NSImage(named: "EmbeddedPayment24")
|
|
|
+ payBox.contentView = weChatPayView
|
|
|
+ weChatBox.fillColor = NSColor(named: "KMPurchaseBoxColor") ?? NSColor.blue
|
|
|
+ payBoxHeight.constant = 92.0
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
func isSubscribeCode()-> Bool {//是否是订阅
|
|
|
if(product_code == "standard-annual-subscription" ||
|
|
|
product_code == "advanced-annual-subscription-blackFive" ||
|