Kaynağa Gözat

Merge branch 'develop' into feature/nanxinlin

南鑫林 6 yıl önce
ebeveyn
işleme
6d04f3348e
26 değiştirilmiş dosya ile 1362 ekleme ve 58 silme
  1. 104 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 2 0
      RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift
  3. 6 6
      RainbowPlanet/RainbowPlanet/Manager/PayManager/PayManagerView/CommonPayHeader.swift
  4. 15 2
      RainbowPlanet/RainbowPlanet/Manager/PayManager/PayManagerView/CommonPayView.swift
  5. 145 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundProductCell.swift
  6. 110 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/ViewController/OrderApplyRefundController.swift
  7. 99 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentAddImgCollectionCell.swift
  8. 106 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentDefaultCollectionCell.swift
  9. 215 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentTableViewCell.swift
  10. 106 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/ViewController/OrderCommentController.swift
  11. 140 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderLogistics/View/OrderLogisticsInfoCell.swift
  12. 125 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderLogistics/ViewController/OrderLogisticsController.swift
  13. 33 5
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/View/ShoppingCartFinishPayView.swift
  14. 10 6
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/View/ShoppingCartPayFailureCell.swift
  15. 20 13
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/View/ShoppingCartPaySuccessCell.swift
  16. 18 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/ViewController/ShoppingCartFinishPayController.swift
  17. 34 7
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartPayOrder/ViewController/ShoppingCartPayOrderController.swift
  18. 12 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServicePay/SwiftMoyaNetWorkServicePay.swift
  19. 8 7
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServicePay/SwiftMoyaServicePayApi.swift
  20. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_image_empty.imageset/Contents.json
  21. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_image_empty.imageset/order_image_empty@2x.png
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_image_empty.imageset/order_image_empty@3x.png
  23. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_photo.imageset/Contents.json
  24. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_photo.imageset/order_photo@2x.png
  25. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_photo.imageset/order_photo@3x.png
  26. 10 8
      RainbowPlanet/RainbowPlanet/Tools/AlertSheetView/AlertSheetView.swift

+ 104 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -337,6 +337,14 @@
 		BDF47D822282B3D100941AB9 /* ShoppingCartHotSaleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF47D812282B3D100941AB9 /* ShoppingCartHotSaleTableViewCell.swift */; };
 		BDF47D852282C59F00941AB9 /* ShoppingCartListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF47D842282C59F00941AB9 /* ShoppingCartListTableViewCell.swift */; };
 		BDF47D872282C92200941AB9 /* ShoppingCartListTableViewHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF47D862282C92200941AB9 /* ShoppingCartListTableViewHeader.swift */; };
+		BDF8629C228E4125000DEF84 /* OrderCommentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF8629B228E4125000DEF84 /* OrderCommentController.swift */; };
+		BDF862A1228E41CC000DEF84 /* OrderLogisticsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF8629E228E41CC000DEF84 /* OrderLogisticsController.swift */; };
+		BDF862A2228E41CC000DEF84 /* OrderLogisticsInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF862A0228E41CC000DEF84 /* OrderLogisticsInfoCell.swift */; };
+		BDF862A7228E42FA000DEF84 /* OrderApplyRefundController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF862A6228E42FA000DEF84 /* OrderApplyRefundController.swift */; };
+		BDF862AA228E43A4000DEF84 /* OrderCommentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF862A9228E43A4000DEF84 /* OrderCommentTableViewCell.swift */; };
+		BDF862AC228E5112000DEF84 /* OrderCommentAddImgCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF862AB228E5112000DEF84 /* OrderCommentAddImgCollectionCell.swift */; };
+		BDF862AE228E57E1000DEF84 /* OrderCommentDefaultCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF862AD228E57E1000DEF84 /* OrderCommentDefaultCollectionCell.swift */; };
+		BDF862B1228E6690000DEF84 /* OrderApplyRefundProductCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDF862B0228E6690000DEF84 /* OrderApplyRefundProductCell.swift */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -703,6 +711,14 @@
 		BDF47D812282B3D100941AB9 /* ShoppingCartHotSaleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartHotSaleTableViewCell.swift; sourceTree = "<group>"; };
 		BDF47D842282C59F00941AB9 /* ShoppingCartListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartListTableViewCell.swift; sourceTree = "<group>"; };
 		BDF47D862282C92200941AB9 /* ShoppingCartListTableViewHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartListTableViewHeader.swift; sourceTree = "<group>"; };
+		BDF8629B228E4125000DEF84 /* OrderCommentController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderCommentController.swift; sourceTree = "<group>"; };
+		BDF8629E228E41CC000DEF84 /* OrderLogisticsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderLogisticsController.swift; sourceTree = "<group>"; };
+		BDF862A0228E41CC000DEF84 /* OrderLogisticsInfoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderLogisticsInfoCell.swift; sourceTree = "<group>"; };
+		BDF862A6228E42FA000DEF84 /* OrderApplyRefundController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundController.swift; sourceTree = "<group>"; };
+		BDF862A9228E43A4000DEF84 /* OrderCommentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderCommentTableViewCell.swift; sourceTree = "<group>"; };
+		BDF862AB228E5112000DEF84 /* OrderCommentAddImgCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderCommentAddImgCollectionCell.swift; sourceTree = "<group>"; };
+		BDF862AD228E57E1000DEF84 /* OrderCommentDefaultCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderCommentDefaultCollectionCell.swift; sourceTree = "<group>"; };
+		BDF862B0228E6690000DEF84 /* OrderApplyRefundProductCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundProductCell.swift; sourceTree = "<group>"; };
 		D469F6C3768252BCB7001EDD /* Pods_RainbowPlanet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanet.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
@@ -2599,6 +2615,9 @@
 				A7FF155B228C68B200A85748 /* Order */,
 				A7FF155C228C68C900A85748 /* OrderDetail */,
 				A7FF158A228C910600A85748 /* OrderRefunddetails */,
+				BD77BE1B228D8D320060E23C /* OrderLogistics */,
+				BD77BE18228D8C2E0060E23C /* OrderComment */,
+				BDF862A3228E4266000DEF84 /* OrderApplyRefund */,
 			);
 			path = OrderModule;
 			sourceTree = "<group>";
@@ -2769,6 +2788,32 @@
 			path = ViewController;
 			sourceTree = "<group>";
 		};
