Browse Source

Merge branch 'release/beta0.1.1'

南鑫林 6 years ago
parent
commit
aa1077aafe
40 changed files with 642 additions and 336 deletions
  1. 6 2
      RainbowPlanet/Podfile
  2. 5 9
      RainbowPlanet/Podfile.lock
  3. 283 8
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  4. 1 1
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift
  5. 4 4
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift
  6. 3 0
      RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h
  7. 2 8
      RainbowPlanet/RainbowPlanet/Macro/ThirdPartyMacro.swift
  8. 77 0
      RainbowPlanet/RainbowPlanet/Manager/AlamofireReachabilityManager/AlamofireReachabilityManager.swift
  9. 3 7
      RainbowPlanet/RainbowPlanet/Manager/MapManager/BaiduMapManager/BaiduMapManager.swift
  10. 21 0
      RainbowPlanet/RainbowPlanet/Manager/PGYManager/PGYManager.swift
  11. 4 1
      RainbowPlanet/RainbowPlanet/Manager/UMManager/UMManager.swift
  12. 5 5
      RainbowPlanet/RainbowPlanet/Modules/CommonModules/LocationModule/AddressPOI/View/AddressPOIView.swift
  13. 4 4
      RainbowPlanet/RainbowPlanet/Modules/CommonModules/LocationModule/Location/ViewController/LocationViewController.swift
  14. 0 168
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerExpressTableViewCell.swift
  15. 3 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerSelfMentionExpressHeaderView.swift
  16. 2 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerSelfMentionTableViewCell.swift
  17. 12 3
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerView.swift
  18. 43 42
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/ViewController/AddressManagerViewController.swift
  19. 11 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/EditExpressAddress/ViewController/EditExpressAddressViewController.swift
  20. 0 3
      RainbowPlanet/RainbowPlanet/Modules/MineModule/EditSelfMentionContacts/View/EditAddressTableViewCell.swift
  21. 3 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/ExpressAddressList/ViewController/ExpressAddressListViewController.swift
  22. 1 2
      RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/ViewController/MineViewController.swift
  23. 9 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderFinishPay/View/OrderFinishPayView.swift
  24. 7 0
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderFinishPay/ViewController/OrderFinishPayController.swift
  25. 6 10
      RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderPayOrder/ViewController/ShoppingCartPayOrderController.swift
  26. 6 4
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartHotSale/ShoppingCartHotSaleTableViewCell.swift
  27. 15 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartView.swift
  28. 7 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/ViewController/ShoppingCartViewController.swift
  29. 5 5
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailHotSell/ProductDetailHotSellTableViewCell.swift
  30. 6 4
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailShop/ProductDetailShopTableViewCell.swift
  31. 18 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/ProductDetailView.swift
  32. 14 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/ViewController/ProductDetailViewController.swift
  33. 0 10
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallView.swift
  34. 18 12
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallViewController.swift
  35. 7 1
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift
  36. 0 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaNetWorkServiceConfig.swift
  37. 4 2
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift
  38. 1 1
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift
  39. 23 13
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkManager.swift
  40. 3 0
      RainbowPlanet/RainbowPlanet/Tools/EmptyView/EmptyView.swift

+ 6 - 2
RainbowPlanet/Podfile

@@ -15,7 +15,7 @@ target 'RainbowPlanet' do
   pod 'SwiftyJSON'
   pod 'ObjectMapper'
   # 缓存
-  pod 'Cache'
+#  pod 'Cache'
   pod 'RealmSwift'
   pod 'FMDB'
   # 图片加载
@@ -51,7 +51,7 @@ target 'RainbowPlanet' do
   # mvvm
 #  pod 'ReactorKit'
   # 富文本
-  pod 'RichEditorView'
+#  pod 'RichEditorView'
 
   #======================第三方平台===========
   #======================友盟===========
@@ -78,6 +78,10 @@ target 'RainbowPlanet' do
   pod 'BMKLocationKit'
   # 百度地图SDK
   pod 'BaiduMapKit'
+  
+  #=====================蒲公英===========
+  # 蒲公英更新
+  pod 'PgyUpdate'
 
 
 end

+ 5 - 9
RainbowPlanet/Podfile.lock

@@ -2,7 +2,6 @@ PODS:
   - Alamofire (4.8.2)
   - BaiduMapKit (4.3.2)
   - BMKLocationKit (1.5.0)
-  - Cache (5.2.0)
   - DeviceKit (2.0.0)
   - FMDB (2.7.5):
     - FMDB/standard (= 2.7.5)
@@ -24,6 +23,7 @@ PODS:
     - Moya/Core
     - RxSwift (~> 4.0)
   - ObjectMapper (3.4.2)
+  - PgyUpdate (1.6)
   - PPBadgeViewSwift (3.1.0)
   - Realm (3.15.0):
     - Realm/Headers (= 3.15.0)
@@ -31,7 +31,6 @@ PODS:
   - RealmSwift (3.15.0):
     - Realm (= 3.15.0)
   - Result (4.1.0)
-  - RichEditorView (5.0.0)
   - RxCocoa (4.5.0):
     - RxSwift (>= 4.4.2, ~> 4.4)
   - RxSwift (4.5.0)
@@ -64,7 +63,6 @@ DEPENDENCIES:
   - Alamofire
   - BaiduMapKit
   - BMKLocationKit
-  - Cache
   - DeviceKit
   - FMDB
   - FSPagerView
@@ -78,9 +76,9 @@ DEPENDENCIES:
   - MJRefresh
   - Moya/RxSwift
   - ObjectMapper
+  - PgyUpdate
   - PPBadgeViewSwift
   - RealmSwift
-  - RichEditorView
   - RxCocoa
   - RxSwift
   - SnapKit
@@ -101,7 +99,6 @@ SPEC REPOS:
     - Alamofire
     - BaiduMapKit
     - BMKLocationKit
-    - Cache
     - DeviceKit
     - FMDB
     - FSPagerView
@@ -115,11 +112,11 @@ SPEC REPOS:
     - MJRefresh
     - Moya
     - ObjectMapper
+    - PgyUpdate
     - PPBadgeViewSwift
     - Realm
     - RealmSwift
     - Result
-    - RichEditorView
     - RxCocoa
     - RxSwift
     - SnapKit
@@ -136,7 +133,6 @@ SPEC CHECKSUMS:
   Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
   BaiduMapKit: a5d9580553355d39a91b24c5eb91ebf298c64038
   BMKLocationKit: 40d267478acd8704ddebd0e9deaddc727b13df9f
-  Cache: 807c5d86d01a177f06ede9865add3aea269bbfd4
   DeviceKit: 72d36709552d4b3582abd76a53949148acad9811
   FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
   FSPagerView: 816a18842306973cc7cc6df8a5332272f7815c30
@@ -150,11 +146,11 @@ SPEC CHECKSUMS:
   MJRefresh: ed450d6eb9d3346a2cb033ab7eb6de090aeef437
   Moya: f4a4b80ff2f8a4ffc208dfb31cd91636622fee6e
   ObjectMapper: 0d4402610f4e468903ae64629eec4784531e5c51
+  PgyUpdate: cd6c2ada5928f36a9f904d8f96a9b3b53e190755
   PPBadgeViewSwift: 18a219a9897f418342c22dd1a54f7b18ac56546b
   Realm: 9b834e1be6062f544805252c812348872dc5d4ed
   RealmSwift: 8a41886f8ab6efef9eb8df97de2f2bb911561a79
   Result: bd966fac789cc6c1563440b348ab2598cc24d5c7
-  RichEditorView: 1bbb07b87ca2d479ac29a6877014b38b8df233ef
   RxCocoa: cbf70265dc65a981d4ac982e513c10cf23df24a0
   RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575
   SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
@@ -167,6 +163,6 @@ SPEC CHECKSUMS:
   UMCSecurityPlugins: 0831a08f3988f3cea9f1d3a7626cd9bee4fef150
   UMCShare: 552b29753f1b4da87b51d96545ed19e6263df397
 
-PODFILE CHECKSUM: 8367a381fb27c958a744db1b81ae93efe4c465ee
+PODFILE CHECKSUM: a5c3f1b2448f60fc19b3b8224a9abecf194e0fde
 
 COCOAPODS: 1.6.2

+ 283 - 8
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -157,6 +157,8 @@
 		A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A738D201225AD6AD00EEE860 /* Extension+UICollectionView.swift */; };
 		A738D205225AF90D00EEE860 /* WeChatpayOrderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A738D204225AF90D00EEE860 /* WeChatpayOrderModel.swift */; };
 		A738D66F225D9BD900EEE860 /* UMLoginModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A738D66E225D9BD900EEE860 /* UMLoginModel.swift */; };
+		A73911AD229CD62F0033177E /* AlamofireReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73911AC229CD62F0033177E /* AlamofireReachabilityManager.swift */; };
+		A73911B0229E4D970033177E /* PGYManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73911AF229E4D970033177E /* PGYManager.swift */; };
 		A73D7C682268A032002A4CE3 /* SwiftyStarRatingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73D7C672268A032002A4CE3 /* SwiftyStarRatingView.swift */; };
 		A75414FD224B5F28002480B5 /* MobileLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75414FB224B5F28002480B5 /* MobileLoginViewController.swift */; };
 		A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7541501224C5ECA002480B5 /* BaiduMapManager.swift */; };
