Kaynağa Gözat

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

wanjun 3 ay önce
ebeveyn
işleme
3f2dd0b386

+ 2 - 0
PDF Office/PDF Master/Class/KMAdvertisement/View/Tableview/KMAdvertisementTableView.swift

@@ -114,6 +114,8 @@ extension KMAdvertisementTableView: NSCollectionViewDelegate {
         print("点击")
         let view = collectionView.item(at: indexPaths.first!) as! KMAdvertisementCollectionViewItem
         
+        self.collectionView.deselectItems(at: indexPaths)
+        
         let content = view.model
         
         guard let callBack = didSelect else { return }

+ 6 - 5
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -511,10 +511,9 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "CN" {
             abbreviation = "CNY"
         }
-        
-        let insting = Float(showSinglePriceString() ?? "0") ?? 0
-        
-        listPrice = Float(String(format: "%.2f", insting)) ?? 0  //单价*购买个数
+                
+        let insting = Float(showSinglePriceString())
+        listPrice = Float(String(format: "%.2f", Float((insting ?? 0) * Float(pdfCount)))) ?? 0  //单价*购买个数
         
         if _product_code == "advanced-annual-subscription-trail"       ||
             _product_code == "advanced-annual-subscription-blackFive"   ||
@@ -1319,7 +1318,9 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         let enterpriseStr = NSLocalizedString("enterprise version", tableName: "MemberCenterLocalizable", comment: "")
         let fireFullString = String(format: firmString, enterpriseStr)
         let firmLinkColor = NSColor(named: "4982E6") ?? NSColor.blue
-        let attri = NSMutableAttributedString(string: fireFullString, attributes: [.foregroundColor : firmLinkColor, .font : NSFont.SFProTextRegularFont(14.0)])
+        let paragraphStyle = NSMutableParagraphStyle()
+        paragraphStyle.alignment = .right // 设置为右对齐
+        let attri = NSMutableAttributedString(string: fireFullString, attributes: [.foregroundColor : firmLinkColor, .font : NSFont.SFProTextRegularFont(14.0),.paragraphStyle:paragraphStyle,])
         // 定义链接的范围
         let enterpriseRange = (fireFullString as NSString).range(of: enterpriseStr)
         let firmFont = NSFont.SFProTextRegularFont(14.0) // 与普通文本相同的字体