+		BD77BE18228D8C2E0060E23C /* OrderComment */ = {
+			isa = PBXGroup;
+			children = (
+				BDF862A8228E438E000DEF84 /* View */,
+				BD77BE1A228D8C570060E23C /* ViewController */,
+			);
+			path = OrderComment;
+			sourceTree = "<group>";
+		};
+		BD77BE1A228D8C570060E23C /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				BDF8629B228E4125000DEF84 /* OrderCommentController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		BD77BE1B228D8D320060E23C /* OrderLogistics */ = {
+			isa = PBXGroup;
+			children = (
+				BDF8629F228E41CC000DEF84 /* View */,
+				BDF8629D228E41CC000DEF84 /* ViewController */,
+			);
+			path = OrderLogistics;
+			sourceTree = "<group>";
+		};
 		BD7AB83B228437940030646A /* AdressCell */ = {
 			isa = PBXGroup;
 			children = (
@@ -2820,6 +2865,57 @@
 			path = ShoppingCartList;
 			sourceTree = "<group>";
 		};
+		BDF8629D228E41CC000DEF84 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				BDF8629E228E41CC000DEF84 /* OrderLogisticsController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		BDF8629F228E41CC000DEF84 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BDF862A0228E41CC000DEF84 /* OrderLogisticsInfoCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		BDF862A3228E4266000DEF84 /* OrderApplyRefund */ = {
+			isa = PBXGroup;
+			children = (
+				BDF862AF228E64D5000DEF84 /* View */,
+				BDF862A4228E42CA000DEF84 /* ViewController */,
+			);
+			path = OrderApplyRefund;
+			sourceTree = "<group>";
+		};
+		BDF862A4228E42CA000DEF84 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				BDF862A6228E42FA000DEF84 /* OrderApplyRefundController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		BDF862A8228E438E000DEF84 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BDF862A9228E43A4000DEF84 /* OrderCommentTableViewCell.swift */,
+				BDF862AB228E5112000DEF84 /* OrderCommentAddImgCollectionCell.swift */,
+				BDF862AD228E57E1000DEF84 /* OrderCommentDefaultCollectionCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		BDF862AF228E64D5000DEF84 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BDF862B0228E6690000DEF84 /* OrderApplyRefundProductCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		FA8AAFBADE8BD144A5C36FDB /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
@@ -3145,6 +3241,7 @@
 				A7778CA72243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift in Sources */,
 				A7B4E738228191CC0012914A /* CommondModel.swift in Sources */,
 				BD7AB841228438C80030646A /* OrderPaySelfPickAddressCell.swift in Sources */,
+				BDF862AC228E5112000DEF84 /* OrderCommentAddImgCollectionCell.swift in Sources */,
 				A7CC74D4226FF1AA003C4F38 /* MineView.swift in Sources */,
 				A71AA5152272160A008FF1A5 /* ExpressAddressListTableViewCell.swift in Sources */,
 				A72A72B722321DE000B21995 /* Extension+NSMutableAttributedString.swift in Sources */,
@@ -3170,6 +3267,7 @@
 				A7FF1579228C82CE00A85748 /* OrderDetailViewController.swift in Sources */,
 				A7FF159C228D9E3D00A85748 /* OrderRefundDetailModel.swift in Sources */,
 				A7C3DD1C226422D200FA262E /* SwiftMoyaNetWorkServiceSMS.swift in Sources */,
+				BDF862A2228E41CC000DEF84 /* OrderLogisticsInfoCell.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
 				A70B2C252286C03800B2449F /* NXLPageControl.swift in Sources */,
 				A7A98E12227ECA11005306E9 /* ProductSearchModel.swift in Sources */,
@@ -3229,6 +3327,7 @@
 				A7824B042271F10300ABA381 /* EditSelfMentionContactsView.swift in Sources */,
 				A7FF1566228C6DF200A85748 /* OrderShopAndStatusTableViewCell.swift in Sources */,
 				A7A98E332280272A005306E9 /* ShoppingMallBannerTableViewCell.swift in Sources */,
+				BDF862AA228E43A4000DEF84 /* OrderCommentTableViewCell.swift in Sources */,
 				A7B4E754228278320012914A /* ShoppingMallFloorTableViewCell.swift in Sources */,
 				BD3474F522857B85000908C5 /* CommonPayHeader.swift in Sources */,
 				A71AF0B6226EF99A001730FE /* SearchResultViewController.swift in Sources */,
@@ -3304,6 +3403,7 @@
 				A7CC752F2271A1F2003C4F38 /* SetPasswordView.swift in Sources */,
 				A7A98E09227EB8DD005306E9 /* CategoryView.swift in Sources */,
 				A7CC75362271AC14003C4F38 /* AddressManagerView.swift in Sources */,
+				BDF8629C228E4125000DEF84 /* OrderCommentController.swift in Sources */,
 				A7B4E75A228289BB0012914A /* ProductFloorCenterHeaderCollectionReusableView.swift in Sources */,
 				A71901752275F71F00104A50 /* BaiduToCityModel.swift in Sources */,
 				A7BB685922696B9200AB07A2 /* SelfRecommendationCollectionViewCell.swift in Sources */,
@@ -3321,6 +3421,7 @@
 				A7CC74E0227042A4003C4F38 /* MineServiceTableViewCell.swift in Sources */,
 				A72A72BC22321DE000B21995 /* Extension+UIAlertController.swift in Sources */,
 				A7BB68662269B1DD00AB07A2 /* AddressPOIView.swift in Sources */,
+				BDF862A7228E42FA000DEF84 /* OrderApplyRefundController.swift in Sources */,
 				A72A72C322321DE000B21995 /* Extension+Date.swift in Sources */,
 				A70B2C5522885AF500B2449F /* ShareCollectionViewCell.swift in Sources */,
 				A7A98E3A2280312C005306E9 /* ShoppingMallCategoryTableViewCell.swift in Sources */,
@@ -3332,6 +3433,7 @@
 				A7B4E73A228192D20012914A /* CMSTemplateModel.swift in Sources */,
 				A72A72C622321DE000B21995 /* WebView.swift in Sources */,
 				A72A72D122321E2700B21995 /* HTMLURLMacro.swift in Sources */,
+				BDF862A1228E41CC000DEF84 /* OrderLogisticsController.swift in Sources */,
 				A72A73162232481600B21995 /* WeChatpayManager.swift in Sources */,
 				A7CC750F22715AAC003C4F38 /* MessageDetailesTableViewCell.swift in Sources */,
 				A7B4E72D228176060012914A /* ProductMallBarChartCollectionViewCell.swift in Sources */,
@@ -3358,6 +3460,7 @@
 				BDF47D7A228271F600941AB9 /* ShoppingCartView.swift in Sources */,
 				A7824AFB2271EA2600ABA381 /* SelfMentionContactsListView.swift in Sources */,
 				A72A72AB22321DE000B21995 /* SwiftProgressHUD.swift in Sources */,
+				BDF862B1228E6690000DEF84 /* OrderApplyRefundProductCell.swift in Sources */,
 				A7CC751C22716426003C4F38 /* SetLogoutTableViewCell.swift in Sources */,
 				A7CC74F3227070D2003C4F38 /* MessageTwoCollectionViewCell.swift in Sources */,
 				A7778CD522460D8E00C7C47A /* PhoneCountryAreaTableViewCell.swift in Sources */,
@@ -3365,6 +3468,7 @@
 				A7CC750A22715755003C4F38 /* MessageDetailesViewController.swift in Sources */,
 				A71AF0B8226EF9EC001730FE /* SearchResultNavigationbarView.swift in Sources */,
 				A70B2C5A22886ADF00B2449F /* ShopViewController.swift in Sources */,
+				BDF862AE228E57E1000DEF84 /* OrderCommentDefaultCollectionCell.swift in Sources */,
 				A70B2C3E228825B100B2449F /* ProductDetailEvaluationTableViewCell.swift in Sources */,
 				A79057022276C9770037F823 /* SetPasswordModel.swift in Sources */,
 				A7FF1560228C693D00A85748 /* OrderViewController.swift in Sources */,

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -113,3 +113,5 @@ let kD2D3D5Color = UIColor(hexString: "D2D3D5")
 let kfee5e4Color = UIColor(hexString: "fee5e4")
 
 let kccccccColor = UIColor(hexString: "cccccc")
+
+let kfafafaColor = UIColor(hexString: "fafafa")

+ 6 - 6
RainbowPlanet/RainbowPlanet/Manager/PayManager/PayManagerView/CommonPayHeader.swift

@@ -12,6 +12,9 @@ import RxCocoa
 
 class CommonPayHeader: BaseView {
     
+    typealias DismissBlock = () -> Void
+    var dismissBlock : DismissBlock?
+    
     var payAmount: Int? {
         didSet {
             titleLabel.text = "支付金额¥\(payAmount ?? 0)"
@@ -40,12 +43,9 @@ class CommonPayHeader: BaseView {
         let dismissBtn = UIButton(type: UIButton.ButtonType.custom)
         dismissBtn.setImage(kImage(name: "common_order_close"), for: .normal)
         dismissBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
-            
-            //            if let loginBlock = self?.loginBlock {
-            //                loginBlock((self?.phoneNumber)!,(self?.password)!)
-            //            }
-            print("点击了关闭支付弹窗")
-            
+            if let dismissBlock = self?.dismissBlock {
+                dismissBlock()
+            }
         }).disposed(by: disposeBag)
         return dismissBtn
     }()

+ 15 - 2
RainbowPlanet/RainbowPlanet/Manager/PayManager/PayManagerView/CommonPayView.swift

@@ -20,6 +20,12 @@ class CommonPayView: FWPopupView {
     
     let disposeBag = DisposeBag()
     
+    typealias DismissTransBlock = () -> Void
+    var disTransBlock : DismissTransBlock?
+    
+    typealias ConfirmPayBlock = (_ pType: PayType) -> Void
+    var confirmPayBlock : ConfirmPayBlock?
+    
     var curPayType : PayType = PayType.wechatPay
     
     override init(frame: CGRect) {
@@ -67,8 +73,9 @@ class CommonPayView: FWPopupView {
         confirmPayBtn.setTitleColor(kffffffColor, for: UIControl.State.normal)
         confirmPayBtn.titleLabel?.font = kScaleRegularFont16
         confirmPayBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
-            
-            print("点击--确认支付")
+            if let confirmPayBlock = self?.confirmPayBlock {
+                confirmPayBlock(self!.curPayType)
+            }            
         }).disposed(by: disposeBag)
         return confirmPayBtn
     }()
@@ -133,6 +140,12 @@ extension CommonPayView : UITableViewDelegate, UITableViewDataSource {
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
         let headerView = CommonPayHeader(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 50))
         headerView.payAmount = 155
+        headerView.dismissBlock = {
+            [weak self] in
+            if let disTransBlock = self?.disTransBlock {
+                disTransBlock()
+            }
+        }
         return headerView
     }
     

+ 145 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundProductCell.swift

@@ -0,0 +1,145 @@
+//
+//  OrderApplyRefundProductCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  申请退款--商品详情Cell
+
+import UIKit
+
+class OrderApplyRefundProductCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundProductCell {
+        let ID = "OrderApplyRefundProductCell"
+        tableView.register(OrderApplyRefundProductCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderApplyRefundProductCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderApplyRefundProductCell
+        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(productImageView)
+        addSubview(titleLabel)
+        addSubview(timeLabel)
+        addSubview(skuLabel)
+        addSubview(priceLabel)
+        addSubview(numberLabel)
+        addSubview(lineLabel)
+    }
+    
+    private func setupLayouts() {
+        productImageView.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.centerY.equalToSuperview()
+            make.size.equalTo(80)
+        }
+        
+        titleLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(productImageView.snp.right).offset(12)
+            make.top.equalTo(20)
+            make.right.equalTo(priceLabel.snp.left).offset(-12)
+            make.height.equalTo(20)
+        }
+        timeLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(8)
+            make.left.equalTo(titleLabel)
+            make.height.equalTo(17)
+        }
+        skuLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(timeLabel.snp.bottom).offset(8)
+            make.left.equalTo(titleLabel)
+            make.height.equalTo(17)
+        }
+        priceLabel.snp.makeConstraints { (make) in
+            make.centerY.equalTo(titleLabel)
+            make.right.equalTo(-14)
+        }
+        numberLabel.snp.makeConstraints { (make) in
+            make.centerY.equalTo(timeLabel)
+            make.right.equalTo(-14)
+        }
+        
+        lineLabel.snp.makeConstraints { (make) in
+            make.bottom.equalToSuperview()
+            make.height.equalTo(1)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+        }
+    }
+    
+    private lazy var productImageView: UIImageView = {
+        let productImageView = UIImageView()
+        productImageView.image = kImage(name: "pic_preload")
+        return productImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont14
+        return titleLabel
+    }()
+    
+    private lazy var timeLabel: UILabel = {
+        let timeLabel = UILabel()
+        timeLabel.textColor = k666666Color
+        timeLabel.font = kRegularFont12
+        return timeLabel
+    }()
+    
+    private lazy var skuLabel: UILabel = {
+        let skuLabel = UILabel()
+        skuLabel.textColor = k999999Color
+        skuLabel.font = kRegularFont12
+        return skuLabel
+    }()
+    
+    private lazy var priceLabel: UILabel = {
+        let priceLabel = UILabel()
+        priceLabel.textColor = k333333Color
+        priceLabel.font = kRegularFont14
+        return priceLabel
+    }()
+    
+    private lazy var numberLabel: UILabel = {
+        let numberLabel = UILabel()
+        numberLabel.textColor = k999999Color
+        numberLabel.font = kRegularFont13
+        return numberLabel
+    }()
+    
+    private lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = kf5f5f5Color
+        return lineLabel
+    }()
+    
+    var orderModelDetailModel: OrderModelDetailModel? {
+        didSet {
+            productImageView.kf.setImage(with: kURLImage(name: orderModelDetailModel?.productImg ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
+            titleLabel.text = orderModelDetailModel?.productName
+            timeLabel.text = "预计配送时间:\(orderModelDetailModel?.receiveTime ?? "")"
+            skuLabel.text = "规格:\(orderModelDetailModel?.skuName ?? "")"
+            priceLabel.text = "¥\(orderModelDetailModel?.productPrice ?? 0)"
+            numberLabel.text = "x\(orderModelDetailModel?.amount ?? 0)"
+        }
+    }
+}

+ 110 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/ViewController/OrderApplyRefundController.swift

@@ -0,0 +1,110 @@
+//
+//  OrderApplyRefundController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  订单--申请退款Vc
+
+import UIKit
+import RxSwift
+
+class OrderApplyRefundController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupData()
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "申请退款"        
+        self.view.backgroundColor = kf7f8faColor
+        
+        let commitButton = UIButton(type: UIButton.ButtonType.custom)
+        commitButton.setTitle("提交", for: .normal)
+        commitButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        commitButton.titleLabel?.font = kRegularFont16
+        commitButton.backgroundColor = kFFA42FColor
+        self.view.addSubview(commitButton)
+        commitButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+            print("点击了--提交申请退款")
+            
+        }).disposed(by: disposeBag)
+        commitButton.snp.makeConstraints { (make) in
+            make.left.right.equalToSuperview()
+            make.bottom.equalToSuperview().offset(-kSafeTabBarHeight)
+            make.height.equalTo(50)
+        }
+        
+        
+        self.view.addSubview(tableView)
+        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle2(iconStr: "page04", titleStr: "当前暂无数据")
+        emptyView.contentViewY = kScaleValue(value: 182)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kSafeStatusBarHeight+40)
+            make.bottom.equalTo(commitButton.snp_top)
+            make.left.right.equalToSuperview()
+        }
+        
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kffffffColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+// MARK: - tableView dataSource && delegate
+extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSource {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1+4
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let infoCell = OrderLogisticsInfoCell.cellWith(tableView: tableView, indexPath: indexPath)
+        if indexPath.row == 0 {
+            infoCell.isFirstCell = true
+        }
+        if indexPath.row == 4 {
+            infoCell.isLastCell = true
+        }
+        return infoCell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return  UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    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
+    }
+    
+}

