Переглянути джерело

购物车--支付成功/失败

Chris 6 роки тому
батько
коміт
7244416110
16 змінених файлів з 483 додано та 22 видалено
  1. 27 7
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartAccountView.swift
  3. 131 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartFinishPay/ShoppingCartPayFailureCell.swift
  4. 158 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartFinishPay/ShoppingCartPaySuccessCell.swift
  5. 92 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartFinishPayView.swift
  6. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartHotSale/ProductSlidingTopBottomCollectionViewCell.swift
  7. 9 3
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShppingCartHotSale/ShoppingCartHotSaleTableViewCell.swift
  8. 6 2
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartView.swift
  9. 9 9
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/ViewController/ShoppingCartFinishPayController.swift
  10. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/Contents.json
  11. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_failure.imageset/Contents.json
  12. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_failure.imageset/shopping_cart_trade_failure@2x.png
  13. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_failure.imageset/shopping_cart_trade_failure@3x.png
  14. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_finish.imageset/Contents.json
  15. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_finish.imageset/shopping_cart_trade_finish@2x.png
  16. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_finish.imageset/shopping_cart_trade_finish@3x.png

+ 27 - 7
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -182,7 +182,6 @@
 		A7A98E41228046C5005306E9 /* ShoppingMallSepcialTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E40228046C4005306E9 /* ShoppingMallSepcialTableViewCell.swift */; };
 		A7A98E4322804851005306E9 /* ShoppingMallSepcialFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E4222804851005306E9 /* ShoppingMallSepcialFlowLayout.swift */; };
 		A7A98E4522804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E4422804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift */; };
-		A7B4E71A22811F770012914A /* ShoppingCarModoule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7B4E71922811F770012914A /* ShoppingCarModoule.xcassets */; };
 		A7B4E71D22812DD70012914A /* ShoppingMallSlidingLeftRightTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E71C22812DD70012914A /* ShoppingMallSlidingLeftRightTableViewCell.swift */; };
 		A7B4E71F228131720012914A /* ShoppingMallSlidingLeftRightCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E71E228131720012914A /* ShoppingMallSlidingLeftRightCollectionViewCell.swift */; };
 		A7B4E721228151F40012914A /* FloorTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E720228151F40012914A /* FloorTitleView.swift */; };
@@ -245,6 +244,10 @@
 		A7DC467F22783A47001F3EFC /* EditExpressAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */; };
 		BD20F1CB2283C12000677D8E /* ShoppingCartListNoneItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD20F1CA2283C12000677D8E /* ShoppingCartListNoneItemCell.swift */; };
 		BD20F1CD2283C51300677D8E /* ShoppingCartFinishPayController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD20F1CC2283C51300677D8E /* ShoppingCartFinishPayController.swift */; };
+		BD20F1CF2283CE2300677D8E /* ShoppingCartFinishPayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD20F1CE2283CE2300677D8E /* ShoppingCartFinishPayView.swift */; };
+		BD20F1D32283D0ED00677D8E /* ShoppingCartPaySuccessCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD20F1D22283D0ED00677D8E /* ShoppingCartPaySuccessCell.swift */; };
+		BD20F1D52283D15500677D8E /* ShoppingCartPayFailureCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD20F1D42283D15500677D8E /* ShoppingCartPayFailureCell.swift */; };
+		BD20F1D82283D2AA00677D8E /* ShoppingCartModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD20F1D72283D2AA00677D8E /* ShoppingCartModule.xcassets */; };
 		BDF47D7A228271F600941AB9 /* ShoppingCartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF47D79228271F600941AB9 /* ShoppingCartView.swift */; };
 		BDF47D7E22827C3F00941AB9 /* ProductSlidingTopBottomCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF47D7D22827C3F00941AB9 /* ProductSlidingTopBottomCollectionViewCell.swift */; };
 		BDF47D80228288F900941AB9 /* ShoppingCartAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF47D7F228288F900941AB9 /* ShoppingCartAccountView.swift */; };