@@ -288,7 +290,6 @@
 		A7CC75382271ADD6003C4F38 /* AddressManagerSelfMentionExpressHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC75372271ADD6003C4F38 /* AddressManagerSelfMentionExpressHeaderView.swift */; };
 		A7CC753A2271B98B003C4F38 /* AddressManagerAddTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC75392271B98B003C4F38 /* AddressManagerAddTableViewCell.swift */; };
 		A7CC753C2271C177003C4F38 /* AddressManagerSelfMentionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC753B2271C177003C4F38 /* AddressManagerSelfMentionTableViewCell.swift */; };
-		A7CC753E2271C4C2003C4F38 /* AddressManagerExpressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC753D2271C4C2003C4F38 /* AddressManagerExpressTableViewCell.swift */; };
 		A7CC75432271E038003C4F38 /* SelfMentionContactsListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CC75422271E038003C4F38 /* SelfMentionContactsListViewController.swift */; };
 		A7D4608E227616F800A5A54E /* SQLiteManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D4608D227616F800A5A54E /* SQLiteManager.swift */; };
 		A7D46090227617D200A5A54E /* SQLModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D4608F227617D200A5A54E /* SQLModel.swift */; };
@@ -545,6 +546,8 @@
 		A738D201225AD6AD00EEE860 /* Extension+UICollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extension+UICollectionView.swift"; sourceTree = "<group>"; };
 		A738D204225AF90D00EEE860 /* WeChatpayOrderModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeChatpayOrderModel.swift; sourceTree = "<group>"; };
 		A738D66E225D9BD900EEE860 /* UMLoginModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UMLoginModel.swift; sourceTree = "<group>"; };
+		A73911AC229CD62F0033177E /* AlamofireReachabilityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireReachabilityManager.swift; sourceTree = "<group>"; };
+		A73911AF229E4D970033177E /* PGYManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PGYManager.swift; sourceTree = "<group>"; };
 		A73D7C672268A032002A4CE3 /* SwiftyStarRatingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyStarRatingView.swift; sourceTree = "<group>"; };
 		A75414FB224B5F28002480B5 /* MobileLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MobileLoginViewController.swift; sourceTree = "<group>"; };
 		A7541501224C5ECA002480B5 /* BaiduMapManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaiduMapManager.swift; sourceTree = "<group>"; };
@@ -687,7 +690,6 @@
 		A7CC75372271ADD6003C4F38 /* AddressManagerSelfMentionExpressHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressManagerSelfMentionExpressHeaderView.swift; sourceTree = "<group>"; };
 		A7CC75392271B98B003C4F38 /* AddressManagerAddTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressManagerAddTableViewCell.swift; sourceTree = "<group>"; };
 		A7CC753B2271C177003C4F38 /* AddressManagerSelfMentionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressManagerSelfMentionTableViewCell.swift; sourceTree = "<group>"; };
-		A7CC753D2271C4C2003C4F38 /* AddressManagerExpressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressManagerExpressTableViewCell.swift; sourceTree = "<group>"; };
 		A7CC75422271E038003C4F38 /* SelfMentionContactsListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfMentionContactsListViewController.swift; sourceTree = "<group>"; };
 		A7D4608D227616F800A5A54E /* SQLiteManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLiteManager.swift; sourceTree = "<group>"; };
 		A7D4608F227617D200A5A54E /* SQLModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLModel.swift; sourceTree = "<group>"; };
@@ -1488,6 +1490,8 @@
 		A72A725422321B9400B21995 /* Manager */ = {
 			isa = PBXGroup;
 			children = (
+				A73911AE229E4D780033177E /* PGYManager */,
+				A73911AB229CD6080033177E /* AlamofireReachabilityManager */,
 				A7778CA52243A03400C7C47A /* IQKeyboardManagerSwiftManager */,
 				A72A730522321F1D00B21995 /* PayManager */,
 				A72A726122321DBD00B21995 /* MapManager */,
@@ -1711,6 +1715,22 @@
 			path = Model;
 			sourceTree = "<group>";
 		};
+		A73911AB229CD6080033177E /* AlamofireReachabilityManager */ = {
+			isa = PBXGroup;
+			children = (
+				A73911AC229CD62F0033177E /* AlamofireReachabilityManager.swift */,
+			);
+			path = AlamofireReachabilityManager;
+			sourceTree = "<group>";
+		};
+		A73911AE229E4D780033177E /* PGYManager */ = {
+			isa = PBXGroup;
+			children = (
+				A73911AF229E4D970033177E /* PGYManager.swift */,
+			);
+			path = PGYManager;
+			sourceTree = "<group>";
+		};
 		A73D7C662268A032002A4CE3 /* SwiftyStarRatingView */ = {
 			isa = PBXGroup;
 			children = (
@@ -2653,7 +2673,6 @@
 				A7CC75352271AC14003C4F38 /* AddressManagerView.swift */,
 				A7CC75392271B98B003C4F38 /* AddressManagerAddTableViewCell.swift */,
 				A7CC753B2271C177003C4F38 /* AddressManagerSelfMentionTableViewCell.swift */,
-				A7CC753D2271C4C2003C4F38 /* AddressManagerExpressTableViewCell.swift */,
 				A7CC75372271ADD6003C4F38 /* AddressManagerSelfMentionExpressHeaderView.swift */,
 			);
 			path = View;
@@ -3244,7 +3263,6 @@
 			inputPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet-frameworks.sh",
 				"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
-				"${BUILT_PRODUCTS_DIR}/Cache/Cache.framework",
 				"${BUILT_PRODUCTS_DIR}/DeviceKit/DeviceKit.framework",
 				"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
 				"${BUILT_PRODUCTS_DIR}/FSPagerView/FSPagerView.framework",
@@ -3262,7 +3280,6 @@
 				"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
 				"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
 				"${BUILT_PRODUCTS_DIR}/Result/Result.framework",
-				"${BUILT_PRODUCTS_DIR}/RichEditorView/RichEditorView.framework",
 				"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
 				"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
 				"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
@@ -3274,7 +3291,6 @@
 			);
 			outputPaths = (
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cache.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DeviceKit.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FSPagerView.framework",
@@ -3292,7 +3308,6 @@
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Result.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RichEditorView.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
@@ -3353,6 +3368,7 @@
 				A71AA51C227219EF008FF1A5 /* EditExpressAddressView.swift in Sources */,
 				BDAA40FB228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift in Sources */,
 				A7CC751122715AE3003C4F38 /* MessageDetailesTimeView.swift in Sources */,
+				A73911AD229CD62F0033177E /* AlamofireReachabilityManager.swift in Sources */,
 				A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */,
 				A7B4E7352281907A0012914A /* CMSModel.swift in Sources */,
 				A72A72BE22321DE000B21995 /* Extension+RxTimer.swift in Sources */,
@@ -3466,6 +3482,7 @@
 				A72A72D522321E2700B21995 /* ColorMacro.swift in Sources */,
 				A72A7333223256E100B21995 /* PayManager.swift in Sources */,
 				A70B2C6722887B2B00B2449F /* ProductDetailEvaluationListTableViewCell.swift in Sources */,
+				A73911B0229E4D970033177E /* PGYManager.swift in Sources */,
 				BD1DC6CD228D160D00B89C57 /* OrderPurchaseModel.swift in Sources */,
 				A775CC00223774A300EBDCF8 /* ShoppingMallView.swift in Sources */,
 				A7FF1555228AC27600A85748 /* ProductAllCommentView.swift in Sources */,
@@ -3657,7 +3674,6 @@
 				A72A72B922321DE000B21995 /* Extension+Array.swift in Sources */,
 				A70B2C492288416F00B2449F /* ProductDetailHotSellCollectionViewCell.swift in Sources */,
 				A71901692275464000104A50 /* ProvinceCityAreaView.swift in Sources */,
-				A7CC753E2271C4C2003C4F38 /* AddressManagerExpressTableViewCell.swift in Sources */,
 				A7778CDD2246121500C7C47A /* PhoneCountryAreaListMdoel.swift in Sources */,
 				A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */,
 				A7FF156E228C6EAE00A85748 /* OrderDeliveryModeTableViewCell.swift in Sources */,
@@ -3759,6 +3775,7 @@
 				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
 				MTL_FAST_MATH = YES;
 				ONLY_ACTIVE_ARCH = YES;
+				OTHER_CFLAGS = "";
 				SDKROOT = iphoneos;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -3813,6 +3830,7 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_FAST_MATH = YES;
+				OTHER_CFLAGS = "";
 				SDKROOT = iphoneos;
 				SWIFT_COMPILATION_MODE = wholemodule;
 				SWIFT_OPTIMIZATION_LEVEL = "-O";
@@ -3835,6 +3853,8 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/AlipaySDK",
 				);
+				GCC_ENABLE_CPP_EXCEPTIONS = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = NO;
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"${PODS_ROOT}/Headers/Public\"",
@@ -3851,6 +3871,130 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/WeChatSDK",
 				);