+ 99 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentAddImgCollectionCell.swift

@@ -0,0 +1,99 @@
+//
+//  OrderCommentAddImgCollectionCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  添加照片のCell(有图)(85*85)
+
+import UIKit
+import RxSwift
+
+class OrderCommentAddImgCollectionCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    var productSearchModel: ProductSearchModel? {
+        didSet {
+            picImageView.kf.setImage(with: kURLImage(name: productSearchModel?.img ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))            
+        }
+    }
+    
+    typealias DelPicBlock = (_ productSearchModel: ProductSearchModel?,_ indexPath:IndexPath?) -> Void
+    var delPicBlock : DelPicBlock?
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> OrderCommentAddImgCollectionCell {
+        let ID = "OrderCommentAddImgCollectionCell"
+        collectionView.register(OrderCommentAddImgCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : OrderCommentAddImgCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! OrderCommentAddImgCollectionCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = UIColor.white
+        cornerRadius = 4
+        masksToBounds = true
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(imgBackView)
+        imgBackView.addSubview(picImageView)
+        
+        addSubview(delButton)
+    }
+    
+    private func setupLayouts() {
+        imgBackView.snp.makeConstraints { (make) in
+            make.left.bottom.equalToSuperview()
+            make.size.equalTo(76)
+        }
+        picImageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        delButton.snp.makeConstraints { (make) in
+            make.top.right.equalToSuperview()
+            make.size.equalTo(18)
+        }
+    }
+    
+    private lazy var imgBackView: UIView = {
+        let imgBackView = UIView()
+        return imgBackView
+    }()
+        
+    private lazy var picImageView: UIImageView = {
+        let picImageView = UIImageView()
+        return picImageView
+    }()
+    
+    private lazy var delButton: UIButton = {
+        let delButton = UIButton(type: UIButton.ButtonType.custom)
+        delButton.setImage(kImage(name: "common_sku_cancel"), for: UIControl.State.normal)
+        delButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+//            if let delPicBlock = self?.delPicBlock {
+//                delPicBlock(self?.productSearchModel,self?.indexPath)
+//            }
+            print("点击删除图片")
+            
+        }).disposed(by: disposeBag)
+        return delButton
+    }()
+    
+}