@@ -460,7 +463,6 @@
 		A7A98E40228046C4005306E9 /* ShoppingMallSepcialTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSepcialTableViewCell.swift; sourceTree = "<group>"; };
 		A7A98E4222804851005306E9 /* ShoppingMallSepcialFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSepcialFlowLayout.swift; sourceTree = "<group>"; };
 		A7A98E4422804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSepcialCollectionViewCell.swift; sourceTree = "<group>"; };
-		A7B4E71922811F770012914A /* ShoppingCarModoule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShoppingCarModoule.xcassets; sourceTree = "<group>"; };
 		A7B4E71C22812DD70012914A /* ShoppingMallSlidingLeftRightTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSlidingLeftRightTableViewCell.swift; sourceTree = "<group>"; };
 		A7B4E71E228131720012914A /* ShoppingMallSlidingLeftRightCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSlidingLeftRightCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7B4E720228151F40012914A /* FloorTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloorTitleView.swift; sourceTree = "<group>"; };
@@ -524,6 +526,10 @@
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		BD20F1CA2283C12000677D8E /* ShoppingCartListNoneItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartListNoneItemCell.swift; sourceTree = "<group>"; };
 		BD20F1CC2283C51300677D8E /* ShoppingCartFinishPayController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartFinishPayController.swift; sourceTree = "<group>"; };
+		BD20F1CE2283CE2300677D8E /* ShoppingCartFinishPayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartFinishPayView.swift; sourceTree = "<group>"; };
+		BD20F1D22283D0ED00677D8E /* ShoppingCartPaySuccessCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPaySuccessCell.swift; sourceTree = "<group>"; };
+		BD20F1D42283D15500677D8E /* ShoppingCartPayFailureCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayFailureCell.swift; sourceTree = "<group>"; };
+		BD20F1D72283D2AA00677D8E /* ShoppingCartModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShoppingCartModule.xcassets; sourceTree = "<group>"; };
 		BD9052C044FD3AE4E62D3929 /* Pods-RainbowPlanet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet.debug.xcconfig"; sourceTree = "<group>"; };
 		BDF47D79228271F600941AB9 /* ShoppingCartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartView.swift; sourceTree = "<group>"; };
 		BDF47D7D22827C3F00941AB9 /* ProductSlidingTopBottomCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductSlidingTopBottomCollectionViewCell.swift; sourceTree = "<group>"; };
@@ -1578,8 +1584,8 @@
 			children = (
 				A77F2C672231FB4A001BD3F6 /* Assets.xcassets */,
 				A71AF0BD226F1792001730FE /* ShoppingMallModule.xcassets */,
+				BD20F1D72283D2AA00677D8E /* ShoppingCartModule.xcassets */,
 				A7CC74DD22703B4A003C4F38 /* MineModule.xcassets */,
-				A7B4E71922811F770012914A /* ShoppingCarModoule.xcassets */,
 				A729B5A92266F6FD004AE098 /* Launch Screen.storyboard */,
 				A77F2C6C2231FB4A001BD3F6 /* Info.plist */,
 			);
@@ -2124,24 +2130,35 @@
 			path = FMDB;
 			sourceTree = "<group>";
 		};
