Prechádzať zdrojové kódy

feat: 修改会员页商品UI

Destiny 6 mesiacov pred
rodič
commit
a57090d17f
16 zmenil súbory, kde vykonal 766 pridanie a 113 odobranie
  1. 8 4
      QuickSearchLocation.xcodeproj/project.pbxproj
  2. 206 55
      QuickSearchLocation/Classes/Pages/QSLVip/Cell/QSLVipGoodCollectionViewCell.swift
  3. 322 0
      QuickSearchLocation/Classes/Pages/QSLVip/Cell/QSLVipMostGoodCell.swift
  4. 142 54
      QuickSearchLocation/Classes/Pages/QSLVip/Controller/QSLVipController.swift
  5. 22 0
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_select_big.imageset/Contents.json
  6. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_select_big.imageset/vip_good_select_big@2x.png
  7. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_select_big.imageset/vip_good_select_big@3x.png
  8. 22 0
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_unselect_big.imageset/Contents.json
  9. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_unselect_big.imageset/vip_good_unselect_big@2x.png
  10. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_unselect_big.imageset/vip_good_unselect_big@3x.png
  11. 22 0
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_goods_most_tag.imageset/Contents.json
  12. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_goods_most_tag.imageset/vip_goods_most_tag@2x.png
  13. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_goods_most_tag.imageset/vip_goods_most_tag@3x.png
  14. 22 0
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_recommend_tag.imageset/Contents.json
  15. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_recommend_tag.imageset/vip_recommend_tag@2x.png
  16. BIN
      QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_recommend_tag.imageset/vip_recommend_tag@3x.png

+ 8 - 4
QuickSearchLocation.xcodeproj/project.pbxproj

@@ -117,6 +117,7 @@
 		FE8360BB2D03002D00978E03 /* QSLMapPointModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE8360BA2D03002D00978E03 /* QSLMapPointModel.swift */; };
 		FE8360BD2D068DCB00978E03 /* QSLMemberModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE8360BC2D068DCB00978E03 /* QSLMemberModel.swift */; };
 		FE8360C02D06D33500978E03 /* QSLAppInfoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE8360BF2D06D33500978E03 /* QSLAppInfoController.swift */; };
+		FE9139C92DE6B018001A8E42 /* QSLVipMostGoodCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE9139C82DE6B018001A8E42 /* QSLVipMostGoodCell.swift */; };
 		FE94B4F42D23F09100D2B001 /* LoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE94B4F32D23F09100D2B001 /* LoadingViewController.swift */; };
 		FEC010E72D9E8B06008B8B0A /* QSLSubscriptionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEC010E62D9E8AFE008B8B0A /* QSLSubscriptionModel.swift */; };
 /* End PBXBuildFile section */
@@ -238,6 +239,7 @@
 		FE8360BA2D03002D00978E03 /* QSLMapPointModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLMapPointModel.swift; sourceTree = "<group>"; };
 		FE8360BC2D068DCB00978E03 /* QSLMemberModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLMemberModel.swift; sourceTree = "<group>"; };
 		FE8360BF2D06D33500978E03 /* QSLAppInfoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLAppInfoController.swift; sourceTree = "<group>"; };
+		FE9139C82DE6B018001A8E42 /* QSLVipMostGoodCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLVipMostGoodCell.swift; sourceTree = "<group>"; };
 		FE94B4F32D23F09100D2B001 /* LoadingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingViewController.swift; sourceTree = "<group>"; };
 		FEC010E62D9E8AFE008B8B0A /* QSLSubscriptionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QSLSubscriptionModel.swift; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -763,6 +765,7 @@
 			children = (
 				FE8360832CF8450C00978E03 /* QSLVipGoodCollectionViewCell.swift */,
 				FE8360852CF86E2800978E03 /* QSLVipCommentCellView.swift */,
+				FE9139C82DE6B018001A8E42 /* QSLVipMostGoodCell.swift */,
 			);
 			path = Cell;
 			sourceTree = "<group>";
@@ -1028,6 +1031,7 @@
 				04B6B51C2BCCFF7000777EB4 /* DateFormatter+Extension.swift in Sources */,
 				04F33BDD2BC68C6D003E2111 /* QSLBaseNavController.swift in Sources */,
 				04F33BDF2BC690A6003E2111 /* UIFont+Extension.swift in Sources */,
+				FE9139C92DE6B018001A8E42 /* QSLVipMostGoodCell.swift in Sources */,
 				FE638AA92D09858C00858121 /* QSLContactController.swift in Sources */,
 				04B6B52D2BCE2C9200777EB4 /* QSLMineViewModel.swift in Sources */,
 				04B666CB2BC922120020BFBD /* QSLHomeFriendView.swift in Sources */,
@@ -1230,7 +1234,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 17;
+				CURRENT_PROJECT_VERSION = 18;
 				DEVELOPMENT_TEAM = Q364C8K9BL;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -1254,7 +1258,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.1.3;
+				MARKETING_VERSION = 1.2.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.manbu.shouji;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1274,7 +1278,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 17;
+				CURRENT_PROJECT_VERSION = 18;
 				DEVELOPMENT_TEAM = Q364C8K9BL;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -1298,7 +1302,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.1.3;
+				MARKETING_VERSION = 1.2.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.manbu.shouji;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";

+ 206 - 55
QuickSearchLocation/Classes/Pages/QSLVip/Cell/QSLVipGoodCollectionViewCell.swift

@@ -7,19 +7,42 @@
 
 import UIKit
 