+ 106 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentDefaultCollectionCell.swift

@@ -0,0 +1,106 @@
+//
+//  OrderCommentDefaultCollectionCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  添加照片のCell(默认,无图)
+
+import UIKit
+import RxSwift
+
+class OrderCommentDefaultCollectionCell: UICollectionViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    var productSearchModel: ProductSearchModel? {
+        didSet {
+            titleLabel.text = productSearchModel?.saleName
+        }
+    }
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> OrderCommentDefaultCollectionCell {
+        let ID = "OrderCommentDefaultCollectionCell.swift"
+        collectionView.register(OrderCommentDefaultCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : OrderCommentDefaultCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! OrderCommentDefaultCollectionCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = UIColor.white
+        cornerRadius = 4
+        masksToBounds = true
+        setupViews()
+        setupLayouts()        
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(imgBackView)
+        imgBackView.addSubview(picImageView)
+        imgBackView.addSubview(cameraImgView)
+        imgBackView.addSubview(titleLabel)
+    }
+        
+    private func setupLayouts() {
+        imgBackView.snp.makeConstraints { (make) in
+            make.left.bottom.equalToSuperview()
+            make.size.equalTo((kScreenWidth-30-5*3)/4-9)
+        }
+        picImageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        cameraImgView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(16)
+            make.centerX.equalToSuperview()
+            make.width.equalTo(23)
+            make.height.equalTo(20)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(cameraImgView.snp_bottom).offset(12)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(17)
+        }
+    }
+    
+    private lazy var imgBackView: UIView = {
+        let imgBackView = UIView()
+        return imgBackView
+    }()
+    
+    private lazy var picImageView: UIImageView = {
+        let picImageView = UIImageView()
+        picImageView.image = kImage(name: "order_image_empty")
+        return picImageView
+    }()
+    
+    private lazy var cameraImgView: UIImageView = {
+        let cameraImgView = UIImageView()
+        cameraImgView.image = kImage(name: "order_photo")
+        return cameraImgView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "添加照片"
+        titleLabel.textColor = k666666Color
+        titleLabel.font = kRegularFont12
+        titleLabel.textAlignment = .center
+        titleLabel.numberOfLines = 1
+        return titleLabel
+    }()
+     
+}
+

