Sfoglia il codice sorgente

【fix】【个人登录后卡片】按钮没有hover效果

tangchao 2 settimane fa
parent
commit
8a87a8393c

+ 22 - 0
PDF Office/PDF Master/MemberCenter/Assets/MemberCenter.xcassets/Image/BuyNewArrowImage2Hover.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "filename" : "arrow-right.pdf",
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "filename" : "arrow-right 1.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 80 - 0
PDF Office/PDF Master/MemberCenter/Assets/MemberCenter.xcassets/Image/BuyNewArrowImage2Hover.imageset/arrow-right 1.pdf

@@ -0,0 +1,80 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 2.666504 3.203125 cm
+0.286275 0.509804 0.901961 scn
+5.528595 9.268605 m
+5.788945 9.528955 6.211055 9.528955 6.471404 9.268605 c
+10.471404 5.268605 l
+10.731753 5.008255 10.731753 4.586145 10.471404 4.325796 c
+6.471404 0.325796 l
+6.211055 0.065446 5.788945 0.065446 5.528595 0.325796 c
+5.268246 0.586145 5.268246 1.008255 5.528595 1.268604 c
+8.390524 4.130534 l
+0.666667 4.130534 l
+0.298477 4.130534 0.000000 4.429010 0.000000 4.797200 c
+0.000000 5.165390 0.298477 5.463867 0.666667 5.463867 c
+8.390524 5.463867 l
+5.528595 8.325796 l
+5.268246 8.586145 5.268246 9.008256 5.528595 9.268605 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  664
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000754 00000 n
+0000000776 00000 n
+0000000949 00000 n
+0000001023 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1082
+%%EOF

+ 80 - 0
PDF Office/PDF Master/MemberCenter/Assets/MemberCenter.xcassets/Image/BuyNewArrowImage2Hover.imageset/arrow-right.pdf

@@ -0,0 +1,80 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 2.666504 3.203125 cm
+0.286275 0.509804 0.901961 scn
+5.528595 9.268605 m
+5.788945 9.528955 6.211055 9.528955 6.471404 9.268605 c
+10.471404 5.268605 l
+10.731753 5.008255 10.731753 4.586145 10.471404 4.325796 c
+6.471404 0.325796 l
+6.211055 0.065446 5.788945 0.065446 5.528595 0.325796 c
+5.268246 0.586145 5.268246 1.008255 5.528595 1.268604 c
+8.390524 4.130534 l
+0.666667 4.130534 l
+0.298477 4.130534 0.000000 4.429010 0.000000 4.797200 c
+0.000000 5.165390 0.298477 5.463867 0.666667 5.463867 c
+8.390524 5.463867 l
+5.528595 8.325796 l
+5.268246 8.586145 5.268246 9.008256 5.528595 9.268605 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  664
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000754 00000 n
+0000000776 00000 n
+0000000949 00000 n
+0000001023 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1082
+%%EOF

+ 63 - 5
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -727,6 +727,13 @@ class KMUserInfoViewController: NSViewController {
                KMMemberInfo.shared.userScenarioType == .pro_type2 ||
                KMMemberInfo.shared.userScenarioType == .pro_type4 ||
                KMMemberInfo.shared.userScenarioType == .pro_type5 { //订阅或者买断
+                if mouseEntered {
+                    self.arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2Hover")
+                    self.buyNow1Label.textColor = NSColor(hex: "4982E6")
+                } else {
+                    self.arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2")
+                    self.buyNow1Label.textColor = NSColor(hex: "0E1114")
+                }
             } else {
                 if mouseEntered {
                     self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2_Hov")
@@ -1136,12 +1143,63 @@ class KMUserInfoViewController: NSViewController {
         buyNow1Box.moveCallback =  { [weak self](mouseEntered: Bool, mouseBox: KMBox) -> Void in
             guard let self = self else { return }
             
-            if mouseEntered {
-                self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2_Hov")
-            } else {
-                self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2")
+            if KMMemberInfo.shared.userScenarioType == .dmg_type5 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type6 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type7 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type28 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type29 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type30 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type43 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type44 ||
+                KMMemberInfo.shared.userScenarioType == .dmg_type45 { // 买断
+                if mouseEntered {
+                    self.arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2Hover")
+                    self.buyNow1Label.textColor = NSColor(hex: "4982E6")
+                } else {
+                    self.arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2")
+                    self.buyNow1Label.textColor = NSColor(hex: "0E1114")
+                }
+            } else if KMMemberInfo.shared.userScenarioType == .dmg_type8 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type9 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type10 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type12 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type13 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type14 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type15 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type16 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type17 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type20 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type21 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type23 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type24 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type25 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type26 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type27 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type31 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type32 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type35 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type36 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type38 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type39 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type40 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type41 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type42 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type46 ||
+                        KMMemberInfo.shared.userScenarioType == .dmg_type47 { // 订阅
+                if mouseEntered {
+                    self.arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2Hover")
+                    self.buyNow1Label.textColor = NSColor(hex: "4982E6")
+                } else {
+                    self.arrow1ImageView.image = NSImage(named: "BuyNewArrowImage2")
+                    self.buyNow1Label.textColor = NSColor(hex: "0E1114")
+                }
+            } else {   
+                if mouseEntered {
+                    self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2_Hov")
+                } else {
+                    self.buyNow1ImageView.image = NSImage(named: "ButtonBackgroundImage2")
+                }
             }
-
         }
         buyNow1Box.downCallback = { [weak self](downEntered: Bool, mouseBox: KMBox, event) -> Void in
             guard let self = self else { return }