+enum GoodCellType {
+    case big
+    case small
+}
+
 class QSLVipGoodCollectionViewCell: UICollectionViewCell {
     
+    struct UX {
+        static let smallMainViewWidth = (QSLConst.qsl_kScreenW - 42.0.rpx) / 3.0 - 9.0.rpx
+        static let mainViewHeight = 94.0.rpx
+        static let bigMainViewWidth = (QSLConst.qsl_kScreenW - 36.0.rpx) / 2.0 - 9.0.rpx
+    }
+    
+    var type: GoodCellType = .small {
+        didSet {
+            self.updateUI()
+        }
+    }
+    
     var goodModel: QSLGoodModel?
     
     lazy var bgView: UIView = {
        
         let view = UIView()
-        view.backgroundColor = .white
-        view.addRadius(radius: 8.rpx)
-        view.addBorder(borderWidth: 2.rpx, borderColor: .hexStringColor(hexString: "#EEEEEE"))
+        view.backgroundColor = .hexStringColor(hexString: "#EEEEEE")
+        view.addRadius(radius: 12)
         return view
     }()
     
+    lazy var mostTagIcon: UIImageView = {
+       
+        let imageView = UIImageView()
+        imageView.image = UIImage(named: "vip_goods_most_tag")
+        return imageView
+    }()
+    
     lazy var tagIcon: UIImageView = {
        
         let imageView = UIImageView()
@@ -27,6 +50,14 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
         return imageView
     }()
     
+    lazy var mainView: UIView = {
+       
+        let view = UIView(frame: CGRect(x: 0, y: 0, width: UX.smallMainViewWidth, height: UX.mainViewHeight))
+        view.addFourCorner(topLeft: 11, topRight: 11, bottomLeft: 0, bottomRight: 0)
+        view.backgroundColor = .white
+        return view
+    }()
+
     lazy var goodNameLabel: UILabel = {
         
         let label = UILabel()
@@ -36,23 +67,6 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
         return label
     }()
     
-    lazy var goodDailyPriceLabel: UILabel = {
-        
-        let label = UILabel()
-        label.textAlignment = .center
-        label.addRadius(radius: 12.rpx)
-        label.backgroundColor = .hexStringColor(hexString: "#FFFEFC")
-        let text = "0.35元/天"
-        label.text(text)
-        label.font(9)
-        label.textColor = .hexStringColor(hexString: "#818181")
-//        if let range = text.range(of: "/") {
-//            let nsRange = NSRange(text.startIndex..<range.lowerBound, in: text)
-//            label.setRangeFontText(font: .textM(20), range: nsRange)
-//        }
-        return label
-    }()
-    
     lazy var priceLabel: UILabel = {
        
         let label = UILabel()
@@ -61,8 +75,8 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
 //        label.backgroundColor = .hexStringColor(hexString: "#F6F6F6")
         label.text("¥128")
         label.mediumFont(24)
-        label.textColor = .hexStringColor(hexString: "#F12A1D")
-        label.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#F12A1D"), font: UIFont.systemFont(ofSize: 14, weight: .medium))
+        label.textColor = .hexStringColor(hexString: "#404040")
+        label.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#404040"), font: UIFont.systemFont(ofSize: 14, weight: .medium))
         return label
     }()
     
@@ -76,6 +90,43 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
         return label
     }()
     
+    lazy var goodDailyPriceLabel: UILabel = {
+        
+        let label = UILabel()
+        let text = "仅需¥9.2/天,时刻守护Ta的安全"
+        label.text(text)
+        label.font(9)
+        label.textColor = .hexStringColor(hexString: "#818181")
+        label.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#818181"), font: UIFont.systemFont(ofSize: 9, weight: .heavy))
+        
+        if let yuanIndex = text.firstIndex(of: "¥") {
+            
+            // 获取文本最后一位的index
+            let lastIndex = text.index(before: text.endIndex)
+            
+            // 创建从¥后面一个字符到文本最后一位的range
+            let contentRange = text.index(after: yuanIndex)..<lastIndex
+            
+            // 将Swift的Range转换为NSRange
+            let nsRange = NSRange(
+                contentRange,
+                in: text
+            )
+            
+            label.setRangeFontText(font: UIFont.systemFont(ofSize: 12, weight: .heavy), range: nsRange)
+        }
+        
+        return label
+    }()
+    
+    lazy var selectBtn: UIButton = {
+      
+        let btn = UIButton()
+        btn.setBackgroundImage(UIImage(named: "vip_good_unselect_big"), for: .normal)
+        btn.setBackgroundImage(UIImage(named: "vip_good_select_big"), for: .selected)
+        return btn
+    }()
+    
     override init(frame: CGRect) {
         super.init(frame: frame)
         
@@ -86,26 +137,69 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
         fatalError("init(coder:) has not been implemented")
     }
     