+ 215 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentTableViewCell.swift

@@ -0,0 +1,215 @@
+//
+//  OrderCommentTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import IQKeyboardManagerSwift
+
+class OrderCommentTableViewCell: UITableViewCell {
+    
+    private let maxImageCount: Int = 6
+    
+    var productMdl : ProductModel? {
+        didSet {
+            // 商品图片
+            iconImageView.kf.setImage(with: kURLImage(name: productMdl?.productImg ?? ""), placeholder: kImage(name: "pic_preload"))
+            // 商品名称
+            titleLabel.text = productMdl?.productName
+            // 价格
+            cmtTextView.text = "¥\(productMdl?.skuPrice ?? 0)"
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderCommentTableViewCell {
+        let ID = "OrderCommentTableViewCell"
+        tableView.register(OrderCommentTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderCommentTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderCommentTableViewCell
+        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(cmtBackView)
+        cmtBackView.addSubview(iconImageView)
+        cmtBackView.addSubview(titleLabel)
+        cmtBackView.addSubview(starView)
+        
+        addSubview(cmtTextView)
+        addSubview(collectionView)
+    }
+    
+    private func setupLayouts() {
+        cmtBackView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(91)
+        }
+        iconImageView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(16)
+            make.left.equalToSuperview().offset(14)
+            make.size.equalTo(55)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(iconImageView.snp_right).offset(10)
+            make.centerY.equalTo(iconImageView)
+//            make.width.equalTo(56)
+            make.height.equalTo(20)
+        }
+        starView.snp.makeConstraints { (make) in
+            make.left.equalTo(titleLabel.snp_right).offset(12)
+            make.centerY.equalTo(iconImageView)
+//            make.width.equalTo(122)
+//            make.height.equalTo(20)
+        }
+        
+        cmtTextView.snp.makeConstraints { (make) in
+            make.top.equalTo(cmtBackView.snp_bottom)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.height.equalTo(100)
+        }
+        
+        collectionView.snp.makeConstraints { (make) in
+            make.top.equalTo(cmtTextView.snp_bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(200)
+            make.bottom.equalToSuperview()
+        }
+        
+    }    
+    
+    private lazy var cmtBackView: UIView = {
+        let cmtBackView = UIView()
+        return cmtBackView
+    }()
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        return iconImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "商品评分"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont14
+        titleLabel.textAlignment = .left
+        titleLabel.numberOfLines = 1
+        return titleLabel
+    }()
+    
+    private lazy var starView: SwiftyStarRatingView = {
+        let starView = SwiftyStarRatingView()
+        return starView
+    }()
+    
+    private lazy var cmtTextView: IQTextView = {
+        let cmtTextView = IQTextView()
+        cmtTextView.backgroundColor = kfafafaColor
+        cmtTextView.textColor = k333333Color
+        cmtTextView.font = kRegularFont14
+        cmtTextView.placeholder = "输入商品评价..."
+        cmtTextView.placeholderTextColor = k999999Color
+        return cmtTextView
+    }()
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kffffffColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 10
+        collectionViewLayout.minimumInteritemSpacing = 0
+        return collectionViewLayout
+    }()
+    
+    //加载数据
+    func reloadData() {
+        //collectionView重新加载数据
+        self.collectionView.reloadData()
+        //更新collectionView的高度约束
+        let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
+        collectionView.snp.remakeConstraints { (make) in
+            make.top.equalTo(cmtTextView.snp_bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(contentSize.height)
+            make.bottom.equalToSuperview()
+        }
+        self.collectionView.collectionViewLayout.invalidateLayout()
+    }
+    
+}
+
+extension OrderCommentTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        let imgCount: Int = 6
+        if imgCount < maxImageCount {
+            return imgCount+1
+        } else {
+            return maxImageCount
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let imgCount: Int = 6
+        if imgCount < maxImageCount && indexPath.row == imgCount {
+            // 添加图片
+            let cell = OrderCommentDefaultCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            return cell
+        } else {
+            // 展示图片
+            let cell = OrderCommentAddImgCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            return cell
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:(kScreenWidth-30-5*3)/4, height: (kScreenWidth-30-5*3)/4)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        let imgCount: Int = 6
+        if imgCount < maxImageCount && indexPath.row == imgCount {
+            // 添加图片
+            print("点击添加图片")
+        }
+    }
+    
+}

+ 106 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/ViewController/OrderCommentController.swift

@@ -0,0 +1,106 @@
+//
+//  OrderCommentController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  订单--评价Vc
+
+import UIKit
+import RxSwift
+
+class OrderCommentController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupData()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "评价"
+        
+        let commitButton = UIButton(type: UIButton.ButtonType.custom)
+        commitButton.setTitle("提交", for: .normal)
+        commitButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        commitButton.titleLabel?.font = kRegularFont16
+        commitButton.backgroundColor = kFFA42FColor
+        self.view.addSubview(commitButton)
+        commitButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+            print("点击了--提交评价")
+            
+        }).disposed(by: disposeBag)
+        commitButton.snp.makeConstraints { (make) in
+            make.left.right.equalToSuperview()
+            make.bottom.equalToSuperview().offset(-kSafeTabBarHeight)
+            make.height.equalTo(50)
+        }
+        
+        self.view.addSubview(tableView)
+        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle2(iconStr: "page04", titleStr: "当前暂无数据")
+        emptyView.contentViewY = kScaleValue(value: 182)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kSafeStatusBarHeight+40)
+            make.bottom.equalTo(commitButton.snp_top)
+            make.left.right.equalToSuperview()
+        }
+        
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kffffffColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+// MARK: - tableView dataSource && delegate
+extension OrderCommentController : UITableViewDelegate, UITableViewDataSource {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let commentCell = OrderCommentTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        return commentCell
+    }
+    
+    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? {
+        let headerSepView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 10))
+        headerSepView.backgroundColor = kf7f8faColor
+        return headerSepView
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}
+