+		BD20F1D12283D09E00677D8E /* ShoppingCartFinishPay */ = {
+			isa = PBXGroup;
+			children = (
+				BD20F1D22283D0ED00677D8E /* ShoppingCartPaySuccessCell.swift */,
+				BD20F1D42283D15500677D8E /* ShoppingCartPayFailureCell.swift */,
+			);
+			path = ShoppingCartFinishPay;
+			sourceTree = "<group>";
+		};
 		BDF47D782282645900941AB9 /* View */ = {
 			isa = PBXGroup;
 			children = (
 				BDF47D882282D94D00941AB9 /* ShoppingCartList */,
-				BDF47D832282BF4300941AB9 /* ShppingCartHotSale */,
+				BDF47D832282BF4300941AB9 /* ShoppingCartHotSale */,
+				BD20F1D12283D09E00677D8E /* ShoppingCartFinishPay */,
 				BDF47D79228271F600941AB9 /* ShoppingCartView.swift */,
 				BDF47D7F228288F900941AB9 /* ShoppingCartAccountView.swift */,
+				BD20F1CE2283CE2300677D8E /* ShoppingCartFinishPayView.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
 		};
-		BDF47D832282BF4300941AB9 /* ShppingCartHotSale */ = {
+		BDF47D832282BF4300941AB9 /* ShoppingCartHotSale */ = {
 			isa = PBXGroup;
 			children = (
 				BDF47D812282B3D100941AB9 /* ShoppingCartHotSaleTableViewCell.swift */,
 				BDF47D7D22827C3F00941AB9 /* ProductSlidingTopBottomCollectionViewCell.swift */,
 			);
-			path = ShppingCartHotSale;
+			path = ShoppingCartHotSale;
 			sourceTree = "<group>";
 		};
 		BDF47D882282D94D00941AB9 /* ShoppingCartList */ = {
@@ -2296,12 +2313,12 @@
 			buildActionMask = 2147483647;
 			files = (
 				A7CC74DE22703B4A003C4F38 /* MineModule.xcassets in Resources */,
-				A7B4E71A22811F770012914A /* ShoppingCarModoule.xcassets in Resources */,
 				A71AF0BE226F1792001730FE /* ShoppingMallModule.xcassets in Resources */,
 				A7778C9722438F5D00C7C47A /* AlipaySDK.bundle in Resources */,
 				A7190167227543DB00104A50 /* baidu_cityid_rel.json in Resources */,
 				A77F2C682231FB4A001BD3F6 /* Assets.xcassets in Resources */,
 				A72C01232275404A0065E0C3 /* province_city_area.json in Resources */,
+				BD20F1D82283D2AA00677D8E /* ShoppingCartModule.xcassets in Resources */,
 				A7778C9922438F5D00C7C47A /* README.txt in Resources */,
 				A729B5AA2266F6FD004AE098 /* Launch Screen.storyboard in Resources */,
 			);
@@ -2451,6 +2468,7 @@
 			files = (
 				A72A72BA22321DE000B21995 /* Extension+String.swift in Sources */,
 				A77F2CA02231FE45001BD3F6 /* BaseWebViewController.swift in Sources */,
+				BD20F1D52283D15500677D8E /* ShoppingCartPayFailureCell.swift in Sources */,
 				A72A72C022321DE000B21995 /* Extension+UIView.swift in Sources */,
 				A72A72C522321DE000B21995 /* WKWebViewConfig.swift in Sources */,
 				A72A72BB22321DE000B21995 /* Extension+UILabel.swift in Sources */,
@@ -2561,6 +2579,7 @@
 				A7A98E2D22801642005306E9 /* SwiftMoyaServiceCMSApi.swift in Sources */,
 				A7A98E3122801B10005306E9 /* ShoppingMallListView.swift in Sources */,
 				A7CC751A22716254003C4F38 /* SetTableViewCell.swift in Sources */,
+				BD20F1D32283D0ED00677D8E /* ShoppingCartPaySuccessCell.swift in Sources */,
 				A71AA52822732173008FF1A5 /* SwiftMoyaNetWorkServiceConfig.swift in Sources */,
 				A775CC0322377C6500EBDCF8 /* EmptyView.swift in Sources */,
 				A72A72A922321DE000B21995 /* NumberKeyboard.swift in Sources */,
@@ -2641,6 +2660,7 @@
 				A7A98DFD227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift in Sources */,
 				A72A72D222321E2700B21995 /* Common.swift in Sources */,
 				A71AF0A6226EDDC8001730FE /* SearchViewController.swift in Sources */,
+				BD20F1CF2283CE2300677D8E /* ShoppingCartFinishPayView.swift in Sources */,
 				A7A98E4322804851005306E9 /* ShoppingMallSepcialFlowLayout.swift in Sources */,
 				A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */,
 				A7824B002271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift in Sources */,

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartAccountView.swift

@@ -4,7 +4,7 @@
 //
 //  Created by Christopher on 2019/5/8.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
+//  购物车结算View
 
 import UIKit
 import RxSwift

+ 131 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartFinishPay/ShoppingCartPayFailureCell.swift

@@ -0,0 +1,131 @@
+//
+//  ShoppingCartPayFailureCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/9.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  购物车--支付失败Cell
+
+import UIKit
+import RxSwift
+import RxCocoa
+
+class ShoppingCartPayFailureCell: UITableViewCell {
+    
+    override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set {
+            var frame = newValue
+            frame.origin.x += 14 * kScaleWidth
+            frame.size.width -= 14 * kScaleWidth * 2
+            super.frame = frame
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingCartPayFailureCell {
+        let ID = "ShoppingCartPayFailureCell"
+        tableView.register(ShoppingCartPayFailureCell.self, forCellReuseIdentifier: ID)
+        let cell : ShoppingCartPayFailureCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! ShoppingCartPayFailureCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        
+        addSubview(statusImageView)
+        addSubview(titleLabel)
+        addSubview(describeLabel)
+        addSubview(jumpButton)
+    }
+    
+    private func setupLayouts() {
+        statusImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(32)
+            make.centerX.equalToSuperview()
+            make.size.equalTo(50)
+        }
+        
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(statusImageView.snp.bottom).offset(20)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(31)
+        }
+        
+        describeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(12)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(19)
+        }
+        
+        jumpButton.snp.makeConstraints { (make) in
+            make.top.equalTo(describeLabel.snp.bottom).offset(20)
+            make.bottom.equalToSuperview().offset(-30)
+            make.centerX.equalToSuperview()
+            make.left.equalTo(24)
+            make.right.equalTo(-24)
+        }
+        
+    }
+    
+    lazy var statusImageView : UIImageView = {
+        let statusImageView = UIImageView()
+        statusImageView.image = kImage(name: "shopping_cart_trade_failure")
+        return statusImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "支付失败"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont22
+        titleLabel.textAlignment = .center
+        return titleLabel
+    }()
+    
+    private lazy var describeLabel: UILabel = {
+        let describeLabel = UILabel()
+        describeLabel.text = "20秒未支付,系统自动判断失败"
+        describeLabel.textColor = k666666Color
+        describeLabel.font = kRegularFont13
+        describeLabel.textAlignment = .center
+        return describeLabel
+    }()
+    
+    private lazy var jumpButton: UIButton = {
+        let jumpButton = UIButton(type: UIButton.ButtonType.custom)
+        jumpButton.backgroundColor = kFFA42FColor
+        jumpButton.setTitle("重新支付", for: UIControl.State.normal)
+        jumpButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        jumpButton.titleLabel?.font = kRegularFont16
+        jumpButton.cornerRadius = 18
+        jumpButton.masksToBounds = true
+        //        jumpButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+        //            //            if let forgetPasswordBlock = self?.forgetPasswordBlock {
+        //            //                forgetPasswordBlock()
+        //            //            }
+        //            print("点击了跳转到首页")
+        //        }).disposed(by: disposeBag)
+        return jumpButton
+    }()
+    
+}

+ 158 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartFinishPay/ShoppingCartPaySuccessCell.swift

@@ -0,0 +1,158 @@
+//
+//  ShoppingCartPaySuccessCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/9.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  购物车--支付成功Cell
+
+import UIKit
+import RxSwift
+import RxCocoa
+
+class ShoppingCartPaySuccessCell: UITableViewCell {
+    
+    override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set {
+            var frame = newValue
+            frame.origin.x += 14 * kScaleWidth
+            frame.size.width -= 14 * kScaleWidth * 2
+            super.frame = frame
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingCartPaySuccessCell {
+        let ID = "ShoppingCartPaySuccessCell"
+        tableView.register(ShoppingCartPaySuccessCell.self, forCellReuseIdentifier: ID)
+        let cell : ShoppingCartPaySuccessCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! ShoppingCartPaySuccessCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        
+        addSubview(statusImageView)
+        addSubview(titleLabel)
+        addSubview(describeLabel)
+        addSubview(jumpButton)
+        addSubview(orderButton)
+    }
+    
+    private func setupLayouts() {
+        statusImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(32)
+            make.centerX.equalToSuperview()
+            make.size.equalTo(50)
+        }
+        
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(statusImageView.snp.bottom).offset(20)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(31)
+        }
+        
+        describeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(12)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(19)
+        }
+        
+        jumpButton.snp.makeConstraints { (make) in
+            make.top.equalTo(describeLabel.snp.bottom).offset(20)
+            make.bottom.equalToSuperview().offset(-73)
+            make.centerX.equalToSuperview()
+            make.left.equalTo(24)
+            make.right.equalTo(-24)
+        }
+        
+        orderButton.snp.makeConstraints { (make) in
+            make.top.equalTo(jumpButton.snp.bottom).offset(20)
+            make.right.equalTo(-24)
+            make.width.equalTo(56)
+            make.height.equalTo(24)
+        }
+        
+        orderButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.bottom, imageTitleSpace: 2)
+        
+    }
+    
+    lazy var statusImageView : UIImageView = {
+        let statusImageView = UIImageView()
+        statusImageView.image = kImage(name: "shopping_cart_trade_finish")
+        return statusImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "支付完成"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont22
+        titleLabel.textAlignment = .center
+        return titleLabel
+    }()
+    
+    private lazy var describeLabel: UILabel = {
+        let describeLabel = UILabel()
+        describeLabel.text = "订单整装待发,请注意查收!"
+        describeLabel.textColor = k666666Color
+        describeLabel.font = kRegularFont13
+        describeLabel.textAlignment = .center
+        return describeLabel
+    }()
+    
+    private lazy var jumpButton: UIButton = {
+        let jumpButton = UIButton(type: UIButton.ButtonType.custom)
+        jumpButton.backgroundColor = kFFA42FColor
+        jumpButton.setTitle("继续逛一逛", for: UIControl.State.normal)
+        jumpButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        jumpButton.titleLabel?.font = kRegularFont16
+        jumpButton.cornerRadius = 18
+        jumpButton.masksToBounds = true
+        //        jumpButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+        //            //            if let forgetPasswordBlock = self?.forgetPasswordBlock {
+        //            //                forgetPasswordBlock()
+        //            //            }
+        //            print("点击了跳转到首页")
+        //        }).disposed(by: disposeBag)
+        return jumpButton
+    }()
+    
+    private lazy var orderButton: UIButton = {
+        let orderButton = UIButton(type: UIButton.ButtonType.custom)
+        orderButton.backgroundColor = kffffffColor
+        orderButton.setTitle("查看订单", for: UIControl.State.normal)
+        orderButton.setTitleColor(k333333Color, for: UIControl.State.normal)
+        orderButton.setImage(UIImage.imageWithColor(color: k333333Color), for: UIControl.State.normal)
+        orderButton.titleLabel?.font = kRegularFont14
+        
+//        orderButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+//            //            if let forgetPasswordBlock = self?.forgetPasswordBlock {
+//            //                forgetPasswordBlock()
+//            //            }
+//            print("点击了跳转到首页")
+//        }).disposed(by: disposeBag)
+        return orderButton
+    }()
+    
+}