+				OTHER_CFLAGS = (
+					"$(inherited)",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Cache/Cache.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FMDB/FMDB.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FSPagerView/FSPagerView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FWPopupView/FWPopupView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView/JXSegmentedView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/KeychainAccess/KeychainAccess.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/LYEmptyView/LYEmptyView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper/ObjectMapper.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/PPBadgeViewSwift/PPBadgeViewSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Realm/Realm.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift/RealmSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RichEditorView/RichEditorView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/TangramKit/TangramKit.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_ROOT}/Headers/Public\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire\"",
+					"-iframework",
+					"\"${PODS_ROOT}/BMKLocationKit/framework\"",
+					"-iframework",
+					"\"${PODS_ROOT}/BaiduMapKit/BaiduMapKit\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Cache\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FMDB\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FSPagerView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FWPopupView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/KeychainAccess\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/LYEmptyView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Moya\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/PPBadgeViewSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Realm\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Result\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RichEditorView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SnapKit\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/TangramKit\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCAnalytics\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCCommon\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCCommonLog/UMCommonLog\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCPush\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCSecurityPlugins/thirdparties\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCShare/UMShare\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCShare/UMShare/UMSocialUI\"",
+					"-fno-exceptions",
+				);
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -3931,10 +4075,12 @@
 				PRODUCT_BUNDLE_IDENTIFIER = com.chxq.rainbowplanet;
 				PRODUCT_MODULE_NAME = RainbowPlanet;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				STRIP_INSTALLED_PRODUCT = NO;
 				SWIFT_OBJC_BRIDGING_HEADER = "RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
+				VALID_ARCHS = "arm64 arm64e armv7s";
 			};
 			name = Debug;
 		};
@@ -3946,6 +4092,7 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = RainbowPlanet/RainbowPlanet.entitlements;
 				CODE_SIGN_STYLE = Automatic;
+				COPY_PHASE_STRIP = YES;
 				DEFINES_MODULE = YES;
 				DEVELOPMENT_TEAM = B4UG6NNMLL;
 				ENABLE_BITCODE = YES;
@@ -3953,6 +4100,9 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/AlipaySDK",
 				);
+				GCC_ENABLE_CPP_EXCEPTIONS = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = NO;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				HEADER_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"${PODS_ROOT}/Headers/Public\"",
@@ -3969,6 +4119,130 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/WeChatSDK",
 				);
+				OTHER_CFLAGS = (
+					"$(inherited)",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Cache/Cache.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FMDB/FMDB.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FSPagerView/FSPagerView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FWPopupView/FWPopupView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView/JXSegmentedView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/KeychainAccess/KeychainAccess.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/LYEmptyView/LYEmptyView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper/ObjectMapper.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/PPBadgeViewSwift/PPBadgeViewSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Realm/Realm.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift/RealmSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RichEditorView/RichEditorView.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/TangramKit/TangramKit.framework/Headers\"",
+					"-isystem",
+					"\"${PODS_ROOT}/Headers/Public\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire\"",
+					"-iframework",
+					"\"${PODS_ROOT}/BMKLocationKit/framework\"",
+					"-iframework",
+					"\"${PODS_ROOT}/BaiduMapKit/BaiduMapKit\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Cache\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FMDB\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FSPagerView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/FWPopupView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/KeychainAccess\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/LYEmptyView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Moya\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/PPBadgeViewSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Realm\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/Result\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RichEditorView\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/RxSwift\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SnapKit\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON\"",
+					"-iframework",
+					"\"${PODS_CONFIGURATION_BUILD_DIR}/TangramKit\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCAnalytics\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCCommon\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCCommonLog/UMCommonLog\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCPush\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCSecurityPlugins/thirdparties\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCShare/UMShare\"",
+					"-iframework",
+					"\"${PODS_ROOT}/UMCShare/UMShare/UMSocialUI\"",
+					"-fno-exceptions",
+				);
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -4052,6 +4326,7 @@
 				SWIFT_OBJC_BRIDGING_HEADER = "RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
 				TARGETED_DEVICE_FAMILY = 1;
+				VALID_ARCHS = "arm64 arm64e armv7s";
 			};
 			name = Release;
 		};

+ 1 - 1
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift

@@ -23,6 +23,7 @@ extension AppDelegate {
             /// 设置全局的navigation
             self?.setNavBarAppearence()
         }
+        // 获取默认配置
         if (UserModel.shared().getModel()?.token) != nil && (DeliveryMethodTypeModel.shared().getModel()?.deliveryMethodType) != nil {
             /// 设置Tabbar
             /// 刷新token
@@ -39,7 +40,6 @@ extension AppDelegate {
 
         /// 引导页
         setGuidePageView()
-        
     }
     
     /// 设置Tabbar

+ 4 - 4
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift

@@ -13,18 +13,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     var window: UIWindow?
 
-
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
-       
         //初始化窗口
         initWindow()
         //初始化友盟
         UMManager.shared().initUM(launchOptions: launchOptions)
         DispatchQueue.global(qos: .default).async {
             //初始化百度地图
-            BaiduMapManager.shared().initBaiduMap()
-//            //初始化键盘
+            BaiduMapManager.shared.initBaiduMap()
+            //初始化键盘
             IQKeyboardManagerSwiftManager.shared().initIQKeyboardManagerSwift()
+            //蒲公英
+            PGYManager.shared.initPGY()
         }
     
         return true

+ 3 - 0
RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h

@@ -49,5 +49,8 @@
 //只引入所需的单个头文件
 #import <BaiduMapAPI_Map/BMKMapView.h>
 
+//蒲公英
+#import <PgyUpdate/PgyUpdateManager.h>
+
 
 #endif /* RainbowPlanet_Bridging_Header_h */

+ 2 - 8
RainbowPlanet/RainbowPlanet/Macro/ThirdPartyMacro.swift

@@ -8,7 +8,6 @@
 
 import Foundation
 
-
 //MARK: - UMeng
 let kUMengAppKey  = "5c984a7f0cafb2332300000f"
 let kUMengAppSecret  = "lpx7kstlnlrxmimo5gfyzvtscrtguhw8"
@@ -28,13 +27,8 @@ let kWeiboAppSecret  = "79d36bfe6b75638ece14d5d852e785c4"
 //MARK: - 百度地图
 let kBaiduMapAppKey  = "v7wFjrAQdlaBVC50CjwuRESC3Lu0xkhj"
 
-//MARK: - 高德地图
-let kAMapAppKey  = "daae215db1937220769796457b8d0327"
-
-
 //MARK: - aliPay
-
 let kAliPayManagerAppKey  = "2019032763726287"
 
-
-
+//MARK: - 蒲公英
+let kPGYAppKey  = "4a6881672d4a91f5b82e94432c94565f"

+ 77 - 0
RainbowPlanet/RainbowPlanet/Manager/AlamofireReachabilityManager/AlamofireReachabilityManager.swift

@@ -0,0 +1,77 @@
+//
+//  ReachabilitySwiftManager.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/28.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import Alamofire
+
+class AlamofireReachabilityManager: NSObject {
+    
+    /// 单列
+    static let shared : AlamofireReachabilityManager = AlamofireReachabilityManager()
+    
+    /// 初始化对象
+    private var reachabilityManager = NetworkReachabilityManager(host: kApiDataPrefix())!
+    private var manager = NetworkReachabilityManager()!
+
+    
+    /// 网络监听
+    public func reachability() {
+        reachabilityManager.listener = { status in
+            if status == NetworkReachabilityManager.NetworkReachabilityStatus.notReachable {
+                NXLLog("当前无网络")
+            }
+            if status == NetworkReachabilityManager.NetworkReachabilityStatus.unknown {
+                NXLLog("当前网络环境为:未知网络")
+            }
+            if status == NetworkReachabilityManager.NetworkReachabilityStatus.reachable(.ethernetOrWiFi) {
+                NXLLog("当前网络环境为:无线网络")
+            }
+            if status == NetworkReachabilityManager.NetworkReachabilityStatus.reachable(.wwan) {
+                NXLLog("当前网络环境为:无线广域网")
+            }
+        }
+        startListening()
+    }
+    
+    
+    /// 开始监听
+    private func startListening() {
+        reachabilityManager.startListening()
+    }
+    
+    /// 结束监听
+    private func stopListening() {
+        reachabilityManager.stopListening()
+    }
+    
+    /// 判断是否连接网络
+    public func isNetworkConnect() -> Bool {
+        if manager.isReachable {
+            return true
+        }else {
+            AlamofireReachabilityManager.shared.alert()
+            return false
+        }
+        
+    }
+    
+    /// 弹框跳转设置页面
+    public func alert(){
+        AlertSheetView.alert(title: "网络连接失败", detailTitle: "检测到网络权限可能未开启\n您可以在\"设置>无线数据>WLAN或WLAN与蜂窝移动网\"开启一下吧", cancelTitle: "取消", sureTitle: "设置", cancelBlock:nil, confirmBlock: { (popupView, index, str) in
+            DispatchQueue.main.async(execute: {() -> Void in
+                let url = URL(string: UIApplication.openSettingsURLString)
+                if let url = url, UIApplication.shared.canOpenURL(url) {            if #available(iOS 10.0, *) {
+                    UIApplication.shared.open(url, options: [:],completionHandler: {(success) in})
+                }else {
+                    UIApplication.shared.openURL(url)
+                    }
+                }
+            })
+        })
+    }
+}