+ 140 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderLogistics/View/OrderLogisticsInfoCell.swift

@@ -0,0 +1,140 @@
+//
+//  OrderLogisticsInfoCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class OrderLogisticsInfoCell: UITableViewCell {
+    
+    var productMdl : ProductModel? {
+        didSet {
+            
+        }
+    }
+    
+    var isFirstCell: Bool = false {
+        didSet {
+            if isFirstCell == true {
+                topLineView.isHidden = true
+            }
+        }
+    }
+    
+    var isLastCell: Bool = false {
+        didSet {
+            if isLastCell == true {
+                botLineView.isHidden = true
+            }
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderLogisticsInfoCell {
+        let ID = "OrderLogisticsInfoCell"
+        tableView.register(OrderLogisticsInfoCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderLogisticsInfoCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderLogisticsInfoCell
+        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(informationLabel)
+        addSubview(iconImageView)
+        addSubview(timeInfoLabel)
+        addSubview(topLineView)
+        addSubview(botLineView)
+    }
+    
+    private func setupLayouts() {
+        informationLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(13)
+            make.right.equalTo(-28)
+            make.left.equalTo(48)
+        }
+        iconImageView.snp.makeConstraints { (make) in
+            make.left.equalToSuperview().offset(18)
+            make.size.equalTo(12)
+            make.centerY.equalTo(informationLabel)
+        }
+        timeInfoLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(informationLabel.snp_left)
+            make.top.equalTo(informationLabel.snp_bottom).offset(8)
+            make.bottom.equalTo(-12)
+            make.height.equalTo(17)
+        }
+        topLineView.snp.makeConstraints { (make) in
+            make.centerX.equalTo(iconImageView)
+            make.top.equalToSuperview()
+            make.bottom.equalTo(iconImageView.snp_top)
+            make.width.equalTo(1)
+        }
+        botLineView.snp.makeConstraints { (make) in
+            make.centerX.equalTo(iconImageView)
+            make.top.equalTo(iconImageView.snp_bottom)
+            make.bottom.equalToSuperview()
+            make.width.equalTo(1)
+        }
+    }
+    
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "shopping_cart_trade_finish")
+        return iconImageView
+    }()
+    
+    private lazy var informationLabel: UILabel = {
+        let informationLabel = UILabel()
+        informationLabel.text = "时间轴展示也是一种比较常见的展现形式。一般用于展示以时间为主线的一连串事件"
+        informationLabel.textColor = k333333Color
+        informationLabel.font = kRegularFont13
+        informationLabel.textAlignment = .left
+        informationLabel.numberOfLines = 0
+        return informationLabel
+    }()
+    
+    private lazy var timeInfoLabel: UILabel = {
+        let timeInfoLabel = UILabel()
+        timeInfoLabel.text = "2019-02-29  17:20:08"
+        timeInfoLabel.textColor = k666666Color
+        timeInfoLabel.font = kRegularFont12
+        timeInfoLabel.textAlignment = .left
+        return timeInfoLabel
+    }()
+    
+    private lazy var topLineView: UIView = {
+        let topLineView = UIView()
+        topLineView.backgroundColor = ke6e6e6Color
+        return topLineView
+    }()
+    
+    private lazy var botLineView: UIView = {
+        let botLineView = UILabel()
+        botLineView.backgroundColor = ke6e6e6Color
+        return botLineView
+    }()
+    
+}
+

+ 125 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderLogistics/ViewController/OrderLogisticsController.swift

@@ -0,0 +1,125 @@
+//
+//  OrderLogisticsController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  订单--查看物流Vc
+
+import UIKit
+import RxSwift
+
+class OrderLogisticsController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupData()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "查看物流"
+        
+        self.view.backgroundColor = kf7f8faColor
+        
+        let serialNumView = UIView()
+        serialNumView.backgroundColor = kffffffColor
+        self.view.addSubview(serialNumView)
+        serialNumView.snp.makeConstraints { (make) in
+            make.left.right.equalToSuperview()
+            make.top.equalToSuperview().offset(kSafeStatusBarHeight+40+10)
+            make.height.equalTo(44)
+        }
+        
+        let titleLbl = UILabel()
+        titleLbl.text = "订单编号"
+        titleLbl.textColor = k999999Color
+        titleLbl.font = kRegularFont13
+        serialNumView.addSubview(titleLbl)
+        titleLbl.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.centerY.equalToSuperview()
+            make.height.equalTo(20)
+        }
+        
+        let numLbl = UILabel()
+        numLbl.text = "821xxxxxxxxxxx2001"
+        numLbl.textColor = k333333Color
+        numLbl.font = kRegularFont13
+        serialNumView.addSubview(numLbl)
+        numLbl.snp.makeConstraints { (make) in
+            make.centerY.equalTo(titleLbl.snp_centerY)
+            make.left.equalTo(titleLbl.snp_right).offset(20)
+            make.height.equalTo(titleLbl)
+        }
+        
+        self.view.addSubview(tableView)
+        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle2(iconStr: "page04", titleStr: "当前暂无数据")
+        emptyView.contentViewY = kScaleValue(value: 182)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(serialNumView.snp_bottom).offset(10)
+            make.left.right.bottom.equalToSuperview()
+        }
+        
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kffffffColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+// MARK: - tableView dataSource && delegate
+extension OrderLogisticsController : UITableViewDelegate, UITableViewDataSource {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 5
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let infoCell = OrderLogisticsInfoCell.cellWith(tableView: tableView, indexPath: indexPath)
+        if indexPath.row == 0 {
+            infoCell.isFirstCell = true
+        }
+        if indexPath.row == 4 {
+            infoCell.isLastCell = true
+        }
+        return infoCell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return  UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    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
+    }
+    
+}