-    func config(model: QSLGoodModel) {
+    func config(model: QSLGoodModel, type: GoodCellType) {
+        
         self.goodModel = model
+        self.type = type
         
+        self.selectBtn.isSelected = model.isSelect
+        let text = model.content
+        self.goodDailyPriceLabel.text = text
         if model.isSelect {
-            self.bgView.layer.borderColor = UIColor.hexStringColor(hexString: "#E7B983").cgColor
-            self.bgView.backgroundColor = .hexStringColor(hexString: "#FFF8EF")
+            self.bgView.backgroundColor = .hexStringColor(hexString: "#15CBA1")
+            
+            self.goodDailyPriceLabel.textColor = .white
+            self.goodDailyPriceLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#FFFFFF"), font: UIFont.systemFont(ofSize: 9, weight: .heavy))
+            
+            if let yuanIndex = text.firstIndex(of: "¥") {
+                
+                // 获取文本最后一位的index
+                let lastIndex = text.index(before: text.endIndex)
+                
+                // 创建从¥后面一个字符到文本最后一位的range
+                let contentRange = text.index(after: yuanIndex)...lastIndex
+                
+                // 将Swift的Range转换为NSRange
+                let nsRange = NSRange(
+                    contentRange,
+                    in: text
+                )
+                
+                self.goodDailyPriceLabel.setRangeFontText(font: UIFont.systemFont(ofSize: 12, weight: .heavy), range: nsRange)
+            }
+            
         } else {
-            self.bgView.layer.borderColor = UIColor.hexStringColor(hexString: "#EEEEEE").cgColor
-            self.bgView.backgroundColor = .white
+            self.bgView.backgroundColor = .hexStringColor(hexString: "#EEEEEE")
+            self.goodDailyPriceLabel.textColor = .hexStringColor(hexString: "#818181")
+            
+            self.goodDailyPriceLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#818181"), font: UIFont.systemFont(ofSize: 9, weight: .heavy))
+            
+            if let yuanIndex = text.firstIndex(of: "¥") {
+                
+                // 获取文本最后一位的index
+                let lastIndex = text.index(before: text.endIndex)
+                
+                // 创建从¥后面一个字符到文本最后一位的range
+                let contentRange = text.index(after: yuanIndex)...lastIndex
+                
+                // 将Swift的Range转换为NSRange
+                let nsRange = NSRange(
+                    contentRange,
+                    in: text
+                )
+                
+                self.goodDailyPriceLabel.setRangeFontText(font: UIFont.systemFont(ofSize: 12, weight: .heavy), range: nsRange)
+            }
         }
         
-        self.tagIcon.isHidden = !model.popular
+        self.mostTagIcon.isHidden = !model.popular
         
         self.goodNameLabel.text = model.name
 //        self.goodDailyPriceLabel.text = "0.001元/天"
-        self.goodDailyPriceLabel.text = model.content
-        let width = model.content.singleLineWidth(font: .textF(10)) + 24.rpx
-        self.goodDailyPriceLabel.snp.updateConstraints { make in
-            make.width.equalTo(width)
-        }
+//        let width = model.content.singleLineWidth(font: .textF(10)) + 24.rpx
+//        self.goodDailyPriceLabel.snp.updateConstraints { make in
+//            make.width.equalTo(width)
+//        }
 //        if let range = model.content.range(of: "/") {
 //            let nsRange = NSRange(model.content.startIndex..<range.lowerBound, in: model.content)
 //            self.goodDailyPriceLabel.setRangeFontText(font: .textM(20), range: nsRange)
@@ -118,7 +212,7 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
             priceText = String(format: "¥%.2lf", model.amount / 100 )
         }
         self.priceLabel.text = priceText
-        self.priceLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#F12A1D"), font: UIFont.systemFont(ofSize: 14, weight: .medium))
+        self.priceLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#404040"), font: UIFont.systemFont(ofSize: 14, weight: .medium))
 //        let width = priceText.singleLineWidth(font: .textF(12)) + 28.rpx
 //        self.priceLabel.snp.updateConstraints { make in
 //            make.width.equalTo(width)
@@ -136,6 +230,37 @@ class QSLVipGoodCollectionViewCell: UICollectionViewCell {
 
 extension QSLVipGoodCollectionViewCell {
     
+    func updateUI() {
+        
+        if self.type == .big {
+            self.mainView.frame = CGRect(x: 0, y: 0, width: UX.bigMainViewWidth, height: UX.mainViewHeight)
+            
+            goodNameLabel.snp.remakeConstraints { make in
+                make.centerX.equalToSuperview()
+                make.top.equalTo(15.rpx)
+            }
+            
+            priceLabel.snp.remakeConstraints { make in
+                make.centerX.equalToSuperview()
+                make.top.equalTo(40.rpx)
+            }
+            
+            originPriceLabel.snp.remakeConstraints { make in
+                make.centerX.equalToSuperview()
+                make.top.equalTo(priceLabel.snp.bottom).offset(0.rpx)
+            }
+            
+            goodDailyPriceLabel.snp.remakeConstraints { make in
+                make.centerX.equalToSuperview()
+                make.centerY.equalTo(selectBtn.snp.centerY)
+            }
+        } else {
+            self.mainView.frame = CGRect(x: 0, y: 0, width: UX.smallMainViewWidth, height: UX.mainViewHeight)
+        }
+       
+        self.mainView.addFourCorner(topLeft: 11, topRight: 11, bottomLeft: 0, bottomRight: 0)
+    }
+    
     func initView() {
         
         self.contentView.addSubview(bgView)
@@ -145,43 +270,69 @@ extension QSLVipGoodCollectionViewCell {
             make.top.equalTo(11.rpx)
         }
         
-        self.contentView.addSubview(tagIcon)
-        tagIcon.snp.makeConstraints { make in
+        self.contentView.addSubview(mostTagIcon)
+        mostTagIcon.snp.makeConstraints { make in
             make.left.equalTo(0)
             make.top.equalTo(0)
-            make.size.equalTo(CGSize(width: 79.rpx, height: 29.rpx))
+            make.size.equalTo(CGSize(width: 85.rpx, height: 29.rpx))
         }
         
-        self.bgView.addSubview(goodNameLabel)
+//        self.addSubview(mostTagIcon)
+//        mostTagIcon.snp.makeConstraints { make in
+//            make.left.equalTo(0)
+//            make.top.equalTo(0)
+//            make.size.equalTo(CGSize(width: 85.rpx, height: 29.rpx))
+//        }
+        
+        self.bgView.addSubview(mainView)
+        mainView.snp.makeConstraints { make in
+            make.top.equalTo(2.rpx)
+            make.left.equalTo(2.rpx)
+            make.right.equalTo(-2)
+            make.height.equalTo(UX.mainViewHeight)
+        }
+        
+        self.mainView.addSubview(goodNameLabel)
         goodNameLabel.snp.makeConstraints { make in
-            make.centerX.equalToSuperview()
-            make.top.equalTo(16.rpx)
+            make.left.equalTo(10.rpx)
+            make.top.equalTo(15.rpx)
         }
         
-        self.bgView.addSubview(priceLabel)
-//        let width = "¥128".singleLineWidth(font: .textF(12)) + 28.rpx
+        self.mainView.addSubview(priceLabel)
         priceLabel.snp.makeConstraints { make in
-//            make.width.equalTo(width)
-//            make.height.equalTo(21.rpx)
-            make.top.equalTo(goodNameLabel.snp.bottom).offset(5.rpx)
-            make.top.equalTo(45.rpx)
-            make.centerX.equalToSuperview()
+            make.top.equalTo(40.rpx)
+            make.left.equalTo(10.rpx)
         }
         
-        self.bgView.addSubview(originPriceLabel)
+        self.mainView.addSubview(originPriceLabel)
         originPriceLabel.snp.makeConstraints { make in
-            make.centerX.equalToSuperview()
-            make.top.equalTo(priceLabel.snp.bottom).offset(5.rpx)
+            make.left.equalTo(10.rpx)
+            make.top.equalTo(priceLabel.snp.bottom).offset(0.rpx)
+        }
+        
+        self.bgView.addSubview(selectBtn)
+        selectBtn.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 16.rpx, height: 16.rpx))
+            make.right.equalTo(-6.rpx)
+            make.bottom.equalTo(-6.rpx)
         }
         
-        let width = "0.001元/天".singleLineWidth(font: .textF(10)) + 24.rpx
         self.bgView.addSubview(goodDailyPriceLabel)
         goodDailyPriceLabel.snp.makeConstraints { make in
-            make.centerX.equalToSuperview()
-            make.bottom.equalTo(-8.rpx)
-            make.height.equalTo(21.rpx)
-            make.width.equalTo(width)
+            make.left.equalTo(10.rpx)
+            make.centerY.equalTo(selectBtn.snp.centerY)
         }
         
+
+        
+//        let width = "0.001元/天".singleLineWidth(font: .textF(10)) + 24.rpx
+//        self.bgView.addSubview(goodDailyPriceLabel)
+//        goodDailyPriceLabel.snp.makeConstraints { make in
+//            make.centerX.equalToSuperview()
+//            make.bottom.equalTo(-8.rpx)
+//            make.height.equalTo(21.rpx)
+//            make.width.equalTo(width)
+//        }
+        
     }
 }