+ 3 - 7
RainbowPlanet/RainbowPlanet/Manager/MapManager/BaiduMapManager/BaiduMapManager.swift

@@ -10,15 +10,11 @@ import UIKit
 import SwiftyJSON
 
 public class BaiduMapManager: NSObject {
-
-    private static let _sharedInstance = BaiduMapManager()
-
+    
+    static let shared : BaiduMapManager = BaiduMapManager()
+    
     private override init() {} // 私有化init方法
 
-    class func shared() -> BaiduMapManager {
-        return _sharedInstance
-    }
-
     var locationModel = LocationModel.shared()
 
     typealias LocationSuccessBlock = () -> Void

+ 21 - 0
RainbowPlanet/RainbowPlanet/Manager/PGYManager/PGYManager.swift

@@ -0,0 +1,21 @@
+//
+//  PGYManager.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/29.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class PGYManager: NSObject {
+    static let shared : PGYManager = PGYManager()
+    
+    /// 初始化蒲公英
+    public func initPGY() {
+        if !kProductSever {
+            PgyUpdateManager.sharedPgy()?.start(withAppId: kPGYAppKey)
+            PgyUpdateManager.sharedPgy()?.checkUpdate()
+        }
+    }
+}

+ 4 - 1
RainbowPlanet/RainbowPlanet/Manager/UMManager/UMManager.swift

