Jelajahi Sumber

[new] 微调ui

zhujieshan 2 bulan lalu
induk
melakukan
79b588b686

+ 8 - 8
QuickSearchLocation/Classes/Pages/QSLHome/View/QSLHomeFriendView.swift

@@ -235,6 +235,13 @@ extension QSLHomeFriendView {
             couponViewTopConstraint = make.top.equalTo(friExpandButton.snp.bottom).offset(8.rpx).constraint
         }
         
+        couponLabel.snp.makeConstraints { make in
+            make.height.equalTo(22.rpx)
+            make.top.equalTo(10.rpx)
+            make.left.equalTo(60.rpx)
+            make.right.equalTo(-12.rpx)
+        }
+        
         couponBtn.snp.makeConstraints { make in
             make.height.equalTo(28.rpx)
             make.width.equalTo(65.rpx)
@@ -242,13 +249,6 @@ extension QSLHomeFriendView {
             make.centerY.equalToSuperview()
         }
         
-        couponLabel.snp.makeConstraints { make in
-            make.height.equalTo(22.rpx)
-            make.top.equalTo(10.rpx)
-            make.left.equalTo(60.rpx)
-            make.right.equalTo(couponBtn.snp.left).offset(-10.rpx)
-        }
-        
         countdownLabel.snp.makeConstraints { make in
             make.height.equalTo(17.rpx)
             make.top.equalTo(couponLabel.snp.bottom).offset(0)
@@ -347,7 +347,7 @@ extension QSLHomeFriendView: QSLHomeFriendTableViewCellDelegate {
                 if amount > 0 {
                     let secondText = "-¥\(amount)"
                     let secondAttr = NSMutableAttributedString(string: secondText)
-                    secondAttr.yy_font = UIFont.textB(15)
+                    secondAttr.yy_font = UIFont.textB(18)
                     secondAttr.yy_color = UIColor.hexStringColor(hexString: "#E1E3A3")
                     attr.append(secondAttr)
                 }

+ 1 - 1
QuickSearchLocation/Classes/Pages/QSLVip/Cell/QSLActivityVipCell.swift

@@ -162,7 +162,7 @@ class QSLActivityVipCell: UICollectionViewCell {
         }
         
         self.priceLabel.textColor = .hexStringColor(hexString: "#333333")
-        self.selectBtn.isHidden = false
+        self.selectBtn.isHidden = true
         self.selectBtn.isSelected = model.isSelect
         self.bgView.image = UIImage.init()
         

+ 21 - 11
QuickSearchLocation/Classes/Pages/QSLVip/Controller/QSLActivityVipVC.swift

@@ -165,19 +165,21 @@ class QSLActivityVipVC: QSLBaseController {
                 self.goodList[0].isSelect = true
                 self.selectGood = self.goodList[0]
 
-                var height = 200.rpx
-                if(self.goodList.count > 2){
-                    let row = (self.goodList.count-1)/2 + 1
-                    height = 124.rpx + row*124.rpx
+                var height = 140.rpx
+                if self.goodList.count == 2 {
+                    height = 200.rpx
+                } else {
+                    let remainingItems = self.goodList.count - 1
+                    let remainingRows = (remainingItems + 1) / 2
+                    height = Int(134.rpx + CGFloat(remainingRows) * 124.rpx)
                 }
                 
                 self.vipItemView.snp.updateConstraints { make in
                     make.height.equalTo(height)
                 }
                 
-                self.scrollView.snp.makeConstraints { make in
-                    make.bottom.equalTo(self.vipItemView).offset(0)
-                }
+                self.view.layoutIfNeeded()
+                self.scrollView.contentSize = CGSize(width: 0.0, height: self.vipItemView.qsl_y+CGFloat(height)+100+QSLConst.qsl_kTabbarBottom/2+12)
                 
                 QSLCountdownManager.shared.selectGood = self.goodList[0]
 
@@ -329,6 +331,7 @@ class QSLActivityVipVC: QSLBaseController {
         let scrollView = UIScrollView()
 //        scrollView.delegate = self
         scrollView.bounces = false
+        scrollView.backgroundColor = UIColor.white
         scrollView.showsVerticalScrollIndicator = false
         scrollView.contentInsetAdjustmentBehavior = .never
         return scrollView
@@ -346,6 +349,7 @@ class QSLActivityVipVC: QSLBaseController {
         label.text("超值优惠")
         label.textColor = .white
         label.mediumFont(17)
+        label.textAlignment = .center
         return label
     }()
     
@@ -473,7 +477,7 @@ class QSLActivityVipVC: QSLBaseController {
         layout.scrollDirection = .vertical
         
         let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
-        collectionView.backgroundColor = .clear
+        collectionView.backgroundColor = .white
         
         collectionView.dataSource = self
         collectionView.delegate = self
@@ -549,7 +553,7 @@ extension QSLActivityVipVC{
         vipNaviView.addSubview(naviTitleIcon)
         naviTitleIcon.snp.makeConstraints { make in
             make.centerX.equalToSuperview()
-            make.width.equalTo(70.rpx)
+            make.width.equalTo(100.rpx)
             make.height.equalTo(20.rpx)
             make.centerY.equalTo(backButton.snp.centerY)
         }
@@ -624,11 +628,17 @@ extension QSLActivityVipVC{
             make.top.equalTo(cycleScrollView.snp.bottom).offset(17.rpx)
         }
         
-        vipContentView.addSubview(vipItemView)
+        vipContentView.snp.remakeConstraints { make in
+            make.top.equalTo(185.rpx)
+            make.left.right.equalTo(0.rpx)
+            make.bottom.equalTo(pageControl.snp.bottom).offset(10.rpx)  // 这里只约束到 pageControl 的底部
+        }
+        
+        vipBg.addSubview(vipItemView)
         vipItemView.snp.makeConstraints { make in
             make.left.right.equalTo(0)
             make.height.equalTo(150.rpx)
-            make.top.equalTo(pageControl.snp.bottom).offset(16.rpx)
+            make.top.equalTo(vipContentView.snp.bottom).offset(0)
         }
         
         vipItemView.addSubview(goodsCollectionView)

+ 0 - 1
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_comment_give_thumb.imageset/Contents.json

@@ -10,7 +10,6 @@
       "scale" : "2x"
     },
     {
-      "filename" : "vip_comment_give_thumb@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

TEMPAT SAMPAH
QuickSearchLocation/Resources/Assets.xcassets/Vip/vip_comment_give_thumb.imageset/vip_comment_give_thumb@3x.png