+ 33 - 5
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/View/ShoppingCartFinishPayView.swift

@@ -10,6 +10,12 @@ import UIKit
 
 class ShoppingCartFinishPayView: BaseView {
     
+    typealias RepayTransBlock = () -> Void
+    var repayTransBlock : RepayTransBlock?
+    
+    typealias JumpTransBlock = (_ jType: PayJumpDes) -> Void
+    var jumpTransBlock : JumpTransBlock?
+    
     // 热销ModelArr
     var hotSaleModelArr : Array<ProductSearchModel>? {
         didSet {
@@ -17,6 +23,12 @@ class ShoppingCartFinishPayView: BaseView {
         }
     }
     
+    var payStatus: Bool? {
+        didSet {
+            self.tableView.reloadSections([0], with: UITableView.RowAnimation.none)
+        }
+    }
+    
     override func setupViews() {
         self.backgroundColor = kf7f8faColor
         addSubview(tableView)
@@ -58,11 +70,27 @@ extension ShoppingCartFinishPayView : UITableViewDelegate, UITableViewDataSource
     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
+            if (payStatus == true) {
+                // 支付成功
+                let sCell = ShoppingCartPaySuccessCell.cellWith(tableView: tableView, indexPath: indexPath)
+                sCell.jumpBlock = {
+                    [weak self] (jType) in
+                    if let jumpTransBlock = self?.jumpTransBlock {
+                        jumpTransBlock(jType)
+                    }
+                }
+                return sCell
+            } else {
+                // 支付失败
+                let fCell = ShoppingCartPayFailureCell.cellWith(tableView: tableView, indexPath: indexPath)
+                fCell.repayBlock = {
+                    [weak self] in
+                    if let repayTransBlock = self?.repayTransBlock {
+                        repayTransBlock()
+                    }
+                }
+                return fCell
+            }            
         case 1:
             // 超值热卖
             let hotSaleCell = ShoppingCartHotSaleTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)

+ 10 - 6
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/View/ShoppingCartPayFailureCell.swift

@@ -12,6 +12,11 @@ import RxCocoa
 
 class ShoppingCartPayFailureCell: UITableViewCell {
     
+    let disposeBag = DisposeBag()
+    
+    typealias RepayBlock = () -> Void
+    var repayBlock : RepayBlock?
+    
     override var frame: CGRect {
         get {
             return super.frame
@@ -119,12 +124,11 @@ class ShoppingCartPayFailureCell: UITableViewCell {
         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)
+        jumpButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+            if let repayBlock = self?.repayBlock {
+                repayBlock()
+            }
+        }).disposed(by: disposeBag)
         return jumpButton
     }()
     

+ 20 - 13
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/View/ShoppingCartPaySuccessCell.swift

@@ -10,8 +10,18 @@ import UIKit
 import RxSwift
 import RxCocoa
 
+enum PayJumpDes {
+    case homePage
+    case checkOrder
+}
+
 class ShoppingCartPaySuccessCell: UITableViewCell {
     
+    let disposeBag = DisposeBag()
+    
+    typealias JumpBlock = (_ jType: PayJumpDes) -> Void
+    var jumpBlock : JumpBlock?
+    
     override var frame: CGRect {
         get {
             return super.frame
@@ -129,12 +139,11 @@ class ShoppingCartPaySuccessCell: UITableViewCell {
         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)
+        jumpButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+            if let jumpBlock = self?.jumpBlock {
+                jumpBlock(PayJumpDes.homePage)
+            }
+        }).disposed(by: disposeBag)
         return jumpButton
     }()
     
@@ -145,13 +154,11 @@ class ShoppingCartPaySuccessCell: UITableViewCell {
         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)
+        orderButton.rx.tap.subscribe(onNext: { [weak self] (data) in
+            if let jumpBlock = self?.jumpBlock {
+                jumpBlock(PayJumpDes.checkOrder)
+            }
+        }).disposed(by: disposeBag)
         return orderButton
     }()
     

+ 18 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartFinishPay/ViewController/ShoppingCartFinishPayController.swift

@@ -11,6 +11,8 @@ import RxSwift
 
 class ShoppingCartFinishPayController: BaseViewController {
     
+    var payStatus: Bool? = true
+    
     var productSearchModelArray = Array<ProductSearchModel>()
     
     override func viewDidLoad() {
@@ -51,6 +53,22 @@ class ShoppingCartFinishPayController: BaseViewController {
     
     private lazy var finishPayView: ShoppingCartFinishPayView = {
         let finishPayView = ShoppingCartFinishPayView()
+        finishPayView.payStatus = payStatus
+        finishPayView.repayTransBlock = {
+            [weak self] in
+            print("点击了----重新支付")
+        }
+        finishPayView.jumpTransBlock = {
+            [weak self] (jType) in
+            switch jType {
+            case PayJumpDes.homePage:
+                self?.tabBarController?.selectedIndex = 0
+                self?.navigationController?.popToRootViewController(animated: false)
+            case PayJumpDes.checkOrder:
+                print("点击了----\(jType) --查看订单")
+            }
+        }
+        
         return finishPayView
     }()
     

+ 34 - 7
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCartPayOrder/ViewController/ShoppingCartPayOrderController.swift

@@ -74,7 +74,7 @@ class ShoppingCartPayOrderController: BaseViewController {
         orderPayView.totalProductPrice = self.totalProductPrice!
         orderPayView.commitOrderTransBlock = {
             [weak self] (paraMdl) in
-            self?.orderCreateApi(paraMdl: paraMdl)            
+            self?.orderCreateApi(paraMdl: paraMdl)
         }
         orderPayView.jumpNavBlock = {
             [weak self] (jumpType) in
@@ -116,12 +116,39 @@ class ShoppingCartPayOrderController: BaseViewController {
     
     // 创建订单
     func orderCreateApi(paraMdl: OrderCreateParameterModel) {
-        SwiftMoyaNetWorkServiceOrder.shared().orderCreateApi(paraMdl: paraMdl) { (data) -> (Void) in
-            
-            // 支付弹窗调用
-            AlertSheetView.payAlertSheetView {
-                
-            }
+        SwiftMoyaNetWorkServiceOrder.shared().orderCreateApi(paraMdl: paraMdl) { (orderBackModel) -> (Void) in
+            // 弹出支付方式View
+            AlertSheetView.payAlertSheetView(cancelClosure: {
+                [weak self] in
+                let vc = ShoppingCartFinishPayController()
+                vc.payStatus = false
+                self?.navigationController?.pushViewController(vc, animated: true)
+            }, sureClosure: { [weak self] (payType) in
+                switch payType {
+                case .wechatPay:
+                    self?.payWeixinpayApi(orderPayModel: orderBackModel as! OrderCreateBackModel)
+                case .aliPay:
+                    self?.payAlipayApi(orderPayModel: orderBackModel as! OrderCreateBackModel)
+                }
+            })
+        }
+    }
+    
+    // 微信支付
+    func payWeixinpayApi(orderPayModel: OrderCreateBackModel) {
+        SwiftMoyaNetWorkServicePay.shared().payWeixinpayApi(paraMdl: orderPayModel) { [weak self] (data) -> (Void) in            
+            let vc = ShoppingCartFinishPayController()
+            vc.payStatus = true
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
+    }
+    
+    // 支付宝支付
+    func payAlipayApi(orderPayModel: OrderCreateBackModel) {
+        SwiftMoyaNetWorkServicePay.shared().payAlipayApi(paraMdl: orderPayModel) { [weak self] (data) -> (Void) in
+            let vc = ShoppingCartFinishPayController()
+            vc.payStatus = true
+            self?.navigationController?.pushViewController(vc, animated: true)
         }
     }
     

+ 12 - 4
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServicePay/SwiftMoyaNetWorkServicePay.swift

@@ -27,9 +27,13 @@ public class SwiftMoyaNetWorkServicePay: NSObject {
     ///
     /// - Parameters:
     ///   - completion: 回调
-    func payAlipayApi(completion: @escaping apiCallBack) {
+    func payAlipayApi(paraMdl:OrderCreateBackModel, completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(paraMdl.patchNum ?? 0, forKey: "patch_num")
+        parameters.updateValue(paraMdl.money ?? 0, forKey: "money")
+        
         SwiftProgressHUD.shared().showWait()
-        SwiftMoyaNetWorkManager.shared().request(target: MultiTarget(SwiftMoyaServicePayApi.alipay)) { (rootModel) in
+        SwiftMoyaNetWorkManager.shared().request(target: MultiTarget(SwiftMoyaServicePayApi.alipay(parameters: parameters))) { (rootModel) in
             let rootModel = rootModel as! RootModel
             if rootModel.code == 0 {
                 completion(rootModel.data as Any)
@@ -46,9 +50,13 @@ public class SwiftMoyaNetWorkServicePay: NSObject {
     ///
     /// - Parameters:
     ///   - completion: 回调
-    func payWeixinpayApi(completion: @escaping apiCallBack) {
+    func payWeixinpayApi(paraMdl:OrderCreateBackModel, completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(paraMdl.patchNum ?? 0, forKey: "patch_num")
+        parameters.updateValue(paraMdl.money ?? 0, forKey: "money")
+        
         SwiftProgressHUD.shared().showWait()
-        SwiftMoyaNetWorkManager.shared().request(WeChatpayOrderModel.self,target: MultiTarget(SwiftMoyaServicePayApi.weixinpay)) { (weChatpayOrderModel) in
+        SwiftMoyaNetWorkManager.shared().request(WeChatpayOrderModel.self, target: MultiTarget(SwiftMoyaServicePayApi.weixinpay(parameters: parameters))) { (weChatpayOrderModel) in
             let weChatpayOrderModel = weChatpayOrderModel as! WeChatpayOrderModel
             completion(weChatpayOrderModel)
             SwiftProgressHUD.shared().hide()

+ 8 - 7
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServicePay/SwiftMoyaServicePayApi.swift

@@ -6,7 +6,6 @@
 //  Copyright © 2019 南鑫林. All rights reserved.
 //
 
-import Foundation
 import Foundation
 import Moya
 
@@ -21,8 +20,8 @@ public let kWeixinpayApi = "/pay/wxpay"
 ///
 /// - alipay: 支付宝支付
 public enum SwiftMoyaServicePayApi {
-    case alipay
-    case weixinpay
+    case alipay(parameters:Dictionary<String, Any>)
+    case weixinpay(parameters:Dictionary<String, Any>)
 }
 
 extension SwiftMoyaServicePayApi: TargetType {
@@ -57,10 +56,12 @@ extension SwiftMoyaServicePayApi: TargetType {
     // MARK: - 请求任务事件(这里附带上参数)
     public var task: Task {
         switch self {
-        case .alipay,
-             .weixinpay
+        case .alipay(var parameters),
+             .weixinpay(var parameters)
             :
-            return .requestPlain
+            let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
+            parameters.updateValue(sign, forKey: "sign")
+            return .requestParameters(parameters: parameters, encoding: URLEncoding.default)
         }
     }
 
@@ -82,7 +83,7 @@ extension SwiftMoyaServicePayApi: TargetType {
         case .alipay,
              .weixinpay
             :
-            return (headerParameters(headerType: .defaultHeader) as! [String : String])
+            return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }
     }
 }

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_image_empty.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_image_empty.imageset/order_image_empty@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_image_empty.imageset/order_image_empty@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_photo.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_photo.imageset/order_photo@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/OrderModule.xcassets/order_photo.imageset/order_photo@3x.png


+ 10 - 8
RainbowPlanet/RainbowPlanet/Tools/AlertSheetView/AlertSheetView.swift

@@ -91,24 +91,26 @@ class AlertSheetView: NSObject {
     }
     
     /// 自定义支付View
-    class func payAlertSheetView(sureClosure:@escaping () -> Void) {
+    class func payAlertSheetView(cancelClosure:@escaping () -> Void, sureClosure:@escaping (_ pType: PayType) -> Void) {
         let payView = CommonPayView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: kSafeTabBarHeight + 300))
         
         let vProperty = FWPopupViewProperty()
         vProperty.popupCustomAlignment = .bottomCenter
         vProperty.popupAnimationType = .frame
         vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5)
-        vProperty.touchWildToHide = "1"
+        vProperty.touchWildToHide = "0"
         vProperty.popupViewEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
         vProperty.animationDuration = 0.5
         payView.vProperty = vProperty
         payView.show()
-//        payView.sureClosure = {
-//            () in
-//            payView.hide(popupDidDisappearBlock: { (popupView) in
-//                sureClosure(province, city,area)
-//            })
-//        }
+        payView.disTransBlock = {
+            cancelClosure()
+            payView.hide()
+        }
+        payView.confirmPayBlock = { payType in
+            sureClosure(payType)
+            payView.hide()
+        }
     }
     
     /// 分享