+ 322 - 0
QuickSearchLocation/Classes/Pages/QSLVip/Cell/QSLVipMostGoodCell.swift

@@ -0,0 +1,322 @@
+//
+//  QSLVipMostGoodCell.swift
+//  QuickSearchLocation
+//
+//  Created by Destiny on 2025/5/28.
+//
+
+import UIKit
+
+class QSLVipMostGoodCell: UIView {
+    
+    struct UX {
+        static let mainViewHeight = 71.0.rpx
+        static let mainViewWidth = QSLConst.qsl_kScreenW - 36.0.rpx
+    }
+    
+    var goodModel: QSLGoodModel?
+    
+    lazy var bgView: UIView = {
+       
+        let view = UIView()
+        view.backgroundColor = .hexStringColor(hexString: "#EEEEEE")
+        view.addRadius(radius: 12)
+        return view
+    }()
+    
+    lazy var mostTagIcon: UIImageView = {
+       
+        let imageView = UIImageView()
+        imageView.image = UIImage(named: "vip_goods_most_tag")
+        return imageView
+    }()
+    
+    lazy var mainView: UIView = {
+       
+        let view = UIView(frame: CGRect(x: 0, y: 0, width: UX.mainViewWidth, height: UX.mainViewHeight))
+        view.addFourCorner(topLeft: 11, topRight: 11, bottomLeft: 0, bottomRight: 0)
+        view.backgroundColor = .white
+        return view
+    }()
+    
+    lazy var priceLabel: UILabel = {
+       
+        let label = UILabel()
+        label.textAlignment = .center
+//        label.addRadius(radius: 12.rpx)
+//        label.backgroundColor = .hexStringColor(hexString: "#F6F6F6")
+        label.text("¥128")
+        label.mediumFont(24)
+        label.textColor = .hexStringColor(hexString: "#F12A1D")
+        label.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#F12A1D"), font: UIFont.systemFont(ofSize: 14, weight: .medium))
+        return label
+    }()
+    
+    lazy var originPriceLabel: UILabel = {
+        
+        let label = UILabel()
+        label.text("¥299")
+        label.font(13)
+        label.textColor = .hexStringColor(hexString: "#A7A7A7")
+        label.centerLineText(lineValue: 1, underlineColor: .hexStringColor(hexString: "#A7A7A7"))
+        return label
+    }()
+    
+    lazy var titleLabel: UILabel = {
+       
+        let label = UILabel()
+        label.text("周度会员")
+        label.boldFont(14)
+        label.textColor = .hexStringColor(hexString: "#404040")
+        return label
+    }()
+    
+    lazy var describeLabel: UILabel = {
+       
+        let label = UILabel()
+        label.text("96%用户首选")
+        label.boldFont(9)
+        label.textColor = .hexStringColor(hexString: "#11BD96")
+        return label
+    }()
+    
+    lazy var processBgView: UIView = {
+       
+        let view = UIView()
+        view.backgroundColor = .hexStringColor(hexString: "#BAFFF1")
+        view.addRadius(radius: 2.5.rpx)
+        return view
+    }()
+    
+    lazy var processView: UIView = {
+       
+        let view = UIView()
+        view.backgroundColor = .hexStringColor(hexString: "#15CBA1")
+        view.addRadius(radius: 2.5.rpx)
+        return view
+    }()
+
+    lazy var recommendIcon: UIImageView = {
+       
+        let icon = UIImageView()
+        icon.image = UIImage(named: "vip_recommend_tag")
+        return icon
+    }()
+    
+    lazy var dailyLabel: UILabel = {
+      
+        let label = UILabel()
+        let text = "仅需¥9.2/天,时刻守护Ta的安全"
+        label.text(text)
+        label.font(11)
+        label.textColor = .hexStringColor(hexString: "#818181")
+        label.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#818181"), font: UIFont.systemFont(ofSize: 11, weight: .heavy))
+        
+        if let yuanIndex = text.firstIndex(of: "¥"),
+           let slashIndex = text.firstIndex(of: "/") {
+            
+            // 创建从¥后面一个字符到/前面一个字符的range
+            let contentRange = text.index(after: yuanIndex)..<slashIndex
+            
+            // 将Swift的Range转换为NSRange
+            let nsRange = NSRange(
+                contentRange,
+                in: text
+            )
+            
+            label.setRangeFontText(font: UIFont.systemFont(ofSize: 16, weight: .heavy), range: nsRange)
+        }
+        
+        return label
+    }()
+    
+    lazy var selectBtn: UIButton = {
+      
+        let btn = UIButton()
+        btn.setBackgroundImage(UIImage(named: "vip_good_unselect_big"), for: .normal)
+        btn.setBackgroundImage(UIImage(named: "vip_good_select_big"), for: .selected)
+        return btn
+    }()
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setUI()
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func config(model: QSLGoodModel) {
+        self.goodModel = model
+        
+        self.selectBtn.isSelected = model.isSelect
+        let text = model.content
+        self.dailyLabel.text = text
+        if model.isSelect {
+            self.bgView.backgroundColor = .hexStringColor(hexString: "#15CBA1")
+            self.mainView.gradientBackgroundColor(color1: .hexStringColor(hexString: "#CAFFF3"), color2: .hexStringColor(hexString: "#FFFFFF"), width: UX.mainViewWidth, height: UX.mainViewHeight, direction: .horizontal)
+            
+            self.dailyLabel.textColor = .white
+            self.dailyLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#FFFFFF"), font: UIFont.systemFont(ofSize: 9, weight: .heavy))
+            
+            if let yuanIndex = text.firstIndex(of: "¥"),
+               let slashIndex = text.firstIndex(of: "/") {
+                
+                // 创建从¥后面一个字符到/前面一个字符的range
+                let contentRange = text.index(after: yuanIndex)..<slashIndex
+                
+                // 将Swift的Range转换为NSRange
+                let nsRange = NSRange(
+                    contentRange,
+                    in: text
+                )
+                
+                self.dailyLabel.setRangeFontText(font: UIFont.systemFont(ofSize: 16, weight: .heavy), range: nsRange)
+            }
+            
+        } else {
+            self.bgView.backgroundColor = .hexStringColor(hexString: "#EEEEEE")
+            self.mainView.backgroundColor = .white
+            
+            self.dailyLabel.textColor = .hexStringColor(hexString: "#818181")
+            
+            self.dailyLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#818181"), font: UIFont.systemFont(ofSize: 9, weight: .heavy))
+            
+            if let yuanIndex = text.firstIndex(of: "¥"),
+               let slashIndex = text.firstIndex(of: "/") {
+                
+                // 创建从¥后面一个字符到/前面一个字符的range
+                let contentRange = text.index(after: yuanIndex)..<slashIndex
+                
+                // 将Swift的Range转换为NSRange
+                let nsRange = NSRange(
+                    contentRange,
+                    in: text
+                )
+                
+                self.dailyLabel.setRangeFontText(font: UIFont.systemFont(ofSize: 16, weight: .heavy), range: nsRange)
+            }
+        }
+        
+        self.mostTagIcon.isHidden = !model.popular
+        
+        self.titleLabel.text = model.name
+//        self.goodDailyPriceLabel.text = "0.001元/天"
+//        let width = model.content.singleLineWidth(font: .textF(10)) + 24.rpx
+//        self.goodDailyPriceLabel.snp.updateConstraints { make in
+//            make.width.equalTo(width)
+//        }
+//        if let range = model.content.range(of: "/") {
+//            let nsRange = NSRange(model.content.startIndex..<range.lowerBound, in: model.content)
+//            self.goodDailyPriceLabel.setRangeFontText(font: .textM(20), range: nsRange)
+//        }
+
+        var priceText = ""
+        if model.amount.truncatingRemainder(dividingBy: 100) == 0 {
+            priceText = "¥\(Int(model.amount / 100))"
+        } else {
+            priceText = String(format: "¥%.2lf", model.amount / 100 )
+        }
+        self.priceLabel.text = priceText
+        self.priceLabel.setSpecificTextColorFont("¥", color: .hexStringColor(hexString: "#F12A1D"), font: UIFont.systemFont(ofSize: 14, weight: .medium))
+//        let width = priceText.singleLineWidth(font: .textF(12)) + 28.rpx
+//        self.priceLabel.snp.updateConstraints { make in
+//            make.width.equalTo(width)
+//        }
+        
+        var orinalPriceText = ""
+        if model.originalAmount.truncatingRemainder(dividingBy: 100) == 0 {
+            orinalPriceText = "¥\(Int(model.originalAmount / 100))"
+        } else {
+            orinalPriceText = String(format: "¥%.2lf", model.originalAmount / 100 )
+        }
+        self.originPriceLabel.text = orinalPriceText
+    }
+}
+
+extension QSLVipMostGoodCell {
+    
+    func setUI() {
+        
+        self.addSubview(bgView)
+        bgView.snp.makeConstraints { make in
+            make.right.bottom.equalTo(0)
+            make.left.equalTo(6.rpx)
+            make.top.equalTo(11.rpx)
+        }
+        
+        self.addSubview(mostTagIcon)
+        mostTagIcon.snp.makeConstraints { make in
+            make.left.equalTo(0)
+            make.top.equalTo(0)
+            make.size.equalTo(CGSize(width: 85.rpx, height: 29.rpx))
+        }
+        
+        self.bgView.addSubview(mainView)
+        mainView.snp.makeConstraints { make in
+            make.left.top.equalTo(2.rpx)
+            make.right.equalTo(-2.rpx)
+            make.height.equalTo(71.rpx)
+        }
+        
+        self.mainView.addSubview(priceLabel)
+        priceLabel.snp.makeConstraints { make in
+            make.left.equalTo(17.rpx)
+            make.top.equalTo(17.rpx)
+        }
+        
+        self.mainView.addSubview(originPriceLabel)
+        originPriceLabel.snp.makeConstraints { make in
+            make.centerX.equalTo(priceLabel.snp.centerX)
+            make.top.equalTo(priceLabel.snp.bottom)
+        }
+        
+        self.mainView.addSubview(titleLabel)
+        titleLabel.snp.makeConstraints { make in
+            make.top.equalTo(17.rpx)
+            make.left.equalTo(84.rpx)
+        }
+        
+        self.mainView.addSubview(processBgView)
+        processBgView.snp.makeConstraints { make in
+            make.bottom.equalTo(-13.rpx)
+            make.left.equalTo(titleLabel.snp.left)
+            make.width.equalTo(138.rpx)
+            make.height.equalTo(5.rpx)
+        }
+        
+        self.processBgView.addSubview(processView)
+        processView.snp.makeConstraints { make in
+            make.left.top.bottom.equalTo(0)
+            make.right.equalTo(-20.rpx)
+        }
+        
+        self.mainView.addSubview(describeLabel)
+        describeLabel.snp.makeConstraints { make in
+            make.left.equalTo(processBgView.snp.left)
+            make.bottom.equalTo(processBgView.snp.top).offset(-2.rpx)
+        }
+        
+        self.mainView.addSubview(recommendIcon)
+        recommendIcon.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 73.rpx, height: 71.rpx))
+            make.right.equalTo(0)
+            make.top.equalTo(0)
+            make.bottom.equalTo(0)
+        }
+        
+        self.bgView.addSubview(dailyLabel)
+        dailyLabel.snp.makeConstraints { make in
+            make.left.equalTo(20.rpx)
+            make.bottom.equalTo(-7.rpx)
+        }
+        
+        self.bgView.addSubview(selectBtn)
+        selectBtn.snp.makeConstraints { make in
+            make.size.equalTo(CGSize(width: 18.rpx, height: 18.rpx))
+            make.right.equalTo(-7.rpx)
+            make.bottom.equalTo(-7.rpx)
+        }
+    }
+}

