Browse Source

Merge branch 'feature/nanxinlin' into develop

南鑫林 5 years ago
parent
commit
bda3e98dd0
18 changed files with 442 additions and 37 deletions
  1. 32 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 0 1
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/Order/ViewController/OrderViewController.swift
  3. 0 1
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderDetail/ViewController/OrderDetailViewController.swift
  4. 25 13
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderRefunddetails/ViewController/OrderRefunddetailsViewController.swift
  5. 132 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/View/BrowsePicturesPagerViewCell.swift
  6. 171 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/ViewController/BrowsePicturesViewController.swift
  7. 9 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/View/ProductAllCommentView.swift
  8. 7 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/View/ProductDetailEvaluationListTableViewCell.swift
  9. 5 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/ViewController/ProductAllCommentViewController.swift
  10. 14 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailEvaluation/ProductDetailEvaluationTableViewCell.swift
  11. 9 9
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductDetailHotSell/ProductDetailHotSellCollectionViewCell.swift
  12. 11 11
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallSlidingLeftRight/ProductSlidingLeftRightCollectionViewCell.swift
  13. 2 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/Shop/View/ShopViewShopInfoTableViewCell.swift
  14. 2 0
      RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderRefundDetailModel.swift
  15. 23 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/Contents.json
  16. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/nav_back_black_mask.png
  17. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/nav_back_black_mask@2x.png
  18. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/nav_back_black_mask@3x.png

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

@@ -299,6 +299,8 @@
 		A7DC467F22783A47001F3EFC /* EditExpressAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */; };
 		A7DC467F22783A47001F3EFC /* EditExpressAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */; };
 		A7DF50D622A4E8B400998908 /* OrderDetailProductTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D522A4E8B400998908 /* OrderDetailProductTableViewCell.swift */; };
 		A7DF50D622A4E8B400998908 /* OrderDetailProductTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D522A4E8B400998908 /* OrderDetailProductTableViewCell.swift */; };
 		A7DF50D822A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */; };
 		A7DF50D822A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */; };
+		A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */; };
+		A7DF50E322A55AB600998908 /* BrowsePicturesPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */; };
 		A7FF1555228AC27600A85748 /* ProductAllCommentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */; };
 		A7FF1555228AC27600A85748 /* ProductAllCommentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */; };
 		A7FF1557228AC3E800A85748 /* ProductAllCommentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */; };
 		A7FF1557228AC3E800A85748 /* ProductAllCommentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */; };
 		A7FF1560228C693D00A85748 /* OrderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF155F228C693D00A85748 /* OrderViewController.swift */; };
 		A7FF1560228C693D00A85748 /* OrderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7FF155F228C693D00A85748 /* OrderViewController.swift */; };