@@ -313,7 +313,10 @@ extension UMManager {
     ///
     /// - Parameter platformType: 平台
     func loginGetUserInfo(platformType: UMSocialPlatformType,callBack: @escaping (UMLoginModel) -> (Void)) {
-
+        
+        if !AlamofireReachabilityManager.shared.isNetworkConnect() {
+            return
+        }
         let isInstall = UMSocialManager.default()?.isInstall(platformType)
         if isInstall!  { //验证
             UMSocialManager.default().getUserInfo(with: platformType, currentViewController: nil) { result, error in

+ 5 - 5
RainbowPlanet/RainbowPlanet/Modules/CommonModules/LocationModule/AddressPOI/View/AddressPOIView.swift

@@ -123,8 +123,8 @@ class AddressPOIView: BaseView {
         searchTextField.borderStyle = .none
         searchTextField.rx.text.orEmpty.changed.subscribe(onNext: { (text) in
             
-                BaiduMapManager.shared().suggestionSearchPoi(cityname:LocationModel.shared().getLocationModel()?.city ?? "西安市", keyword: text)
-                BaiduMapManager.shared().suggestionSearchSuccessBlock = {
+                BaiduMapManager.shared.suggestionSearchPoi(cityname:LocationModel.shared().getLocationModel()?.city ?? "西安市", keyword: text)
+                BaiduMapManager.shared.suggestionSearchSuccessBlock = {
                     [weak self] (suggestionList:Array<BMKSuggestionInfo>) in
                     self?.suggestionList = suggestionList
                     self?.tableView.reloadSections([1], with: UITableView.RowAnimation.fade)
@@ -178,11 +178,11 @@ extension AddressPOIView:UITableViewDataSource,UITableViewDelegate {
         switch indexPath.section {
         case 0:
             cell.refreshButtonBlock = {
-                BaiduMapManager.shared().startLocation()
-                BaiduMapManager.shared().locationSuccessBlock = {
+                BaiduMapManager.shared.startLocation()
+                BaiduMapManager.shared.locationSuccessBlock = {
                      tableView.reloadSections([0], with: UITableView.RowAnimation.fade)
                 }
-                BaiduMapManager.shared().locationFalseBlock = {
+                BaiduMapManager.shared.locationFalseBlock = {
                     SwiftProgressHUD.shared().showText("定位失败\n重新定位", textAlignment: NSTextAlignment.center)
                 }
             }

+ 4 - 4
RainbowPlanet/RainbowPlanet/Modules/CommonModules/LocationModule/Location/ViewController/LocationViewController.swift

@@ -14,13 +14,13 @@ class LocationViewController: BaseViewController {
         super.viewDidLoad()
         setupViews()
         navigationBar.title = "获取地址授权中"
-        BaiduMapManager.shared().startLocation()
-        BaiduMapManager.shared().locationSuccessBlock =  {
+        BaiduMapManager.shared.startLocation()
+        BaiduMapManager.shared.locationSuccessBlock =  {
             [weak self] in
             self!.configCityManagementIndexApi()
             
         }
-        BaiduMapManager.shared().locationFalseBlock =  {
+        BaiduMapManager.shared.locationFalseBlock =  {
             [weak self] in
             self?.navigationBar.title = "未获取地理位置授权"
             self?.locationView.isHidden = true
@@ -39,7 +39,7 @@ class LocationViewController: BaseViewController {
             self?.setDeliveryMethodType()
         }
         let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle1(iconStr: "page01", titleStr: "选择了自提点才能享受支持到店自提服务哦", buttonStr: "去设置", buttonActionBlock: {
-            BaiduMapManager.shared().loacationAlertView()
+            BaiduMapManager.shared.loacationAlertView()
         })
         emptyView.contentViewY = kScaleValue(value: 100) + kNavBarTotalHeight
         view.ly_emptyView = emptyView

+ 0 - 168
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerExpressTableViewCell.swift

@@ -1,168 +0,0 @@
-//
-//  AddressManagerExpressTableViewCell.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/25.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class AddressManagerExpressTableViewCell: UITableViewCell {
-
-    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> AddressManagerExpressTableViewCell {
-        let ID = "AddressManagerExpressTableViewCell"
-        tableView.register(AddressManagerExpressTableViewCell.self, forCellReuseIdentifier: ID)
-        let cell : AddressManagerExpressTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! AddressManagerExpressTableViewCell
-        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(nameLabel)
-        addSubview(moblieLabel)
-        addSubview(defalutLabel)
-        addSubview(addressLabel)
-        addSubview(selectedButton)
-        addSubview(lineLabel)
-    }
-    
-    private func setupLayouts() {
-        nameLabel.snp.makeConstraints { (make) in
-            make.top.equalTo(15)
-            make.left.equalTo(52)
-            make.height.equalTo(23)
-        }
-        
-        moblieLabel.snp.makeConstraints { (make) in
-            make.left.equalTo(nameLabel.snp.right).offset(10)
-            make.centerY.equalTo(nameLabel)
-            make.height.equalTo(20)
-        }
-        
-        addressLabel.snp.remakeConstraints { (make) in
-            make.top.equalTo(nameLabel.snp.bottom).offset(5)
-            make.left.equalTo(92)
-            make.right.equalTo(-14)
-            make.bottom.equalTo(-15)
-        }
-        
-        defalutLabel.snp.makeConstraints { (make) in
-            make.left.equalTo(nameLabel)
-            make.top.equalTo(addressLabel).offset(2)
-            make.width.equalTo(36)
-            make.height.equalTo(17)
-        }
-        
-        selectedButton.snp.makeConstraints { (make) in
-            make.left.equalTo(14)
-            make.top.equalTo(addressLabel.snp.top)
-            make.size.equalTo(16)
-        }
-        
-        lineLabel.snp.makeConstraints { (make) in
-            make.top.right.equalToSuperview()
-            make.left.equalTo(14)
-            make.height.equalTo(0.5)
-        }
-    }
-    
-    private lazy var nameLabel: UILabel = {
-        let nameLabel = UILabel()
-        nameLabel.textColor = k333333Color
-        nameLabel.font = kMediumFont16
-        return nameLabel
-    }()
-    
-    private lazy var moblieLabel: UILabel = {
-        let moblieLabel = UILabel()
-        moblieLabel.textColor = k999999Color
-        moblieLabel.font = kRegularFont14
-        return moblieLabel
-    }()
-    
-    private lazy var defalutLabel: UILabel = {
-        let defalutLabel = UILabel()
-        defalutLabel.backgroundColor = kFFF1EBColor
-        defalutLabel.text = "默认"
-        defalutLabel.textColor = kFE5706Color
-        defalutLabel.font = kRegularFont13
-        defalutLabel.cornerRadius = 17/2
-        defalutLabel.masksToBounds = true
-        defalutLabel.textAlignment = .center
-        return defalutLabel
-    }()
-    
-    private lazy var selectedButton: UIButton = {
-        let selectedButton = UIButton(type: UIButton.ButtonType.custom)
-        selectedButton.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
-        selectedButton.setImage(kImage(name: "common_check_icon"), for: UIControl.State.selected)
-        return selectedButton
-    }()
-    
-    private lazy var addressLabel: UILabel = {
-        let addressLabel = UILabel()
-        addressLabel.text = "陕西省 西安市 雁塔区 曲江街道 翠华南路创意盒子"
-        addressLabel.textColor = k333333Color
-        addressLabel.font = kRegularFont14
-        addressLabel.numberOfLines = 0
-        return addressLabel
-    }()
-    
-    private lazy var lineLabel: UILabel = {
-        let lineLabel = UILabel()
-        lineLabel.backgroundColor = kf5f5f5Color
-        return lineLabel
-    }()
-    
-    var expressAddresModel: ExpressAddresModel? {
-        didSet {
-            nameLabel.text = expressAddresModel?.contactName 
-            moblieLabel.text = expressAddresModel?.contactMobile
-            let provinceName = expressAddresModel!.provinceName
-            let cityName = expressAddresModel!.cityName
-            let areaName = expressAddresModel!.areaName
-            let address = expressAddresModel!.address
-            
-            addressLabel.text = "\(String(describing: provinceName ??  ""))\(String(describing: cityName ?? ""))\(String(describing: areaName ?? ""))\(String(describing: address ?? ""))"
-            if expressAddresModel!.isDefault == 1 {
-                selectedButton.isSelected = true
-                defalutLabel.isHidden = false
-                addressLabel.snp.remakeConstraints { (make) in
-                    make.top.equalTo(nameLabel.snp.bottom).offset(5)
-                    make.left.equalTo(92)
-                    make.right.equalTo(-14)
-                    make.bottom.equalTo(-15)
-                }
-            }else {
-                selectedButton.isSelected = false
-                defalutLabel.isHidden = true
-                addressLabel.snp.remakeConstraints { (make) in
-                    make.top.equalTo(nameLabel.snp.bottom).offset(5)
-                    make.left.equalTo(52)
-                    make.right.equalTo(-14)
-                    make.bottom.equalTo(-15)
-                }
-            }
-            
-        }
-    }
-    
-}

+ 3 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerSelfMentionExpressHeaderView.swift

@@ -70,7 +70,9 @@ class AddressManagerSelfMentionExpressHeaderView: BaseView {
     
     var section:Int? {
         didSet {
-            
+            if self.section == 1 {
+                managerButton.setTitle("新建地址", for: UIControl.State.normal)
+            }
         }
     }
     

+ 2 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerSelfMentionTableViewCell.swift

@@ -62,7 +62,8 @@ class AddressManagerSelfMentionTableViewCell: UITableViewCell {
     
     private lazy var selectedButton: UIButton = {
         let selectedButton = UIButton(type: UIButton.ButtonType.custom)
-        selectedButton.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
+//        selectedButton.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
+        selectedButton.setImage(kImage(name: "common_check_icon"), for: UIControl.State.normal)
         selectedButton.setImage(kImage(name: "common_check_icon"), for: UIControl.State.selected)
         return selectedButton
     }()

+ 12 - 3
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/View/AddressManagerView.swift

@@ -16,6 +16,9 @@ class AddressManagerView: BaseView {
     typealias ManagerClosur = (_ section: Int) -> Void
     var managerClosur : ManagerClosur?
     
+    typealias EditClosure = (_ indexPath: IndexPath) -> Void
+    var editClosure: EditClosure?
+    
     var addressManagerListModel : AddressManagerListModel? {
         didSet {
             tableView.reloadData()
@@ -135,9 +138,15 @@ extension AddressManagerView: UITableViewDelegate,UITableViewDataSource {
             let cell = AddressManagerAddTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             cell.addAddresses = addAddresses[indexPath.section]
             return cell
-        }else {
-            let cell = AddressManagerExpressTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
-            cell.expressAddresModel = addressManagerListModel?.expressAddress?[indexPath.row]
+        }else {            
+            let cell = ExpressAddressListTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.expressAddresModel = self.addressManagerListModel?.expressAddress?[indexPath.row]
+            cell.editClosure = {
+                [weak self] indexPath in
+                if let editClosure = self?.editClosure {
+                    editClosure(indexPath)
+                }
+            }
             return cell
         }
     }

+ 43 - 42
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/ViewController/AddressManagerViewController.swift

@@ -8,10 +8,6 @@
 
 import UIKit
 
-enum AddressManagerVCType {
-    case mine
-}
-
 class AddressManagerViewController: BaseViewController {
     
     deinit {
@@ -19,7 +15,6 @@ class AddressManagerViewController: BaseViewController {
     }
     weak var observe : NSObjectProtocol?
     
-    var addressManagerVCType : AddressManagerVCType = .mine
     var addressManagerListModel : AddressManagerListModel?
     var isOpenCity : Bool = false
     
@@ -61,14 +56,14 @@ class AddressManagerViewController: BaseViewController {
                 case 0://自提地址选择
                     self?.managerSelfMentionAddressPushVC()
                     break
-                case 1://快递收货地址
-                    self?.managerExpressAddressPushVC()
+                case 1://新增快递收货地址
+                    self?.addExpressAddressPushVC()
                     break
                 default:
                     break
                 }
             }else {
-                self?.managerExpressAddressPushVC()
+                self?.addExpressAddressPushVC()
             }
             
         }
@@ -91,13 +86,24 @@ class AddressManagerViewController: BaseViewController {
             }
             
         }
+        
+        // 编辑快递收货地址回调
+        addressManagerView.editClosure = {
+            [weak self] indexPath in
+            let vc = EditExpressAddressViewController()
+            vc.isAddNewAddress = false
+            vc.expressAddresModel = self?.addressManagerListModel?.expressAddress![indexPath.row]
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
+        
         return addressManagerView
     }()
     
     
-    /// 管理快递跳转页面
-    private func managerExpressAddressPushVC() {
-        let vc = ExpressAddressListViewController()
+    /// 添加快递地址跳转页面
+    private func addExpressAddressPushVC() {
+        let vc = EditExpressAddressViewController()
+        vc.isAddNewAddress = true
         self.navigationController?.pushViewController(vc, animated: true)
     }
     
@@ -107,7 +113,9 @@ class AddressManagerViewController: BaseViewController {
         let vc = SelfRecommendationViewController()
         vc.didSelectClosure = {
             [weak self] in
-            self?.configCityManagementIndexApi()
+            self?.setDeliveryMethodType(type: "1")
+            self?.isOpenCity = true
+            self?.userSelfAndExpressAddressListApi(type:0)
         }
         self.navigationController?.pushViewController(vc, animated: true)
     }
@@ -115,38 +123,18 @@ class AddressManagerViewController: BaseViewController {
     
     /// 选择自提地址
     func didSelectSelfMentionAddress(indexPath:IndexPath) {
-        if self.addressManagerListModel?.selfAddress?.isEmpty ?? true {
-            let vc = SelfRecommendationViewController()
-            vc.didSelectClosure = {
-                [weak self] in
-                self?.configCityManagementIndexApi()
-            }
-            self.navigationController?.pushViewController(vc, animated: true)
-        }else {
-            if self.addressManagerVCType == .mine {
-                managerSelfMentionAddressPushVC()
-            }else {
-                let selfAddressModel = self.addressManagerListModel?.selfAddress?[indexPath.row]
-                self.userAddressIsDefaultApi(id:selfAddressModel?.id ?? 0)
-            }
-        }
+        managerSelfMentionAddressPushVC()
     }
     
     
     /// 选择快递地址
     func didSelectExpressAddress(indexPath:IndexPath) {
         if self.addressManagerListModel?.expressAddress?.isEmpty ?? true {
-            let vc = EditExpressAddressViewController()
-            self.navigationController?.pushViewController(vc, animated: true)
+            self.addExpressAddressPushVC()
+            
         }else {
-            if self.addressManagerVCType == .mine {
-                let vc = EditExpressAddressViewController()
-                vc.expressAddresModel = self.addressManagerListModel?.expressAddress?[indexPath.row]
-                self.navigationController?.pushViewController(vc, animated: true)
-            }else {
-                let expressAddressModel = self.addressManagerListModel?.expressAddress?[indexPath.row]
-                self.userAddressIsDefaultApi(id:expressAddressModel?.id ?? 0)
-            }
+            let expressAddressModel = self.addressManagerListModel?.expressAddress?[indexPath.row]
+            self.userAddressIsDefaultApi(id:expressAddressModel?.id ?? 0, type: "2")
         }
     }
     
@@ -156,14 +144,14 @@ class AddressManagerViewController: BaseViewController {
         let deliveryMethodType = Int(DeliveryMethodTypeModel.shared().getModel()?.deliveryMethodType ?? "2")
         if deliveryMethodType == 1 { //自提
             self.isOpenCity = true
-            userSelfAndExpressAddressListApi(type:1)
+            userSelfAndExpressAddressListApi(type:0)
         }
         if deliveryMethodType == 2 { //快递
             SwiftMoyaNetWorkServiceConfig.shared().configCityManagementIndexApi { [weak self] (openCityListModel) -> (Void) in
                 let openCityListModel = openCityListModel as! OpenCityListModel
                 if openCityListModel.data?.isEmpty ?? true { //自提没有开通
                     self?.isOpenCity = false
-                    self?.userSelfAndExpressAddressListApi(type:1)
+                    self?.userSelfAndExpressAddressListApi(type:2)
                 }else { //自提开通/加快递
                     self?.isOpenCity = true
                     self?.userSelfAndExpressAddressListApi(type:0)
@@ -184,9 +172,22 @@ class AddressManagerViewController: BaseViewController {
         }
     }
     
-    /// 设置默认跳转
-    func userAddressIsDefaultApi(id:Int = 0) {
-        SwiftMoyaNetWorkServiceUser.shared().userAddressIsDefaultApi(id:id) { (data) -> (Void) in
+    /// 设置默认
+    func userAddressIsDefaultApi(id:Int = 0, type:String) {
+        SwiftMoyaNetWorkServiceUser.shared().userAddressIsDefaultApi(id: id, completion: {
+            [weak self] (data) -> (Void) in
+            self?.setDeliveryMethodType(type: type)
+            
+            if self?.isOpenCity ?? true {
+                self?.userSelfAndExpressAddressListApi(type:0)
+            }else {
+                self?.userSelfAndExpressAddressListApi(type:2)
+            }
+        })
+    }
+    
+    func setDeliveryMethodType(type: String) {
+        SwiftMoyaNetWorkServiceUser.shared().userSetDeliverTypeApi(deliveryMethodType: type) { (data) -> (Void) in
             
         }
     }

+ 11 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/EditExpressAddress/ViewController/EditExpressAddressViewController.swift

@@ -15,6 +15,17 @@ class EditExpressAddressViewController: BaseViewController {
     // 是否由支付订单页面进入
     var isFromOrderPay: Bool = false
     
+    // 新增/编辑
+    var isAddNewAddress: Bool = true {
+        didSet {
+            if self.isAddNewAddress {
+                navigationBar.title = "新增收货地址"
+            } else {
+                navigationBar.title = "编辑收货地址"
+            }
+        }
+    }
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
@@ -22,7 +33,6 @@ class EditExpressAddressViewController: BaseViewController {
     }
     
     override func setupViews() {
-        navigationBar.title = "编辑收货地址"
         navigationBar.wr_setRightButton(title: "保存", titleColor: k333333Color)
         navigationBar.onClickRightButton = {
             [weak self] in

+ 0 - 3
RainbowPlanet/RainbowPlanet/Modules/MineModule/EditSelfMentionContacts/View/EditAddressTableViewCell.swift

@@ -99,9 +99,6 @@ class EditAddressTableViewCell: UITableViewCell {
         editTextField.rx.text.orEmpty.changed.subscribe(onNext: {
             [weak self] (text) in
             switch self?.indexPath!.row {
-            case 0:
-                self?.editTextField.text = String(describing: text.prefix(10))
-                break
             case 1:
                 self?.editTextField.text = String(describing: text.prefix(11))
                 break

+ 3 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/ExpressAddressList/ViewController/ExpressAddressListViewController.swift

@@ -28,11 +28,12 @@ class ExpressAddressListViewController: BaseViewController {
     
     override func setupViews() {
         navigationBar.title = "快递地址管理"
-        navigationBar.wr_setRightButton(title: "添加新地址", titleColor: k333333Color)
+        navigationBar.wr_setRightButton(title: "新地址", titleColor: k333333Color)
         navigationBar.rightButton.titleLabel!.font = kRegularFont14
         navigationBar.onClickRightButton = {
             [weak self] in
            let vc = EditExpressAddressViewController()
+            vc.isAddNewAddress = true
             self?.navigationController?.pushViewController(vc, animated: true)
         }
         view.addSubview(expressAddressListView)
@@ -60,6 +61,7 @@ class ExpressAddressListViewController: BaseViewController {
         expressAddressListView.editClosure = {
             [weak self] indexPath in
             let vc = EditExpressAddressViewController()
+            vc.isAddNewAddress = false
             vc.expressAddresModel = self?.addressManagerListModel?.expressAddress![indexPath.row]
             self?.navigationController?.pushViewController(vc, animated: true)
         }

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/ViewController/MineViewController.swift

@@ -62,8 +62,7 @@ class MineViewController: BaseViewController {
         }
         mineView.addressClosure = {
             [weak self] in
-            let vc = AddressManagerViewController()
-            vc.addressManagerVCType = .mine
+            let vc = AddressManagerViewController()            
             self?.navigationController?.pushViewController(vc, animated: true)
         }
         mineView.lookAllOrderButtonBlock = {

+ 9 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderFinishPay/View/OrderFinishPayView.swift

@@ -16,6 +16,9 @@ class OrderFinishPayView: BaseView {
     typealias JumpTransBlock = (_ jType: PayJumpDes) -> Void
     var jumpTransBlock : JumpTransBlock?
     
+    typealias JumpToDetailTransClosure = (_ proId: Int,_ shopId : Int) -> Void
+    var jumpToDetailTransClosure : JumpToDetailTransClosure?
+    
     // 热销ModelArr
     var hotSaleModelArr : Array<ProductSearchModel>? {
         didSet {
@@ -104,6 +107,12 @@ extension OrderFinishPayView : UITableViewDelegate, UITableViewDataSource {
             hotSaleCell.hotSaleModelArr = hotSaleModelArr
             hotSaleCell.layoutIfNeeded()
             hotSaleCell.reloadData()
+            hotSaleCell.jumpToDetailClosure = {
+                [weak self] (proId, shopId) in
+                if let jumpToDetailTransClosure = self?.jumpToDetailTransClosure {
+                    jumpToDetailTransClosure(proId, shopId)
+                }
+            }
             return hotSaleCell
             
         default:

+ 7 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderFinishPay/ViewController/OrderFinishPayController.swift

@@ -128,6 +128,13 @@ class OrderFinishPayController: BaseViewController {
                 self?.navigationController?.pushViewController(vc, animated: true)
             }
         }
+        finishPayView.jumpToDetailTransClosure = {
+            [weak self] (proId, shopId) in
+            let vc = ProductDetailViewController()
+            vc.productId = proId
+            vc.shopId = shopId
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
         
         return finishPayView
     }()

+ 6 - 10
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderPayOrder/ViewController/ShoppingCartPayOrderController.swift

@@ -73,19 +73,15 @@ class ShoppingCartPayOrderController: BaseViewController {
         orderPayView.jumpNavBlock = {
             [weak self] (jumpType) in
             switch jumpType {
-            case WillJumpType.expressAddInfo:
-                let vc = EditExpressAddressViewController()
-                vc.isFromOrderPay = true
-                self?.navigationController?.pushViewController(vc, animated: true)
-            case WillJumpType.expressManageInfo:
+            case WillJumpType.expressAddInfo,
+                 WillJumpType.expressManageInfo
+                 :
                 let vc = ExpressAddressListViewController()
                 vc.isFromOrderPay = true
                 self?.navigationController?.pushViewController(vc, animated: true)
-            case WillJumpType.selfAddInfo:
-                let vc = EditSelfMentionContactsViewController()
-                vc.isFromOrderPay = true
-                self?.navigationController?.pushViewController(vc, animated: true)
-            case WillJumpType.selfPersonalInfo:
+            case WillJumpType.selfAddInfo,
+                 WillJumpType.selfPersonalInfo
+                 :
                 let vc = SelfMentionContactsListViewController()
                 vc.isFromOrderPay = true
                 self?.navigationController?.pushViewController(vc, animated: true)

+ 6 - 4
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartHotSale/ShoppingCartHotSaleTableViewCell.swift

@@ -13,6 +13,9 @@ class ShoppingCartHotSaleTableViewCell: UITableViewCell {
     typealias RefreshBlock = () -> Void
     var refreshBlock : RefreshBlock?
     
+    typealias JumpToDetailClosure = (_ proId: Int,_ shopId : Int) -> Void
+    var jumpToDetailClosure : JumpToDetailClosure?
+    
     // 热销ModelArr
     var hotSaleModelArr : Array<ProductSearchModel>? {
         didSet {
@@ -173,10 +176,9 @@ extension ShoppingCartHotSaleTableViewCell: UICollectionViewDelegateFlowLayout,U
     
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
         let productSearchModel = hotSaleModelArr?[indexPath.row]
-        let vc = ProductDetailViewController()
-        vc.productId = productSearchModel?.id
-        vc.shopId = productSearchModel?.shopId
-        getCurrentVC().navigationController?.pushViewController(vc, animated: true)
+        if let jumpToDetailClosure = self.jumpToDetailClosure {
+            jumpToDetailClosure(productSearchModel?.id ?? 0, productSearchModel?.shopId ?? 0)
+        }
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {

+ 15 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/View/ShoppingCartView.swift

@@ -10,6 +10,9 @@ import UIKit
 
 class ShoppingCartView: BaseView {
     
+    typealias JumpToDetailTransClosure = (_ proId: Int,_ shopId : Int) -> Void
+    var jumpToDetailTransClosure : JumpToDetailTransClosure?
+    
     typealias ProductDidSelectRowAt = (ProductModel) -> Void
     var productDidSelectRowAt : ProductDidSelectRowAt?
     
@@ -220,6 +223,12 @@ extension ShoppingCartView : UITableViewDelegate, UITableViewDataSource {
                         refreshTransBlock()
                     }
                 }
+                hotSaleCell.jumpToDetailClosure = {
+                    [weak self] (proId, shopId) in
+                    if let jumpToDetailTransClosure = self?.jumpToDetailTransClosure {
+                        jumpToDetailTransClosure(proId, shopId)
+                    }
+                }
                 return hotSaleCell
             default:
                 return UITableViewCell()
@@ -292,6 +301,12 @@ extension ShoppingCartView : UITableViewDelegate, UITableViewDataSource {
                         refreshTransBlock()
                     }
                 }
+                hotSaleCell.jumpToDetailClosure = {
+                    [weak self] (proId, shopId) in
+                    if let jumpToDetailTransClosure = self?.jumpToDetailTransClosure {
+                        jumpToDetailTransClosure(proId, shopId)
+                    }
+                }
                 return hotSaleCell
             }
         }
@@ -394,7 +409,6 @@ extension ShoppingCartView : UITableViewDelegate, UITableViewDataSource {
                 tableView.deleteRows(at: [indexPath], with: .none)
                 self?.refreshAccountView()
                 
-                
                 if self?.cartListModelArr![indexPath.section].productList?.isEmpty ?? true {
                     // 删除后商店为空,刷新table
                     self?.cartListModelArr?.remove(at: indexPath.section)

+ 7 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingCartModule/ShoppingCart/ViewController/ShoppingCartViewController.swift

@@ -95,6 +95,13 @@ class ShoppingCartViewController: BaseViewController {
     
     private lazy var shoppingCartView: ShoppingCartView = {
         let shoppingCartView = ShoppingCartView()
+        shoppingCartView.jumpToDetailTransClosure = {
+            [weak self] (proId, shopId) in
+            let vc = ProductDetailViewController()
+            vc.productId = proId
+            vc.shopId = shopId
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
         return shoppingCartView
     }()
     

+ 5 - 5
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailHotSell/ProductDetailHotSellTableViewCell.swift

@@ -10,6 +10,8 @@ import UIKit
 
 class ProductDetailHotSellTableViewCell: UITableViewCell {
 
+    typealias JumpToDetailClosure = (_ proId: Int,_ shopId : Int) -> Void
+    var jumpToDetailClosure : JumpToDetailClosure?
     
     var productSearchListModel: ProductSearchListModel? {
         didSet {
@@ -111,11 +113,9 @@ extension ProductDetailHotSellTableViewCell: UICollectionViewDelegateFlowLayout,
     
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
         let productSearchModel = productSearchListModel?.data?[indexPath.row]
-        let vc = ProductDetailViewController()
-        vc.productId = productSearchModel?.id
-        vc.shopId = productSearchModel?.shopId
-        getCurrentVC().navigationController?.pushViewController(vc, animated: true)
-        
+        if let jumpToDetailClosure = self.jumpToDetailClosure {
+            jumpToDetailClosure(productSearchModel?.id ?? 0, productSearchModel?.shopId ?? 0)
+        }
     }
 
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {

+ 6 - 4
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailShop/ProductDetailShopTableViewCell.swift

@@ -13,6 +13,9 @@ class ProductDetailShopTableViewCell: UITableViewCell {
     
     let disposeBag = DisposeBag()
     
+    typealias JumpToShopBlock = (_ shopName: String,_ shopId : Int) -> Void
+    var jumpToShopBlock : JumpToShopBlock?
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ProductDetailShopTableViewCell {
         let ID = "ProductDetailShopTableViewCell"
         tableView.register(ProductDetailShopTableViewCell.self, forCellReuseIdentifier: ID)
@@ -93,10 +96,9 @@ class ProductDetailShopTableViewCell: UITableViewCell {
         comeInButton.backgroundColor = kFFA42FColor
         comeInButton.rx.tap.subscribe(onNext: { //跳转到店铺
              [weak self] (data) in
-            let vc = ShopViewController()
-            vc.navigationBar.title = self?.productDetailModel?.shopName
-            vc.shopId = self?.productDetailModel?.shopId
-            getCurrentVC().navigationController?.pushViewController(vc, animated: true)
+            if let jumpToShopBlock = self?.jumpToShopBlock {
+                jumpToShopBlock(self?.productDetailModel?.shopName ?? "", self?.productDetailModel?.shopId ?? 0)
+            }
         }).disposed(by: disposeBag)
         return comeInButton
     }()

+ 18 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/ProductDetailView.swift

@@ -24,6 +24,12 @@ class ProductDetailView: BaseView {
     typealias CartButtonClosure = () -> Void
     var cartButtonClosure : CartButtonClosure?
     
+    typealias JumpToShopTransClosure = (_ shopName: String,_ shopId : Int) -> Void
+    var jumpToShopTransClosure : JumpToShopTransClosure?
+    
+    typealias JumpToDetailTransClosure = (_ proId: Int,_ shopId : Int) -> Void
+    var jumpToDetailTransClosure : JumpToDetailTransClosure?
+    
     var productDetailSkuModel : ProductDetailSkuModel?
     
     var titles = ["","","商品评价","","热销排行","商品参数","商品详情"]
@@ -386,10 +392,22 @@ extension ProductDetailView : UITableViewDelegate, UITableViewDataSource {
         case 3:
             let cell = ProductDetailShopTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             cell.productDetailModel = productDetailModel
+            cell.jumpToShopBlock = {
+                [weak self] (shopName, shopId) in
+                if let jumpToShopTransClosure = self?.jumpToShopTransClosure {
+                    jumpToShopTransClosure(shopName, shopId)
+                }
+            }
             return cell
         case 4:
             let cell = ProductDetailHotSellTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             cell.productSearchListModel = productSearchListModel
+            cell.jumpToDetailClosure = {
+                [weak self] (proId, shopId) in
+                if let jumpToDetailTransClosure = self?.jumpToDetailTransClosure {
+                    jumpToDetailTransClosure(proId, shopId)
+                }
+            }
             return cell
         case 5:
             let cell = ProductDetailParameterTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)

+ 14 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/ViewController/ProductDetailViewController.swift

@@ -185,6 +185,20 @@ class ProductDetailViewController: BaseViewController {
     
     lazy var productDetailView: ProductDetailView = {
         let productDetailView = ProductDetailView()
+        productDetailView.jumpToShopTransClosure = {
+            [weak self] (shopName, shopId) in
+            let vc = ShopViewController()
+            vc.navigationBar.title = shopName
+            vc.shopId = shopId
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
+        productDetailView.jumpToDetailTransClosure = {
+            [weak self] (proId, shopId) in
+            let vc = ProductDetailViewController()
+            vc.productId = proId
+            vc.shopId = shopId
+            self?.navigationController?.pushViewController(vc, animated: true)
+        }
         return productDetailView
     }()
     

+ 0 - 10
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallView.swift

@@ -28,7 +28,6 @@ class ShoppingMallView: BaseView {
     }
     
     func setupView() {
-        addSubview(scrollView)
         addSubview(segmentedView)
         addSubview(listContainerView)
         
@@ -49,9 +48,6 @@ class ShoppingMallView: BaseView {
     }
 
     func setupLayout() {
-        scrollView.snp.makeConstraints { (make) in
-            make.edges.equalToSuperview()
-        }
         segmentedView.snp.makeConstraints { (make) in
             make.top.left.right.equalToSuperview()
             if segmentedDataSource.titles.count > 1 {
@@ -70,12 +66,6 @@ class ShoppingMallView: BaseView {
         }
     }
     
-    lazy var scrollView : UIScrollView = {
-        let scrollView = UIScrollView()
-        scrollView.contentSize = self.bounds.size
-        return scrollView
-    }()
-    
     //1.初始化JXSegmentedView
     lazy var segmentedView: JXSegmentedView = {
         let segmentedView = JXSegmentedView()

+ 18 - 12
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallViewController.swift

@@ -24,7 +24,12 @@ class ShoppingMallViewController: BaseViewController {
     override func setupViews() {
         super.setupViews()
         navigationBar.addSubview(navigationBarView)
-        view.addSubview(shoppingMallView)
+//        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle1(iconStr: "page06", titleStr: "网络有误,请重新加载", buttonStr: "重新加载", buttonActionBlock: {
+//            [weak self] in
+//            self?.cmsTemplateSetTemplateNameApi()
+//        })
+//        emptyView.contentViewY = kScaleValue(value: 100) + kNavBarTotalHeight
+//        view.ly_emptyView = emptyView
         
     }
 
@@ -33,10 +38,6 @@ class ShoppingMallViewController: BaseViewController {
             make.top.equalToSuperview().offset(kSafeStatusBarHeight)
             make.left.right.bottom.equalToSuperview()
         }
-        shoppingMallView.snp.makeConstraints { (make) in
-            make.bottom.left.right.equalToSuperview()
-            make.top.equalTo(kNavBarTotalHeight)
-        }
     }
     
     override func setupData() {
@@ -82,10 +83,8 @@ class ShoppingMallViewController: BaseViewController {
             self?.navigationController?.pushViewController(vc, animated: true)
         }).disposed(by: disposeBag)
         
-        shoppingMallView.scrollView.addHeaderWithHeader(withBeginRefresh: true, animation: false) { (page) in
-            //请求模板
-            self.cmsTemplateSetTemplateNameApi()
-        }
+        /// 请求模板
+        self.cmsTemplateSetTemplateNameApi()
     }
     
     func pushVCCMSRule(cmsRuleModel:CMSRuleModel?,areaType:String) {
@@ -114,18 +113,25 @@ class ShoppingMallViewController: BaseViewController {
     }()
 
     private lazy var shoppingMallView: ShoppingMallView = {
-         let shoppingMallView = ShoppingMallView()
+        let shoppingMallView = ShoppingMallView()
+        view.addSubview(shoppingMallView)
         return shoppingMallView
     }()
     
     /// 请求模板
      private func cmsTemplateSetTemplateNameApi() {
-        SwiftMoyaNetWorkServiceCMS.shared().cmsTemplateSetTemplateNameApi {
+        SwiftMoyaNetWorkServiceCMS.shared().cmsTemplateSetTemplateNameApi(completion: {
             [weak self] (cmsTemplateModels) -> (Void) in
             let cmsTemplateModels = cmsTemplateModels as! Array<CMSTemplateModel>
+//            self?.view.ly_hideEmpty()
+            self?.shoppingMallView.snp.makeConstraints { (make) in
+                make.bottom.left.right.equalToSuperview()
+                make.top.equalTo(kNavBarTotalHeight)
+            }
             self?.shoppingMallView.cmsTemplateModels = cmsTemplateModels
+        }) { [weak self] () -> (Void) in
+//            self?.view.ly_showEmpty()
         }
     }
-
 }
 

+ 7 - 1
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift

@@ -25,15 +25,21 @@ class SwiftMoyaNetWorkServiceCMS: NSObject {
     /// 数据回调
     typealias apiCallBack = (Any) -> (Void)
     
+    /// 数据回调
+    typealias apiFalseCallBack = () -> (Void)
+    
     /// 获取模板名称
     ///
     /// - Parameter completion: 完成
-    func cmsTemplateSetTemplateNameApi(completion: @escaping apiCallBack) {
+    func cmsTemplateSetTemplateNameApi(completion: @escaping apiCallBack,falseCompletion: @escaping apiFalseCallBack) {
         var parameters = Dictionary<String,Any>()
         let loacationModel = LocationModel.shared().getLocationModel()
         let baiduToCityModel = BaiduToCityFactory.shared.query(bjcityId: loacationModel!.cityCode)
         parameters.updateValue(baiduToCityModel.areaCode, forKey: "city_id")
         SwiftProgressHUD.shared().showWait()
+        SwiftMoyaNetWorkManager.shared().falseCallback = {
+            falseCompletion()
+        }
         SwiftMoyaNetWorkManager.shared().requestArray(CMSTemplateModel.self,target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateSetTemplateName(parameters: parameters))) {
             (cmsTemplateModels) in
             SwiftProgressHUD.shared().hide()

+ 0 - 2
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaNetWorkServiceConfig.swift

@@ -22,8 +22,6 @@ class SwiftMoyaNetWorkServiceConfig: NSObject {
     /// 数据回调
     typealias apiCallBack = (Any) -> (Void)
     
-
-    
     /// 前端config配置
     ///
     /// - Parameter completion: 回调

+ 4 - 2
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceUser/SwiftMoyaNetWorkServiceUser.swift

@@ -530,14 +530,16 @@ public class SwiftMoyaNetWorkServiceUser: NSObject {
     func userSetDeliverTypeApi(deliveryMethodType:String = "2",completion: @escaping apiCallBack) {
         var parameters = Dictionary<String,Any>()
         let model = DeliveryMethodTypeModel.shared().getModel()
-        model?.deliveryMethodType = deliveryMethodType
-        DeliveryMethodTypeModel.shared().setModel(model: model!)
         parameters.updateValue(model?.deliveryMethodType ?? "2", forKey: "deliver_type")
         SwiftProgressHUD.shared().showWait()
         SwiftMoyaNetWorkManager.shared().request(target: MultiTarget(SwiftMoyaServiceUserApi.userSetDeliverType(parameters: parameters))) {
             (rootModel) in
             let rootModel = rootModel as! RootModel
             SwiftProgressHUD.shared().showText(rootModel.msg!)
+            
+            // 设置成功更新本地存储数据
+            model?.deliveryMethodType = deliveryMethodType
+            DeliveryMethodTypeModel.shared().setModel(model: model!)
             completion("")
         }
     }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

@@ -18,7 +18,7 @@ public func kApiDataPrefix() -> String {
     if kDevelopSever /** 接口前缀-开发服务器*/ {
         return "https://api.dev.caihongxingqiu.com"
     } else if kTestSever /** 接口前缀-测试服务器*/{
-        return ""
+        return "https://api.dev.caihongxingqiu.com/beta"
     }else if kProductSever /** 接口前缀-生产服务器*/ {
         return ""
     }else {

+ 23 - 13
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkManager.swift

@@ -33,9 +33,7 @@ private let myEndpointClosure = { (target: MultiTarget) -> Endpoint in
         method: target.method,
         task: task,
         httpHeaderFields: target.headers
-    )
-    requestTimeOut = 10//每次请求都会调用endpointClosure 到这里设置超时时长 也可单独每个接口设置
-    
+    )    
     return endpoint
 }
 
@@ -84,8 +82,12 @@ private let provider = MoyaProvider<MultiTarget>(endpointClosure: myEndpointClos
 /// 用get方法是因为这样才会在获取isNetworkConnect时实时判断网络链接请求,如有更好的方法可以fork
 private var isNetworkConnect: Bool {
     get{
-        let network = NetworkReachabilityManager()
-        return network?.isReachable ?? true //无返回就默认网络已连接
+        if !AlamofireReachabilityManager.shared.isNetworkConnect() {
+            SwiftProgressHUD.shared().hide()
+            return false
+        }else {
+            return true
+        }
     }
 }
 
@@ -129,9 +131,12 @@ public class SwiftMoyaNetWorkManager: NSObject {
     func request<T: BaseMappable>(_ type: T.Type ,target: MultiTarget,isCustomAlert:Bool = false,completion: @escaping successCallTBack) -> Void {
         //判断是否链接网络
         if !isNetworkConnect{
-             SwiftProgressHUD.shared().showError("网络链接失败,请检查网络")
+            if let falseCallback = self.falseCallback  {
+                falseCallback()
+            }
             return
         }
+        
 
         provider.rx
             .request(target)
@@ -167,7 +172,9 @@ public class SwiftMoyaNetWorkManager: NSObject {
     func requestArray<T: BaseMappable>(_ type: T.Type ,target: MultiTarget,isCustomAlert:Bool = false,completion: @escaping successCallArrayTback) -> Void {
         //判断是否链接网络
         if !isNetworkConnect{
-            SwiftProgressHUD.shared().showError("网络链接失败,请检查网络")
+            if let falseCallback = self.falseCallback  {
+                falseCallback()
+            }
             return
         }
         
@@ -251,8 +258,9 @@ public class SwiftMoyaNetWorkManager: NSObject {
     func request(target: MultiTarget,isCustomAlert:Bool = false,completion: @escaping successCallback) -> Void {
         //判断是否链接网络
         if !isNetworkConnect{
-            SwiftProgressHUD.shared().showText("网络链接失败,请检查网络")
-
+            if let falseCallback = self.falseCallback  {
+                falseCallback()
+            }
             return
         }
 
@@ -281,8 +289,9 @@ public class SwiftMoyaNetWorkManager: NSObject {
     func requestValue(target: MultiTarget,completion: @escaping successCallback) -> Void {
         //判断是否链接网络
         if !isNetworkConnect{
-            SwiftProgressHUD.shared().showText("网络链接失败,请检查网络")
-            
+            if let falseCallback = self.falseCallback  {
+                falseCallback()
+            }
             return
         }
         
@@ -311,8 +320,9 @@ public class SwiftMoyaNetWorkManager: NSObject {
     func requestArray(target: MultiTarget,completion: @escaping successCallArrayback) -> Void {
         //判断是否链接网络
         if !isNetworkConnect{
-            SwiftProgressHUD.shared().showText("网络链接失败,请检查网络")
-            
+            if let falseCallback = self.falseCallback  {
+                falseCallback()
+            }
             return
         }
         

+ 3 - 0
RainbowPlanet/RainbowPlanet/Tools/EmptyView/EmptyView.swift

@@ -24,6 +24,7 @@ class EmptyView: NSObject {
         let vertLayout = TGLinearLayout(.vert)
         vertLayout.tg_height.equal(.wrap)
         vertLayout.tg_width.equal(kScreenWidth-kScaleValue(value: 40))
+        vertLayout.isUserInteractionEnabled = true
 
         let iconImageView = UIImageView(image: UIImage(named: iconStr))
         iconImageView.tg_centerX.equal(0)
@@ -49,6 +50,7 @@ class EmptyView: NSObject {
         button.masksToBounds = true
         button.titleLabel?.font = kScaleRegularFont16
         button.setTitle(buttonStr, for: UIControl.State.normal)
+        button.isUserInteractionEnabled = false
         button.tg_top.equal(kScaleValue(value: 30))
         button.tg_height.equal(kScaleValue(value: 36))
         button.tg_centerX.equal(0)
@@ -59,6 +61,7 @@ class EmptyView: NSObject {
         vertLayout.addSubview(button)
 
         let emptyView = LYEmptyView.emptyView(withCustomView: vertLayout)
+        emptyView?.isUserInteractionEnabled = true
         return emptyView!        
     }