+ 142 - 54
QuickSearchLocation/Classes/Pages/QSLVip/Controller/QSLVipController.swift

@@ -19,6 +19,12 @@ enum QSLVipJumpType: Int {
 
 class QSLVipController: QSLBaseController {
     
+    struct UX {
+        static let mostCellHeight = 113.0.rpx
+        static let collectionRowHeight = 137.0.rpx
+        static let goodsBgHeight = 54.rpx + UX.mostCellHeight + 20.rpx
+    }
+    
     var type: QSLVipJumpType?
     
     var goodList: [QSLGoodModel] = [QSLGoodModel]()
@@ -117,7 +123,7 @@ class QSLVipController: QSLBaseController {
     lazy var goodsBgView: UIView = {
        
         let view = UIView()
-        view.gradientBackgroundColor(color1: .hexStringColor(hexString: "#FFF8F2"), color2: .hexStringColor(hexString: "#FFFFFF"), width: QSLConst.qsl_kScreenW, height: 255.rpx, direction: .vertical)
+        view.gradientBackgroundColor(color1: .hexStringColor(hexString: "#FFF8F2"), color2: .hexStringColor(hexString: "#FFFFFF"), width: QSLConst.qsl_kScreenW, height: UX.goodsBgHeight, direction: .vertical)
         return view
     }()
     
@@ -140,11 +146,22 @@ class QSLVipController: QSLBaseController {
         return button
     }()
     
+    lazy var mostCell: QSLVipMostGoodCell = {
+        
+        let cell = QSLVipMostGoodCell()
+        
+        cell.isUserInteractionEnabled = true
+        let tap = UITapGestureRecognizer(target: self, action: #selector(firstCellClickAction))
+        cell.addGestureRecognizer(tap)
+        
+        return cell
+    }()
+    
     lazy var goodsCollectionView: UICollectionView = {
             
         let layout = UICollectionViewFlowLayout()
         layout.minimumLineSpacing = 0
-        layout.scrollDirection = .horizontal
+        layout.scrollDirection = .vertical
         
         let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
         collectionView.backgroundColor = .clear
@@ -176,12 +193,12 @@ class QSLVipController: QSLBaseController {
         let attr = NSMutableAttributedString()
         
         let firstAttr = NSMutableAttributedString(string: "购买即同意")
-        firstAttr.font(12)
+        firstAttr.font(10)
         firstAttr.color(.hexStringColor(hexString: "#A7A7A7"))
         attr.append(firstAttr)
         
         let blankAttr = NSMutableAttributedString(string: " ")
-        blankAttr.font(12)
+        blankAttr.font(10)
         attr.append(blankAttr)
         
         let privacyHL = YYTextHighlight()
@@ -189,7 +206,7 @@ class QSLVipController: QSLBaseController {
         
         let privacyText = NSMutableAttributedString(string: privacyStr)
         
-        privacyText.font(12)
+        privacyText.font(10)
         privacyText.color(.hexStringColor(hexString: "#E7B983"))
         privacyText.yy_setTextHighlight(privacyHL, range: NSRange(location: 0, length: privacyStr.count))
         privacyHL.tapAction = { [weak self] containerView, text, range, rect in
@@ -203,7 +220,7 @@ class QSLVipController: QSLBaseController {
         var serviceStr = "《用户协议》"
 
         let serviceText = NSMutableAttributedString(string: serviceStr)
-        serviceText.font(12)
+        serviceText.font(10)
         serviceText.color(.hexStringColor(hexString: "#E7B983"))
         serviceText.yy_setTextHighlight(serviceHL, range: NSRange(location: 0, length: serviceStr.count))
         serviceHL.tapAction = { [weak self] containerView, text, range, rect in
@@ -215,7 +232,7 @@ class QSLVipController: QSLBaseController {
         attr.append(blankAttr)
         
         let andAttr = NSMutableAttributedString(string: "和")
-        andAttr.font(12)
+        andAttr.font(10)
         andAttr.color(.hexStringColor(hexString: "#A7A7A7"))
         attr.append(andAttr)
         
@@ -225,7 +242,7 @@ class QSLVipController: QSLBaseController {
         var subcribeStr = "《续订说明》"
 
         let subcribeText = NSMutableAttributedString(string: subcribeStr)
-        subcribeText.font(12)
+        subcribeText.font(10)
         subcribeText.color(.hexStringColor(hexString: "#E7B983"))
         subcribeText.yy_setTextHighlight(subcribeHL, range: NSRange(location: 0, length: subcribeStr.count))
         subcribeHL.tapAction = { [weak self] containerView, text, range, rect in
@@ -457,6 +474,7 @@ extension QSLVipController {
         }
     }
     
+    // 支付按钮点击
     @objc func unlockBtnAction() {
         
         switch self.selectGood?.level {
@@ -482,10 +500,10 @@ extension QSLVipController {
             break;
         }
         
-        if !selectBtn.isSelected {
-            self.view.toast(text: "请先同意《隐私权政策》和《用户协议》")
-            return
-        }
+//        if !selectBtn.isSelected {
+//            self.view.toast(text: "请先同意《隐私权政策》和《用户协议》")
+//            return
+//        }
         
         let memberModel = QSLBaseManager.shared.userModel.memberModel
         
@@ -500,18 +518,6 @@ extension QSLVipController {
                 QSLVipManager.shared.isPaying = false
                 if status == .success {
                     QSLLoading.success(text: "支付成功")
-//                    NSLocalizedString("Payment successful", comment: "支付成功")
-                    
-//                    if let payType = self.payType {
-//                        geInstance?.track(HolaGravityConst.vip_open_success, properties: ["id": payType])
-//                        
-//                        if payType == 1004 {
-//                            geInstance?.track(HolaGravityConst.vip_alert_pay, properties: ["id": 1002])
-//                        }
-//                    }
-                    
-//                    let val: Float = 0.1
-//                    HolaSaManager.shared.addEventAttribution(eventDict: ["event_name": "pay", "event_val": val])
                     
                     // 引力传递支付事件
                     if let selectGood = self.selectGood {
@@ -556,23 +562,60 @@ extension QSLVipController {
                         break;
                     }
 
-                    
                     DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
                         self.navigationController?.popViewController(animated: true)
                         NotificationCenter.default.post(name: QSLNotification.QSLRefreshMember, object: nil)
                     }
+                    
                 } else if status == .cancel {
                     QSLLoading.error(text: "支付取消")
                 } else if status == .fail {
                     gravityInstance?.track(QSLGravityConst.vip_fail)
                     QSLLoading.error(text: "支付失败")
                 } else if status == .searchFail {
-                    
                     QSLLoading.error(text: "查询订单失败,请稍后重试")
                 }
             }
         }
     }
+    
+    @objc func firstCellClickAction() {
+        
+        for i in 0..<self.goodList.count {
+            self.goodList[i].isSelect = false
+        }
+        
+        if self.goodList.count > 0 {
+            self.goodList[0].isSelect = true
+            self.selectGood = self.goodList[0]
+            self.mostCell.config(model: self.goodList[0])
+        }
+        
+        switch self.selectGood?.level {
+        case 100 :
+            gravityInstance?.track(QSLGravityConst.vip_good_select, properties: ["id": 1006])
+            break
+        case 700:
+            gravityInstance?.track(QSLGravityConst.vip_good_select, properties: ["id": 1005])
+            break;
+        case 3100:
+            gravityInstance?.track(QSLGravityConst.vip_good_select, properties: ["id": 1004])
+            break;
+        case 9200:
+            gravityInstance?.track(QSLGravityConst.vip_good_select, properties: ["id": 1003])
+            break;
+        case 36600:
+            gravityInstance?.track(QSLGravityConst.vip_good_select, properties: ["id": 1002])
+            break;
+        case 3660000:
+            gravityInstance?.track(QSLGravityConst.vip_good_select, properties: ["id": 1001])
+            break;
+        default:
+            break;
+        }
+        
+        self.goodsCollectionView.reloadData()
+    }
 }
 
 extension QSLVipController {
@@ -583,9 +626,23 @@ extension QSLVipController {
         QSLNetwork().request(.vipItemList(dict: ["itemListType": 2])) { response in
             let list = response.mapArray(QSLGoodModel.self, modelKey: "data>list")
             self.goodList = list
+            
             if self.goodList.count > 0 {
                 self.goodList[0].isSelect = true
                 self.selectGood = self.goodList[0]
+                self.mostCell.config(model: self.goodList[0])
+        
+                let row = ceil(Double(self.goodList.count - 1) / 3.0)
+                let height = UX.goodsBgHeight + (row * UX.collectionRowHeight)
+                self.goodsBgView.gradientBackgroundColor(color1: .hexStringColor(hexString: "#FFF8F2"), color2: .hexStringColor(hexString: "#FFFFFF"), width: QSLConst.qsl_kScreenW, height: height, direction: .vertical)
+                
+                self.goodsBgView.snp.updateConstraints { make in
+                    make.height.equalTo(height)
+                }
+                
+                self.scrollView.snp.makeConstraints { make in
+                    make.bottom.equalTo(self.mainView)
+                }
             }
             self.goodsCollectionView.reloadData()
         } fail: { code, error in
@@ -612,14 +669,20 @@ extension QSLVipController {
 extension QSLVipController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
     
     func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return goodList.count
+        return goodList.count - 1
     }
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         
         let cell = collectionView.dequeueReusableCell(cellType: QSLVipGoodCollectionViewCell.self, cellForRowAt: indexPath)
-        let model = self.goodList[indexPath.row]
-        cell.config(model: model)
+        let model = self.goodList[indexPath.row + 1]
+        
+        if self.goodList.count - 1 == 2 {
+            cell.config(model: model, type: .big)
+        } else {
+            cell.config(model: model, type: .small)
+        }
+        
         return cell
     }
     
@@ -629,8 +692,11 @@ extension QSLVipController: UICollectionViewDelegate, UICollectionViewDataSource
             self.goodList[i].isSelect = false
         }
         
-        self.goodList[indexPath.row].isSelect = true
-        self.selectGood = self.goodList[indexPath.row]
+        if self.goodList.count > 0 {
+            self.goodList[indexPath.row + 1].isSelect = true
+            self.selectGood = self.goodList[indexPath.row + 1]
+            self.mostCell.config(model: self.goodList[0])
+        }
         
         switch self.selectGood?.level {
         case 100 :
@@ -660,15 +726,21 @@ extension QSLVipController: UICollectionViewDelegate, UICollectionViewDataSource
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
         
-        return CGSize(width: 104.rpx, height: 143.rpx)
+        var width = (QSLConst.qsl_kScreenW - 42.0.rpx) / 3.0
+        
+        if self.goodList.count - 1 == 2 {
+            width = (QSLConst.qsl_kScreenW - 36.0.rpx) / 2.0
+        }
+        
+        return CGSize(width: width, height: 134.0.rpx)
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
-        return 4.rpx
+        return 6.rpx
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
-        return 0
+        return 3.rpx
     }
 }
 
@@ -780,17 +852,18 @@ extension QSLVipController {
         
         scrollView.addSubview(mainView)
         mainView.snp.makeConstraints { make in
-            make.left.right.bottom.equalTo(0)
+            make.left.right.equalTo(0)
             make.top.equalTo(funcBannerImageView.snp.bottom).offset(-24.rpx)
             make.width.equalTo(QSLConst.qsl_kScreenW)
-            make.height.equalTo(800.rpx)
+//            make.height.equalTo(800.rpx)
         }
         
+        let goodsBgHeight = 54.rpx + UX.mostCellHeight
         mainView.addSubview(goodsBgView)
         goodsBgView.snp.makeConstraints { make in
             make.top.left.right.equalTo(0)
             make.width.equalTo(QSLConst.qsl_kScreenW)
-            make.height.equalTo(255.rpx)
+            make.height.equalTo(goodsBgHeight)
         }
         
         goodsBgView.addSubview(vipGoodsTitleIcon)
@@ -807,31 +880,40 @@ extension QSLVipController {
             make.centerY.equalTo(vipGoodsTitleIcon.snp.centerY)
         }
         
-        goodsBgView.addSubview(goodsCollectionView)
-        goodsCollectionView.snp.makeConstraints { make in
-            make.left.equalTo(18.rpx)
-            make.right.equalTo(-22.rpx)
-            make.height.equalTo(143.rpx)
+        goodsBgView.addSubview(mostCell)
+        mostCell.snp.makeConstraints { make in
+            make.left.equalTo(12.rpx)
+            make.right.equalTo(-16.rpx)
+            make.height.equalTo(113.rpx)
             make.top.equalTo(vipGoodsTitleIcon.snp.bottom).offset(10.rpx)
         }
         
-        goodsBgView.addSubview(selectBtn)
-        selectBtn.snp.makeConstraints { make in
-            make.size.equalTo(CGSize(width: 12.rpx, height: 12.rpx))
-            make.left.equalTo(23.rpx)
-            make.top.equalTo(goodsCollectionView.snp.bottom).offset(16.rpx)
-        }
-        
-        goodsBgView.addSubview(serviceLabel)
-        serviceLabel.snp.makeConstraints { make in
-            make.left.equalTo(selectBtn.snp.right).offset(2.rpx)
-            make.centerY.equalTo(selectBtn.snp.centerY)
-        }
+        goodsBgView.addSubview(goodsCollectionView)
+        goodsCollectionView.snp.makeConstraints { make in
+            make.left.equalTo(12.rpx)
+            make.right.equalTo(-18.rpx)
+            make.bottom.equalTo(-20.rpx)
+            make.top.equalTo(mostCell.snp.bottom).offset(3.rpx)
+        }
+        
+//        goodsBgView.addSubview(selectBtn)
+//        selectBtn.snp.makeConstraints { make in
+//            make.size.equalTo(CGSize(width: 12.rpx, height: 12.rpx))
+//            make.left.equalTo(23.rpx)
+//            make.top.equalTo(goodsCollectionView.snp.bottom).offset(16.rpx)
+//        }
+//        
+//        goodsBgView.addSubview(serviceLabel)
+//        serviceLabel.snp.makeConstraints { make in
+//            make.left.equalTo(selectBtn.snp.right).offset(2.rpx)
+//            make.centerY.equalTo(selectBtn.snp.centerY)
+//        }
         
         mainView.addSubview(commentView)
         commentView.snp.makeConstraints { make in
             make.left.right.equalTo(0)
             make.top.equalTo(goodsBgView.snp.bottom).offset(8.rpx)
+            make.height.equalTo(525.rpx + QSLConst.qsl_kTabbarBottom)
             make.bottom.equalTo(0)
         }
         
@@ -879,6 +961,12 @@ extension QSLVipController {
             make.top.equalTo(tipTitleLabel.snp.bottom).offset(11)
         }
         
+        commentView.addSubview(serviceLabel)
+        serviceLabel.snp.makeConstraints { make in
+            make.left.equalTo(16)
+            make.top.equalTo(tipContentLabel.snp.bottom).offset(5.rpx)
+        }
+        
         scrollView.snp.makeConstraints { make in
             make.bottom.equalTo(mainView)
         }

+ 22 - 0
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_select_big.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "vip_good_select_big@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "vip_good_select_big@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_select_big.imageset/vip_good_select_big@2x.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_select_big.imageset/vip_good_select_big@3x.png


+ 22 - 0
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_unselect_big.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "vip_good_unselect_big@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "vip_good_unselect_big@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_unselect_big.imageset/vip_good_unselect_big@2x.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_good_unselect_big.imageset/vip_good_unselect_big@3x.png


+ 22 - 0
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_goods_most_tag.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "vip_goods_most_tag@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "vip_goods_most_tag@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_goods_most_tag.imageset/vip_goods_most_tag@2x.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_goods_most_tag.imageset/vip_goods_most_tag@3x.png


+ 22 - 0
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_recommend_tag.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "vip_recommend_tag@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "vip_recommend_tag@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_recommend_tag.imageset/vip_recommend_tag@2x.png


BIN
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_recommend_tag.imageset/vip_recommend_tag@3x.png