+ 92 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartFinishPayView.swift

@@ -0,0 +1,92 @@
+//
+//  ShoppingCartFinishPayView.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/9.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  购物车--支付完成View
+
+import UIKit
+
+class ShoppingCartFinishPayView: BaseView {
+    
+    override func setupViews() {
+        self.backgroundColor = kf7f8faColor
+        addSubview(tableView)
+        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle2(iconStr: "page04", titleStr: "当前暂无数据")
+        emptyView.contentViewY = kScaleValue(value: 182)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+extension ShoppingCartFinishPayView : UITableViewDelegate, UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 2
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        switch indexPath.section {
+        case 0:
+            // 支付成功
+            let cell = ShoppingCartPaySuccessCell.cellWith(tableView: tableView, indexPath: indexPath)
+            // 支付失败
+//            let cell = ShoppingCartPayFailureCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return cell
+        case 1:
+            let cell = ShoppingCartHotSaleTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.frame = tableView.bounds
+            cell.layoutIfNeeded()
+            cell.reloadData()
+            return cell
+            
+        default:
+            return UITableViewCell()
+        }
+        
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return  UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 10
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}

RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShppingCartHotSale/ProductSlidingTopBottomCollectionViewCell.swift → RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartHotSale/ProductSlidingTopBottomCollectionViewCell.swift


+ 9 - 3
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShppingCartHotSale/ShoppingCartHotSaleTableViewCell.swift

@@ -58,7 +58,12 @@ class ShoppingCartHotSaleTableViewCell: UITableViewCell {
     private func setupLayouts() {
         titleView.snp.remakeConstraints { (make) in
             make.top.left.right.equalToSuperview()
-            make.height.equalTo(63)
+            make.height.equalTo(39)
+        }
+        collectionView.snp.makeConstraints { (make) in
+            make.top.equalTo(39)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(200)
         }
     }
     
@@ -71,7 +76,8 @@ class ShoppingCartHotSaleTableViewCell: UITableViewCell {
         titleLabel.text = "超值热卖"
         titleView.addSubview(titleLabel)
         titleLabel.snp.makeConstraints { (make) in
-            make.center.equalToSuperview()
+            make.top.equalTo(10)
+            make.centerX.equalToSuperview()
             make.height.equalTo(23)
         }
         return titleView
@@ -101,7 +107,7 @@ class ShoppingCartHotSaleTableViewCell: UITableViewCell {
         //更新collectionView的高度约束
         let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
         collectionView.snp.remakeConstraints { (make) in
-            make.top.equalTo(63)
+            make.top.equalTo(39)
             make.left.right.equalToSuperview()
             make.height.equalTo(contentSize.height)
             make.bottom.equalToSuperview()

+ 6 - 2
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartView.swift

@@ -4,7 +4,7 @@
 //
 //  Created by Christopher on 2019/5/8.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
+//  购物车首页View
 
 import UIKit
 
@@ -111,7 +111,11 @@ extension ShoppingCartView : UITableViewDelegate, UITableViewDataSource {
     }
     
     func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        return 48
+        if section == 0 || section == 3 {
+            return 10
+        } else {
+            return 48
+        }
     }
     
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {

+ 9 - 9
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/ViewController/ShoppingCartFinishPayController.swift

@@ -4,7 +4,7 @@
 //
 //  Created by Christopher on 2019/5/9.
 //  Copyright © 2019 RainbowPlanet. All rights reserved.
-//
+//  购物车--支付完成Vc
 
 import UIKit
 import RxSwift
@@ -28,26 +28,26 @@ class ShoppingCartFinishPayController: BaseViewController {
     }
     
     override func setupData() {
-        //TODO:获取购物车列表
+        //TODO:获取热销列表
         //        SwiftMoyaNetWorkServiceCMS.shared().cmsTemplateSetTemplateNameApi {
         //            [weak self] (data) -> (Void) in
         //            self?.setShoppingCartView()
-        self.setShoppingCartView()
+        self.setFinishPayView()
         //        }
     }
     
     /// 添加view
-    func setShoppingCartView() {
-        view.addSubview(shoppingCartView)
-        shoppingCartView.snp.makeConstraints { (make) in
+    func setFinishPayView() {
+        view.addSubview(finishPayView)
+        finishPayView.snp.makeConstraints { (make) in
             make.bottom.left.right.equalToSuperview()
             make.top.equalTo(kNavBarTotalHeight)
         }
     }
     
-    private lazy var shoppingCartView: ShoppingCartView = {
-        let shoppingCartView = ShoppingCartView()
-        return shoppingCartView
+    private lazy var finishPayView: ShoppingCartFinishPayView = {
+        let finishPayView = ShoppingCartFinishPayView()
+        return finishPayView
     }()
     
 }

+ 6 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_failure.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_failure.imageset/shopping_cart_trade_failure@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_failure.imageset/shopping_cart_trade_failure@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_finish.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_finish.imageset/shopping_cart_trade_finish@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/shopping_cart_trade_finish.imageset/shopping_cart_trade_finish@3x.png