@@ -704,6 +706,8 @@
 		A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditExpressAddressTableViewCell.swift; sourceTree = "<group>"; };
 		A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditExpressAddressTableViewCell.swift; sourceTree = "<group>"; };
 		A7DF50D522A4E8B400998908 /* OrderDetailProductTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderDetailProductTableViewCell.swift; sourceTree = "<group>"; };
 		A7DF50D522A4E8B400998908 /* OrderDetailProductTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderDetailProductTableViewCell.swift; sourceTree = "<group>"; };
 		A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailEvaluationImageCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailEvaluationImageCollectionViewCell.swift; sourceTree = "<group>"; };
+		A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesViewController.swift; sourceTree = "<group>"; };
+		A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesPagerViewCell.swift; sourceTree = "<group>"; };
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentView.swift; sourceTree = "<group>"; };
 		A7FF1554228AC27600A85748 /* ProductAllCommentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentView.swift; sourceTree = "<group>"; };
 		A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentViewController.swift; sourceTree = "<group>"; };
 		A7FF1556228AC3E800A85748 /* ProductAllCommentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductAllCommentViewController.swift; sourceTree = "<group>"; };
@@ -2084,6 +2088,7 @@
 		A77F2CA32232010F001BD3F6 /* ShoppingMallModule */ = {
 		A77F2CA32232010F001BD3F6 /* ShoppingMallModule */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				A7DF50D922A556C300998908 /* BrowsePictures */,
 				A77F2CA42232010F001BD3F6 /* ShoppingMall */,
 				A77F2CA42232010F001BD3F6 /* ShoppingMall */,
 				A7FF1550228AC22700A85748 /* ProductAllComment */,
 				A7FF1550228AC22700A85748 /* ProductAllComment */,
 				A70B2C122286B14C00B2449F /* ProductView */,
 				A70B2C122286B14C00B2449F /* ProductView */,
@@ -2732,6 +2737,31 @@
 			path = FMDB;
 			path = FMDB;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
+		A7DF50D922A556C300998908 /* BrowsePictures */ = {
+			isa = PBXGroup;
+			children = (
+				A7DF50DD22A558D400998908 /* ViewController */,
+				A7DF50DC22A558C500998908 /* View */,
+			);
+			path = BrowsePictures;
+			sourceTree = "<group>";
+		};
+		A7DF50DC22A558C500998908 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		A7DF50DD22A558D400998908 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
 		A7FF1550228AC22700A85748 /* ProductAllComment */ = {
 		A7FF1550228AC22700A85748 /* ProductAllComment */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
@@ -3467,6 +3497,7 @@
 				A7A98E3622802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift in Sources */,
 				A7A98E3622802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift in Sources */,
 				A7824AFD2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift in Sources */,
 				A7824AFD2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift in Sources */,
 				BD7AB83F228438290030646A /* OrderPayExpressAddInfoCell.swift in Sources */,
 				BD7AB83F228438290030646A /* OrderPayExpressAddInfoCell.swift in Sources */,
+				A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */,
 				A7CC74DA22702E41003C4F38 /* MineOrderTableViewCell.swift in Sources */,
 				A7CC74DA22702E41003C4F38 /* MineOrderTableViewCell.swift in Sources */,
 				A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */,
 				A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */,
 				A72A72B822321DE000B21995 /* Extension+UserDefaults.swift in Sources */,
 				A72A72B822321DE000B21995 /* Extension+UserDefaults.swift in Sources */,
@@ -3587,6 +3618,7 @@
 				A72A72BD22321DE000B21995 /* Extension+UIColor.swift in Sources */,
 				A72A72BD22321DE000B21995 /* Extension+UIColor.swift in Sources */,
 				A7FF1596228CFA8100A85748 /* OrderListViewController.swift in Sources */,
 				A7FF1596228CFA8100A85748 /* OrderListViewController.swift in Sources */,
 				A7A98E05227EB891005306E9 /* CategoryViewController.swift in Sources */,
 				A7A98E05227EB891005306E9 /* CategoryViewController.swift in Sources */,
+				A7DF50E322A55AB600998908 /* BrowsePicturesPagerViewCell.swift in Sources */,
 				A77F2CC822320627001BD3F6 /* WRCustomNavigationBar.swift in Sources */,
 				A77F2CC822320627001BD3F6 /* WRCustomNavigationBar.swift in Sources */,
 				A7FF1564228C696B00A85748 /* OrderListView.swift in Sources */,
 				A7FF1564228C696B00A85748 /* OrderListView.swift in Sources */,
 				A7CC74EF22706CCA003C4F38 /* MessageView.swift in Sources */,
 				A7CC74EF22706CCA003C4F38 /* MessageView.swift in Sources */,

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/OrderModule/Order/ViewController/OrderViewController.swift

@@ -209,7 +209,6 @@ extension OrderViewController :JXSegmentedListContainerViewDataSource {
             let vc = OrderRefunddetailsViewController()
             let vc = OrderRefunddetailsViewController()
             vc.refundNo = orderModel.refundNo
             vc.refundNo = orderModel.refundNo
             vc.orderRefunddetailsVCType = .order
             vc.orderRefunddetailsVCType = .order
-            vc.orderStatus = orderModel.status
             self.navigationController?.pushViewController(vc, animated: true)
             self.navigationController?.pushViewController(vc, animated: true)
         }
         }
         if button.titleLabel?.text == "去评价" {            
         if button.titleLabel?.text == "去评价" {            

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderDetail/ViewController/OrderDetailViewController.swift

@@ -149,7 +149,6 @@ class OrderDetailViewController: BaseViewController {
             let vc = OrderRefunddetailsViewController()
             let vc = OrderRefunddetailsViewController()
             vc.refundNo = self.orderDetailModel?.refundNo
             vc.refundNo = self.orderDetailModel?.refundNo
             vc.orderRefunddetailsVCType = .orderDetail
             vc.orderRefunddetailsVCType = .orderDetail
-            vc.orderStatus = self.orderDetailModel?.status
             self.navigationController?.pushViewController(vc, animated: true)
             self.navigationController?.pushViewController(vc, animated: true)
         }
         }
         if button.titleLabel?.text == "去评价" {
         if button.titleLabel?.text == "去评价" {

+ 25 - 13
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderRefunddetails/ViewController/OrderRefunddetailsViewController.swift

@@ -20,7 +20,6 @@ class OrderRefunddetailsViewController: BaseViewController {
     var contents = ["","","","",""]
     var contents = ["","","","",""]
     
     
     var refundNo : String?
     var refundNo : String?
-    var orderStatus : Int?
     var orderRefundDetailModel : OrderRefundDetailModel?
     var orderRefundDetailModel : OrderRefundDetailModel?
     var orderRefunddetailsVCType : OrderRefunddetailsVCType?
     var orderRefunddetailsVCType : OrderRefunddetailsVCType?
     
     
@@ -73,18 +72,7 @@ class OrderRefunddetailsViewController: BaseViewController {
     }()
     }()
     
     
     override func setupData() {
     override func setupData() {
-        if self.orderStatus == 1 {
-            self.contents[2] = "待发货"
-        }
-        if self.orderStatus == 2 {
-            self.contents[2] = "待收货"
-        }
-        if self.orderStatus == 3 {
-            self.contents[2] = "配送中"
-        }
-        if self.orderStatus == 4 {
-            self.contents[2] = "待自提"
-        }
+        
        
        
         tableView.addHeaderWithHeader(withBeginRefresh: true, animation: false) {
         tableView.addHeaderWithHeader(withBeginRefresh: true, animation: false) {
             [weak self] (page) in
             [weak self] (page) in
@@ -99,6 +87,30 @@ class OrderRefunddetailsViewController: BaseViewController {
             
             
             self?.contents[0] = self?.orderRefundDetailModel?.refundNo ?? ""
             self?.contents[0] = self?.orderRefundDetailModel?.refundNo ?? ""
             self?.contents[1] = self?.orderRefundDetailModel?.createdAt ?? ""
             self?.contents[1] = self?.orderRefundDetailModel?.createdAt ?? ""
+            if self?.orderRefundDetailModel?.status == 0 {
+                self?.contents[2] = "待付款"
+            }
+            if self?.orderRefundDetailModel?.status == 1 {
+                self?.contents[2] = "待发货"
+            }
+            if self?.orderRefundDetailModel?.status == 2 {
+                self?.contents[2] = "待收货"
+            }
+            if self?.orderRefundDetailModel?.status == 3 {
+                self?.contents[2] = "配送中"
+            }
+            if self?.orderRefundDetailModel?.status == 4 {
+                self?.contents[2] = "待自提"
+            }
+            if self?.orderRefundDetailModel?.status == 5 {
+                self?.contents[2] = "已自提"
+            }
+            if self?.orderRefundDetailModel?.status == 6 {
+                self?.contents[2] = "已完成"
+            }
+            if self?.orderRefundDetailModel?.status == 7 {
+                self?.contents[2] = "已关闭"
+            }
             self?.contents[3] = self?.orderRefundDetailModel?.refundReason ?? ""
             self?.contents[3] = self?.orderRefundDetailModel?.refundReason ?? ""
             self?.contents[4] = "\(priceConversionNone(price: self?.orderRefundDetailModel?.showRefundPrice ?? 0))元"
             self?.contents[4] = "\(priceConversionNone(price: self?.orderRefundDetailModel?.showRefundPrice ?? 0))元"
             self?.tableView.reloadData()
             self?.tableView.reloadData()

+ 132 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/View/BrowsePicturesPagerViewCell.swift

@@ -0,0 +1,132 @@
+//
+//  BrowsePicturesPagerViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/3.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class BrowsePicturesPagerViewCell: UICollectionViewCell {
+    
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> BrowsePicturesPagerViewCell {
+        let ID = "BrowsePicturesPagerViewCell"
+        collectionView.register(BrowsePicturesPagerViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : BrowsePicturesPagerViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! BrowsePicturesPagerViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    
+    //滚动视图
+    var scrollView:UIScrollView!
+    
+    //用于显示图片的imageView
+    var iconImageView:UIImageView!
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setupViews()
+    }
+    
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func setupViews() {
+        //scrollView初始化
+        scrollView = UIScrollView(frame: self.contentView.bounds)
+        self.contentView.addSubview(scrollView)
+        scrollView.delegate = self
+        //scrollView缩放范围 1~3
+        scrollView.maximumZoomScale = 3.0
+        scrollView.minimumZoomScale = 1.0
+        
+        //imageView初始化
+        iconImageView = UIImageView()
+        iconImageView.frame = scrollView.bounds
+        iconImageView.isUserInteractionEnabled = true
+        iconImageView.contentMode = .scaleAspectFit
+        scrollView.addSubview(iconImageView)
+        //双击监听
+        let tapDouble=UITapGestureRecognizer(target:self,
+                                             action:#selector(tapDoubleDid(_:)))
+        tapDouble.numberOfTapsRequired = 2
+        tapDouble.numberOfTouchesRequired = 1
+        //声明点击事件需要双击事件检测失败后才会执行
+        self.iconImageView.addGestureRecognizer(tapDouble)
+    }
+    
+    //重置单元格内元素尺寸
+    func resetSize(){
+        //scrollView重置,不缩放
+        scrollView.frame = self.contentView.bounds
+        scrollView.zoomScale = 1.0
+        //imageView重置
+        if let image = self.iconImageView.image {
+            //设置imageView的尺寸确保一屏能显示的下
+            iconImageView.frame.size = scaleSize(size: image.size)
+            //imageView居中
+            iconImageView.center = scrollView.center
+        }
+    }
+    
+    //视图布局改变时(横竖屏切换时cell尺寸也会变化)
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        //重置单元格内元素尺寸
+        resetSize()
+    }
+    
+    //获取imageView的缩放尺寸(确保首次显示是可以完整显示整张图片)
+    func scaleSize(size:CGSize) -> CGSize {
+        let width = size.width
+        let height = size.height
+        let widthRatio = width/UIScreen.main.bounds.width
+        let heightRatio = height/UIScreen.main.bounds.height
+        let ratio = max(heightRatio, widthRatio)
+        return CGSize(width: width/ratio, height: height/ratio)
+    }
+    
+    //图片双击事件响应
+    @objc func tapDoubleDid(_ ges:UITapGestureRecognizer){
+        //缩放视图(带有动画效果)
+        UIView.animate(withDuration: 0.5, animations: {
+            //如果当前不缩放,则放大到3倍。否则就还原
+            if self.scrollView.zoomScale == 1.0 {
+                self.scrollView.zoomScale = 3.0
+            }else{
+                self.scrollView.zoomScale = 1.0
+            }
+        })
+    }
+
+}
+
+//ImagePreviewCell的UIScrollViewDelegate代理实现
+extension BrowsePicturesPagerViewCell:UIScrollViewDelegate{
+    
+    //缩放视图
+    func viewForZooming(in scrollView: UIScrollView) -> UIView? {
+        return self.iconImageView
+    }
+    
+    //缩放响应,设置imageView的中心位置
+    func scrollViewDidZoom(_ scrollView: UIScrollView) {
+        var centerX = scrollView.center.x
+        var centerY = scrollView.center.y
+        centerX = scrollView.contentSize.width > scrollView.frame.size.width ?
+            scrollView.contentSize.width/2:centerX
+        centerY = scrollView.contentSize.height > scrollView.frame.size.height ?
+            scrollView.contentSize.height/2:centerY
+        print(centerX,centerY)
+        iconImageView.center = CGPoint(x: centerX, y: centerY)
+    }
+}

+ 171 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/ViewController/BrowsePicturesViewController.swift

@@ -0,0 +1,171 @@
+//
+//  BrowsePicturesViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/3.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class BrowsePicturesViewController: BaseViewController {
+    
+    //存储图片数组
+    var images:[String]
+    
+    //默认显示的图片索引
+    var index:Int
+    
+    //用来放置各个图片单元
+    var collectionView:UICollectionView!
+    
+    //collectionView的布局
+    var collectionViewLayout: UICollectionViewFlowLayout!
+    
+    //页控制器(小圆点)
+    var pageControl : UIPageControl!
+    
+    //初始化
+    init(images:[String], index:Int = 0){
+        self.images = images
+        self.index = index
+        
+        super.init(nibName: nil, bundle: nil)
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    private lazy var backButton: UIButton = {
+        let backButton = UIButton(type: UIButton.ButtonType.custom)
+        backButton.setImage(kImage(name: "nav_back_black_mask"), for: UIControl.State.normal)
+        backButton.rx.tap.subscribe(onNext: {
+            [weak self] (data) in
+            self?.navigationController?.popViewController(animated: true)
+        }).disposed(by: disposeBag)
+        return backButton
+    }()
+    
+    //初始化
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        navigationBar.isHidden = true
+        
+        //背景设为黑色
+        self.view.backgroundColor = UIColor.black
+        //collectionView尺寸样式设置
+        collectionViewLayout = UICollectionViewFlowLayout()
+        collectionViewLayout.minimumLineSpacing = 0
+        collectionViewLayout.minimumInteritemSpacing = 0
+        //横向滚动
+        collectionViewLayout.scrollDirection = .horizontal
+        
+        //collectionView初始化
+        collectionView = UICollectionView(frame: self.view.bounds,
+                                          collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = UIColor.black
+        collectionView.delegate = self
+        collectionView.dataSource = self
+        collectionView.isPagingEnabled = true
+        //不自动调整内边距,确保全屏
+        if #available(iOS 11.0, *) {
+            collectionView.contentInsetAdjustmentBehavior = .never
+        } else {
+            self.automaticallyAdjustsScrollViewInsets = false
+        }
+        self.view.addSubview(collectionView)
+        
+        //将视图滚动到默认图片上
+        let indexPath = IndexPath(item: index, section: 0)
+        collectionView.scrollToItem(at: indexPath, at: .left, animated: false)
+        
+        //设置页控制器
+        pageControl = UIPageControl()
+        pageControl.center = CGPoint(x: UIScreen.main.bounds.width/2,
+                                     y: UIScreen.main.bounds.height - 20 -  kSafeTabBarHeight)
+        pageControl.numberOfPages = images.count
+        pageControl.isUserInteractionEnabled = false
+        pageControl.currentPage = index
+        view.addSubview(self.pageControl)
+        view.addSubview(backButton)
+        backButton.snp.makeConstraints { (make) in
+            make.top.equalToSuperview().offset(kSafeStatusBarHeight+11)
+            make.size.equalTo(22)
+            make.left.equalTo(14)
+        }
+    }
+    
+    //隐藏状态栏
+    override var prefersStatusBarHidden: Bool {
+        return true
+    }
+    
+    //将要对子视图布局时调用(横竖屏切换时)
+    override func viewWillLayoutSubviews() {
+        super.viewWillLayoutSubviews()
+        
+        //重新设置collectionView的尺寸
+        collectionView.frame.size = self.view.bounds.size
+        collectionView.collectionViewLayout.invalidateLayout()
+        
+        //将视图滚动到当前图片上
+        let indexPath = IndexPath(item: self.pageControl.currentPage, section: 0)
+        collectionView.scrollToItem(at: indexPath, at: .left, animated: false)
+        
+        //重新设置页控制器的位置
+        pageControl.center = CGPoint(x: UIScreen.main.bounds.width/2,
+                                     y: UIScreen.main.bounds.height - 20)
+    }
+    
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+    }
+}
+
+//ImagePreviewVC的CollectionView相关协议方法实现
+extension BrowsePicturesViewController:UICollectionViewDelegate, UICollectionViewDataSource,
+UICollectionViewDelegateFlowLayout{
+    
+    //collectionView单元格创建
+    func collectionView(_ collectionView: UICollectionView,
+                        cellForItemAt indexPath: IndexPath)
+        -> UICollectionViewCell {
+            let cell = BrowsePicturesPagerViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            cell.iconImageView.kf.setImage(with: kURLImage(name: images[indexPath.row]), placeholder: kImage(name: ""))
+            return cell
+    }
+    
+    //collectionView单元格数量
+    func collectionView(_ collectionView: UICollectionView,
+                        numberOfItemsInSection section: Int) -> Int {
+        return self.images.count
+    }
+    
+    //collectionView单元格尺寸
+    func collectionView(_ collectionView: UICollectionView,
+                        layout collectionViewLayout: UICollectionViewLayout,
+                        sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return self.view.bounds.size
+    }
+    
+    //collectionView里某个cell将要显示
+    func collectionView(_ collectionView: UICollectionView,
+                        willDisplay cell: UICollectionViewCell,
+                        forItemAt indexPath: IndexPath) {
+        if let cell = cell as? BrowsePicturesPagerViewCell{
+            //由于单元格是复用的,所以要重置内部元素尺寸
+            cell.resetSize()
+        }
+    }
+    
+    //collectionView里某个cell显示完毕
+    func collectionView(_ collectionView: UICollectionView,
+                        didEndDisplaying cell: UICollectionViewCell,
+                        forItemAt indexPath: IndexPath) {
+        //当前显示的单元格
+        let visibleCell = collectionView.visibleCells[0]
+        //设置页控制器当前页
+        self.pageControl.currentPage = collectionView.indexPath(for: visibleCell)!.item
+    }
+}

+ 9 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/View/ProductAllCommentView.swift

@@ -10,6 +10,9 @@ import UIKit
 
 
 class ProductAllCommentView: BaseView {
 class ProductAllCommentView: BaseView {
     
     
+    typealias DidSelectItemAtClosure = (_ images:  Array<String>,_ indexPath: IndexPath) -> Void
+    var didSelectItemAtClosure : DidSelectItemAtClosure?
+    
     var productAllCommentArray : Array<ProductCommentModel>? {
     var productAllCommentArray : Array<ProductCommentModel>? {
         didSet {
         didSet {
             if productAllCommentArray?.isEmpty ?? true {
             if productAllCommentArray?.isEmpty ?? true {
@@ -134,6 +137,12 @@ extension ProductAllCommentView : UITableViewDelegate, UITableViewDataSource {
         cell.frame = tableView.bounds
         cell.frame = tableView.bounds
         cell.layoutIfNeeded()
         cell.layoutIfNeeded()
         cell.reloadData()
         cell.reloadData()
+        cell.didSelectItemAtClosure = {
+            [weak self] (images,indexPath) in
+            if let didSelectItemAtClosure = self?.didSelectItemAtClosure {
+                didSelectItemAtClosure(images,indexPath)
+            }
+        }
         return cell
         return cell
     }
     }
     
     

+ 7 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/View/ProductDetailEvaluationListTableViewCell.swift

@@ -12,6 +12,10 @@ class ProductDetailEvaluationListTableViewCell: UITableViewCell {
     
     
     var commentImages: Array<String> = []
     var commentImages: Array<String> = []
     
     
+    typealias DidSelectItemAtClosure = (_ images:  Array<String>,_ indexPath: IndexPath) -> Void
+    var didSelectItemAtClosure : DidSelectItemAtClosure?
+    
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ProductDetailEvaluationListTableViewCell {
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ProductDetailEvaluationListTableViewCell {
         let ID = "ProductDetailEvaluationListTableViewCell"
         let ID = "ProductDetailEvaluationListTableViewCell"
         tableView.register(ProductDetailEvaluationListTableViewCell.self, forCellReuseIdentifier: ID)
         tableView.register(ProductDetailEvaluationListTableViewCell.self, forCellReuseIdentifier: ID)
@@ -217,7 +221,9 @@ extension ProductDetailEvaluationListTableViewCell: UICollectionViewDelegateFlow
     }
     }
     
     
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        
+        if let didSelectItemAtClosure = self.didSelectItemAtClosure {
+            didSelectItemAtClosure(commentImages,indexPath)
+        }
     }
     }
     
     
 }
 }

+ 5 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/ViewController/ProductAllCommentViewController.swift

@@ -47,6 +47,11 @@ class ProductAllCommentViewController: BaseViewController {
         productAllCommentView.tableView.addFooterWithWithHeader(withAutomaticallyRefresh: true) { [weak self] (page) in
         productAllCommentView.tableView.addFooterWithWithHeader(withAutomaticallyRefresh: true) { [weak self] (page) in
             self?.productCommentListApi(page:page)
             self?.productCommentListApi(page:page)
         }
         }
+        productAllCommentView.didSelectItemAtClosure = {
+            [weak self] (images,indexPath) in
+            let vc = BrowsePicturesViewController.init(images: images, index: indexPath.row)
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
     }
     }
     
     
     /// 获取商品评价列表
     /// 获取商品评价列表

+ 14 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailEvaluation/ProductDetailEvaluationTableViewCell.swift

@@ -170,7 +170,20 @@ extension ProductDetailEvaluationTableViewCell: UICollectionViewDelegateFlowLayo
     }
     }
     
     
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        
+        let vc = BrowsePicturesViewController.init(images: commentImages, index: indexPath.row)
+        responderViewController()?.navigationController?.pushViewController(vc, animated: true)
+    }
+    
+    //查找所在的ViewController
+    func responderViewController() -> UIViewController? {
+        for view in sequence(first: self.superview, next: { $0?.superview }) {
+            if let responder = view?.next {
+                if responder.isKind(of: UIViewController.self){
+                    return responder as? UIViewController
+                }
+            }
+        }
+        return nil
     }
     }
     
     
 }
 }

+ 9 - 9
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductDetailHotSell/ProductDetailHotSellCollectionViewCell.swift

@@ -48,7 +48,7 @@ class ProductDetailHotSellCollectionViewCell: UICollectionViewCell {
         addSubview(titleLabel)
         addSubview(titleLabel)
         addSubview(detailTitleLabel)
         addSubview(detailTitleLabel)
         addSubview(sellPriceLabel)
         addSubview(sellPriceLabel)
-        addSubview(markPriceLabel)
+//        addSubview(markPriceLabel)
         addSubview(plusButton)
         addSubview(plusButton)
     }
     }
     
     
@@ -75,11 +75,11 @@ class ProductDetailHotSellCollectionViewCell: UICollectionViewCell {
             make.height.equalTo(14)
             make.height.equalTo(14)
 
 
         }
         }
-        markPriceLabel.snp.makeConstraints { (make) in
-            make.left.equalTo(sellPriceLabel.snp.right).offset(3)
-            make.bottom.equalTo(sellPriceLabel)
-            make.height.equalTo(11)
-        }
+//        markPriceLabel.snp.makeConstraints { (make) in
+//            make.left.equalTo(sellPriceLabel.snp.right).offset(3)
+//            make.bottom.equalTo(sellPriceLabel)
+//            make.height.equalTo(11)
+//        }
         plusButton.snp.makeConstraints { (make) in
         plusButton.snp.makeConstraints { (make) in
             make.bottom.equalTo(-6)
             make.bottom.equalTo(-6)
             make.right.equalTo(-6)
             make.right.equalTo(-6)
@@ -153,9 +153,9 @@ class ProductDetailHotSellCollectionViewCell: UICollectionViewCell {
             titleLabel.text = productSearchModel?.saleName
             titleLabel.text = productSearchModel?.saleName
             detailTitleLabel.text = productSearchModel?.saleName
             detailTitleLabel.text = productSearchModel?.saleName
             sellPriceLabel.text = priceConversion(price: productSearchModel?.price ?? 0)
             sellPriceLabel.text = priceConversion(price: productSearchModel?.price ?? 0)
-            let attributeString = NSMutableAttributedString(string:priceConversion(price: productSearchModel?.originPrice ?? 0))
-            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
-            markPriceLabel.attributedText = attributeString
+//            let attributeString = NSMutableAttributedString(string:priceConversion(price: productSearchModel?.originPrice ?? 0))
+//            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
+//            markPriceLabel.attributedText = attributeString
             if productSearchModel?.stock == 0 {
             if productSearchModel?.stock == 0 {
                 self.plusButton.isHidden = true
                 self.plusButton.isHidden = true
             }else {
             }else {

+ 11 - 11
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/CollectionViewCell/ProductMallSlidingLeftRight/ProductSlidingLeftRightCollectionViewCell.swift

@@ -46,7 +46,7 @@ class ProductSlidingLeftRightCollectionViewCell: UICollectionViewCell {
         addSubview(titleLabel)
         addSubview(titleLabel)
         addSubview(detailTitleLabel)
         addSubview(detailTitleLabel)
         addSubview(sellPriceLabel)
         addSubview(sellPriceLabel)
-        addSubview(markPriceLabel)
+//        addSubview(markPriceLabel)
         addSubview(plusButton)
         addSubview(plusButton)
     }
     }
     
     
@@ -70,10 +70,10 @@ class ProductSlidingLeftRightCollectionViewCell: UICollectionViewCell {
             make.left.equalTo(titleLabel)
             make.left.equalTo(titleLabel)
             make.bottom.equalTo(5)
             make.bottom.equalTo(5)
         }
         }
-        markPriceLabel.snp.makeConstraints { (make) in
-            make.left.equalTo(sellPriceLabel.snp.right).offset(3)
-            make.bottom.equalTo(5)
-        }
+//        markPriceLabel.snp.makeConstraints { (make) in
+//            make.left.equalTo(sellPriceLabel.snp.right).offset(3)
+//            make.bottom.equalTo(5)
+//        }
         plusButton.snp.makeConstraints { (make) in
         plusButton.snp.makeConstraints { (make) in
             make.bottom.equalTo(5)
             make.bottom.equalTo(5)
             make.right.equalTo(-5)
             make.right.equalTo(-5)
@@ -147,9 +147,9 @@ class ProductSlidingLeftRightCollectionViewCell: UICollectionViewCell {
             titleLabel.text = productModel?.saleName
             titleLabel.text = productModel?.saleName
             detailTitleLabel.text = productModel?.saleName
             detailTitleLabel.text = productModel?.saleName
             sellPriceLabel.text = priceConversion(price: productModel?.price ?? 0)
             sellPriceLabel.text = priceConversion(price: productModel?.price ?? 0)
-            let attributeString = NSMutableAttributedString(string:priceConversion(price: productModel?.originPrice ?? 0))
-            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
-            markPriceLabel.attributedText = attributeString
+//            let attributeString = NSMutableAttributedString(string:priceConversion(price: productModel?.originPrice ?? 0))
+//            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
+//            markPriceLabel.attributedText = attributeString
         }
         }
     }
     }
     
     
@@ -159,9 +159,9 @@ class ProductSlidingLeftRightCollectionViewCell: UICollectionViewCell {
             titleLabel.text = productSearchModel?.saleName
             titleLabel.text = productSearchModel?.saleName
             detailTitleLabel.text = productSearchModel?.saleName
             detailTitleLabel.text = productSearchModel?.saleName
             sellPriceLabel.text = priceConversion(price: productSearchModel?.price ?? 0)
             sellPriceLabel.text = priceConversion(price: productSearchModel?.price ?? 0)
-            let attributeString = NSMutableAttributedString(string:priceConversion(price: productSearchModel?.originPrice ?? 0))
-            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
-            markPriceLabel.attributedText = attributeString
+//            let attributeString = NSMutableAttributedString(string:priceConversion(price: productSearchModel?.originPrice ?? 0))
+//            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
+//            markPriceLabel.attributedText = attributeString
             if productModel?.stock == 0 {
             if productModel?.stock == 0 {
                 self.plusButton.isHidden = true
                 self.plusButton.isHidden = true
             }else {
             }else {

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/Shop/View/ShopViewShopInfoTableViewCell.swift

@@ -83,6 +83,8 @@ class ShopViewShopInfoTableViewCell: UITableViewCell {
     lazy var shopIconImageView: UIImageView = {
     lazy var shopIconImageView: UIImageView = {
         let shopIconImageView = UIImageView()
         let shopIconImageView = UIImageView()
         shopIconImageView.image = kImage(name: "pic_preload")
         shopIconImageView.image = kImage(name: "pic_preload")
+        shopIconImageView.cornerRadius = 30
+        shopIconImageView.masksToBounds = true
         return shopIconImageView
         return shopIconImageView
     }()
     }()
     
     

+ 2 - 0
RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderRefundDetailModel.swift

@@ -16,6 +16,7 @@ class OrderRefundDetailModel : NSObject, Mappable{
 	var refundRemark : String?
 	var refundRemark : String?
 	var showRefundPrice : Int?
 	var showRefundPrice : Int?
 	var status : Int?
 	var status : Int?
+    var refundStatus : Int?
 
 
 
 
 	class func newInstance(map: Map) -> Mappable?{
 	class func newInstance(map: Map) -> Mappable?{
@@ -34,6 +35,7 @@ class OrderRefundDetailModel : NSObject, Mappable{
 		refundRemark <- map["refund_remark"]
 		refundRemark <- map["refund_remark"]
 		showRefundPrice <- map["show_refund_price"]
 		showRefundPrice <- map["show_refund_price"]
 		status <- map["status"]
 		status <- map["status"]
+        refundStatus <- map["refund_status"]
 		
 		
     }
     }
 
 

+ 23 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/nav_back_black_mask.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/nav_back_black_mask@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_back_black_mask.imageset/nav_back_black_mask@3x.png