nanxinlin 6 年之前
父節點
當前提交
7fb129fc1a
共有 22 個文件被更改,包括 182 次插入45 次删除
  1. 3 0
      RainbowPlanet/Podfile
  2. 5 1
      RainbowPlanet/Podfile.lock
  3. 14 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  4. 1 1
      RainbowPlanet/RainbowPlanet.xcodeproj/xcshareddata/xcschemes/RainbowPlanet.xcscheme
  5. 5 0
      RainbowPlanet/RainbowPlanet/Define/CacheMacro.swift
  6. 2 2
      RainbowPlanet/RainbowPlanet/Manager/MapManager/BaiduMapManager.swift
  7. 6 6
      RainbowPlanet/RainbowPlanet/Manager/MapManager/LocationModel.swift
  8. 1 1
      RainbowPlanet/RainbowPlanet/Manager/UMManager/UMManager.swift
  9. 7 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallViewController.swift
  10. 4 6
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaNetWorkManager.swift
  11. 99 0
      RainbowPlanet/RainbowPlanet/Service/SwiftSign/SwiftSign.swift
  12. 0 23
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/Contents.json
  13. 二進制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/navigaitionbar_back_white.png
  14. 二進制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/navigaitionbar_back_white@2x.png
  15. 二進制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/navigaitionbar_back_white@3x.png
  16. 1 1
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/icon.imageset/Contents.json
  17. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/CommonModule.xcassets/Contents.json
  18. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/MineModule.xcassets/Contents.json
  19. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RegisterLoginModule.xcassets/Contents.json
  20. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingCartModule.xcassets/Contents.json
  21. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/Contents.json
  22. 4 4
      RainbowPlanet/RainbowPlanet/Tools/WKWebView/WebView.swift

+ 3 - 0
RainbowPlanet/Podfile

@@ -48,6 +48,9 @@ target 'RainbowPlanet' do
   # 存储数据Keychain
   pod 'KeychainAccess'
 
+  # 加密
+  pod 'CryptoSwift'
+
   #======================第三方平台===========
   #======================友盟===========
   # UM基础库

+ 5 - 1
RainbowPlanet/Podfile.lock

@@ -4,6 +4,7 @@ PODS:
   - AMapLocation (2.6.1):
     - AMapFoundation (~> 1.4)
   - BMKLocationKit (1.5.0)
+  - CryptoSwift (0.15.0)
   - DeviceKit (1.12.0)
   - EFQRCode (4.5.0):
     - swift_qrcodejs (~> 1.0.1)
@@ -93,6 +94,7 @@ DEPENDENCIES:
   - Alamofire
   - AMapLocation
   - BMKLocationKit
+  - CryptoSwift
   - DeviceKit
   - EFQRCode
   - FSPagerView
@@ -132,6 +134,7 @@ SPEC REPOS:
     - AMapFoundation
     - AMapLocation
     - BMKLocationKit
+    - CryptoSwift
     - DeviceKit
     - EFQRCode
     - FBRetainCycleDetector
@@ -172,6 +175,7 @@ SPEC CHECKSUMS:
   AMapFoundation: 20fce2a12cd152e1092afdd04379cdac21932185
   AMapLocation: cf024b53dc03663efb4ea4bcce27d4cce58bb97a
   BMKLocationKit: 40d267478acd8704ddebd0e9deaddc727b13df9f
+  CryptoSwift: 769f58a9e89f64e8796c2e59ce5f002dc81a2438
   DeviceKit: f5dbd2e70cafd420d6a09379b8800cdf5fe92ba5
   EFQRCode: 842f431e660da841f518993af8f4cbd275601d84
   FBRetainCycleDetector: 46f8179bbb1c587deee3ea838a1a3ee02acf5015
@@ -207,6 +211,6 @@ SPEC CHECKSUMS:
   UMCSecurityPlugins: 0831a08f3988f3cea9f1d3a7626cd9bee4fef150
   UMCShare: 552b29753f1b4da87b51d96545ed19e6263df397
 
-PODFILE CHECKSUM: e96950f67b21f44b7b089f915b956870a944526c
+PODFILE CHECKSUM: 84cd3ee56591b3f6e142ff210f711b4531001b2c
 
 COCOAPODS: 1.5.3

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

@@ -81,6 +81,7 @@
 		A7541500224BC02F002480B5 /* AMapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75414FF224BC02F002480B5 /* AMapManager.swift */; };
 		A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7541501224C5ECA002480B5 /* BaiduMapManager.swift */; };
 		A7541504224C609A002480B5 /* AMapLocationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7541503224C609A002480B5 /* AMapLocationModel.swift */; };
+		A754150F224CACF9002480B5 /* SwiftSign.swift in Sources */ = {isa = PBXBuildFile; fileRef = A754150B224CACF9002480B5 /* SwiftSign.swift */; };
 		A76390EB2248E27A0067EEE0 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A76390EA2248E27A0067EEE0 /* UserNotifications.framework */; };
 		A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */; };
 		A775CC00223774A300EBDCF8 /* ShoppingMallView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */; };
@@ -224,6 +225,7 @@
 		A75414FF224BC02F002480B5 /* AMapManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMapManager.swift; sourceTree = "<group>"; };
 		A7541501224C5ECA002480B5 /* BaiduMapManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaiduMapManager.swift; sourceTree = "<group>"; };
 		A7541503224C609A002480B5 /* AMapLocationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMapLocationModel.swift; sourceTree = "<group>"; };
+		A754150B224CACF9002480B5 /* SwiftSign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSign.swift; sourceTree = "<group>"; };
 		A76390EA2248E27A0067EEE0 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
 		A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallNavigationBarView.swift; sourceTree = "<group>"; };
 		A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallView.swift; sourceTree = "<group>"; };
@@ -338,6 +340,7 @@
 			children = (
 				A72A73722233966800B21995 /* RootModel */,
 				A72A7380223396CB00B21995 /* SwiftMoyaService */,
+				A7541507224CACF9002480B5 /* SwiftSign */,
 			);
 			path = Service;
 			sourceTree = "<group>";
@@ -601,6 +604,14 @@
 			path = ViewController;
 			sourceTree = "<group>";
 		};
+		A7541507224CACF9002480B5 /* SwiftSign */ = {
+			isa = PBXGroup;
+			children = (
+				A754150B224CACF9002480B5 /* SwiftSign.swift */,
+			);
+			path = SwiftSign;
+			sourceTree = "<group>";
+		};
 		A775CBFC2237483E00EBDCF8 /* View */ = {
 			isa = PBXGroup;
 			children = (
@@ -1203,6 +1214,7 @@
 			inputPaths = (
 				"${SRCROOT}/Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet-frameworks.sh",
 				"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
+				"${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework",
 				"${BUILT_PRODUCTS_DIR}/DeviceKit/DeviceKit.framework",
 				"${BUILT_PRODUCTS_DIR}/EFQRCode/EFQRCode.framework",
 				"${BUILT_PRODUCTS_DIR}/FBRetainCycleDetector/FBRetainCycleDetector.framework",
@@ -1237,6 +1249,7 @@
 			);
 			outputPaths = (
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DeviceKit.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EFQRCode.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBRetainCycleDetector.framework",
@@ -1323,6 +1336,7 @@
 				A72A72B822321DE000B21995 /* Extension+UserDefaults.swift in Sources */,
 				A72A72A222321DE000B21995 /* LBXScanNetAnimation.swift in Sources */,
 				A7778CB82244E97A00C7C47A /* BindPhoneNumberViewController.swift in Sources */,
+				A754150F224CACF9002480B5 /* SwiftSign.swift in Sources */,
 				A72A72D322321E2700B21995 /* CacheMacro.swift in Sources */,
 				A72A72A422321DE000B21995 /* LBXScanViewController.swift in Sources */,
 				A7541504224C609A002480B5 /* AMapLocationModel.swift in Sources */,

+ 1 - 1
RainbowPlanet/RainbowPlanet.xcodeproj/xcshareddata/xcschemes/RainbowPlanet.xcscheme

@@ -62,7 +62,7 @@
       </AdditionalOptions>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "Debug"
+      buildConfiguration = "Release"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

+ 5 - 0
RainbowPlanet/RainbowPlanet/Define/CacheMacro.swift

@@ -8,5 +8,10 @@
 
 import Foundation
 
+
+/// 百度定位
 let kLocationModelCache = "LocationModel"
 
+/// 百度定位
+let kAMapLocationModelCache = "AMapLocationModel"
+

+ 2 - 2
RainbowPlanet/RainbowPlanet/Manager/MapManager/BaiduMapManager.swift

@@ -45,7 +45,7 @@ public class BaiduMapManager: NSObject {
                         self?.locationModel?.city = rgcData.city ?? ""
                         self?.locationModel?.district = rgcData.district ?? ""
                         self?.locationModel?.street = rgcData.street ?? ""
-                        self?.locationModel?.locationDescribe = rgcData.locationDescribe ?? ""
+                        self?.locationModel?.locationdescribe = rgcData.locationDescribe ?? ""
                     }
                     LocationModel.shared().setLocationModel(locationModel: (self?.locationModel!)!)
                 }
@@ -73,7 +73,7 @@ public class BaiduMapManager: NSObject {
                         self?.locationModel?.city = rgcData.city ?? ""
                         self?.locationModel?.district = rgcData.district ?? ""
                         self?.locationModel?.street = rgcData.street ?? ""
-                        self?.locationModel?.locationDescribe = rgcData.locationDescribe ?? ""
+                        self?.locationModel?.locationdescribe = rgcData.locationDescribe ?? ""
                     }
                     LocationModel.shared().setLocationModel(locationModel:  (self?.locationModel!)!)
                 }

+ 6 - 6
RainbowPlanet/RainbowPlanet/Manager/MapManager/LocationModel.swift

@@ -41,7 +41,7 @@ class LocationModel: NSObject,NSCoding {
     ///行政区划编码属性
     var adCode = "610113"
     ///位置语义化结果的定位点在什么地方周围的描述信息
-    var locationDescribe = "在西安北大科技园曲江创客大街园区附近"
+    var locationdescribe = "在西安北大科技园曲江创客大街园区附近"
     
     /// 反归档
     ///
@@ -58,7 +58,7 @@ class LocationModel: NSObject,NSCoding {
         self.streetNumber = aDecoder.decodeObject(forKey: "streetNumber") as? String ?? ""
         self.cityCode = aDecoder.decodeObject(forKey: "cityCode") as? String ?? ""
         self.adCode = aDecoder.decodeObject(forKey: "adCode") as? String ?? ""
-        self.locationDescribe = aDecoder.decodeObject(forKey: "locationDescribe") as? String ?? ""
+        self.locationdescribe = aDecoder.decodeObject(forKey: "locationdescribe") as? String ?? ""
 
     }
 
@@ -77,7 +77,7 @@ class LocationModel: NSObject,NSCoding {
         aCoder.encode(self.streetNumber, forKey:"streetNumber")
         aCoder.encode(self.cityCode, forKey:"cityCode")
         aCoder.encode(self.adCode, forKey:"adCode")
-        aCoder.encode(self.locationDescribe, forKey:"locationDescribe")
+        aCoder.encode(self.locationdescribe, forKey:"locationdescribe")
 
     }
 
@@ -88,7 +88,7 @@ class LocationModel: NSObject,NSCoding {
         //实例对象转换成Data
         let modelData = NSKeyedArchiver.archivedData(withRootObject: locationModel)
         //存储Data对象
-        UserDefaults.standard.set(modelData, forKey: "LocationModel")
+        UserDefaults.standard.set(modelData, forKey: kLocationModelCache)
     }
 
 
@@ -97,7 +97,7 @@ class LocationModel: NSObject,NSCoding {
     /// - Returns: 定位模型
     func getLocationModel() -> LocationModel? {
         //自定义对象读取
-        let modelData = UserDefaults.standard.data(forKey: "LocationModel")
+        let modelData = UserDefaults.standard.data(forKey: kLocationModelCache)
         var locationModel = LocationModel()
         if modelData != nil {
             locationModel = NSKeyedUnarchiver.unarchiveObject(with: modelData!) as! LocationModel
@@ -112,7 +112,7 @@ class LocationModel: NSObject,NSCoding {
             self.city +
             self.district +
             self.street +
-            self.locationDescribe
+            self.locationdescribe
         NXLLog(str)
     }
 

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

@@ -49,7 +49,7 @@ public extension UMManager {
         //打开加密传输
         UMConfigure.setEncryptEnabled(true)
         //设置打开日志
-        UMConfigure.setLogEnabled(true)
+        UMConfigure.setLogEnabled(false)
         //设置Key
         UMConfigure.initWithAppkey(kUMengAppKey, channel: "App Store")
 

+ 7 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallViewController.swift

@@ -23,6 +23,13 @@ class ShoppingMallViewController: BaseViewController {
 
     override func viewDidLoad() {
         super.viewDidLoad()
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue("", forKey: "city")
+        parameters.updateValue(0, forKey: "bity")
+        parameters.updateValue(false, forKey: "dity")
+        parameters.updateValue(NSNull(), forKey: "dity")
+        parameters.updateValue("曲江创客大街四楼", forKey: "address")
+        _ = SwiftSign.shared().sign(parameters: parameters)
         setupViews()
         setupLayouts()
     }

+ 4 - 6
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaNetWorkManager.swift

@@ -14,6 +14,7 @@ import ObjectMapper
 import RxAtomic
 import RxSwift
 import RxCocoa
+
 /// 超时时长
 private var requestTimeOut:Double = 20
 
@@ -66,12 +67,10 @@ private let networkPlugin = NetworkActivityPlugin.init { (changeType, targetType
         DispatchQueue.main.async(execute: { () -> Void in
             UIApplication.shared.isNetworkActivityIndicatorVisible = true
         })
-        NXLLog("==================================================================");
     case .ended:
         DispatchQueue.main.async(execute: { () -> Void in
             UIApplication.shared.isNetworkActivityIndicatorVisible = false
         })
-        NXLLog("==================================================================");
     }
 }
 
@@ -127,9 +126,7 @@ public class SwiftMoyaNetWorkManager: NSObject {
             .observeOn(MainScheduler.instance)
             .subscribe(onSuccess: {
                 [weak self] (response) in
-                self?.getResponseStatusCode(response: response, completion: { (data) in
-                    completion(data)
-                })
+                self?.getResponseStatusCode(response: response, completion: completion)
             }) {
                 [weak self] (error) in
                 if let falseCallback = self?.falseCallback  {
@@ -149,7 +146,7 @@ public class SwiftMoyaNetWorkManager: NSObject {
     private func getResponseStatusCode(response:Response, completion: @escaping successCallback) -> Void {
         let json = try? JSON(response.mapJSON())
         if json != nil {
-            NXLLog("\nstatusCode=\(response.statusCode)\njson未解密=\n\(json!.description)");
+            NXLLog("\nstatusCode=\(response.statusCode)\njson=\n\(json!.description)");
         }
         if response.statusCode == 200 {
             let  json = JSON(parseJSON: json!.description)
@@ -202,3 +199,4 @@ public class SwiftMoyaNetWorkManager: NSObject {
         }
     }
 }
+

+ 99 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftSign/SwiftSign.swift

@@ -0,0 +1,99 @@
+//
+//  SwiftSign.swift
+//  CreaditPayment
+//
+//  Created by 南鑫林 on 2018/11/17.
+//  Copyright © 2018 南鑫林. All rights reserved.
+//
+
+import UIKit
+import SwiftyJSON
+import CryptoSwift
+
+public class SwiftSign: NSObject {
+
+    private static let _sharedInstance = SwiftSign()
+
+    class func shared() -> SwiftSign {
+        return _sharedInstance
+    }
+
+    private override init() {} // 私有化init方法
+
+    /// 验签
+    ///
+    /// - Parameter parameters: 需要加密的参数
+    /// - Returns: data字符串
+    public func sign(parameters: Dictionary<String,Any>) -> String {
+        
+        //第一步拼装map 1. 排序 2.转换字符串
+        let jsonStr = getJsonString(parameters: parameters)
+
+        //第二班步生成sign  strtoupper(md5(param.access_token))
+        let sign = getSign(jsonStr: jsonStr)
+        return sign
+    }
+    
+    // MARK: - 第一步拼装map 1. 排序 2.转换字符串 提交给服务端参数,统一删除参数组中所有等值为FALSE的参数(包括:NULL, 空字符串,0, false)
+    private func getJsonString(parameters:Dictionary<String,Any>) -> String {
+        if(!JSONSerialization.isValidJSONObject(parameters)) {
+            return ""
+        }
+
+        if parameters.isEmpty {
+            return ""
+        }
+
+        let sortedKeysAndValues = parameters.sorted { (t1, t2) -> Bool in
+            return t1.0 < t2.0
+        }
+
+        var namedPaird = [String]()
+        for(key, value) in sortedKeysAndValues {
+
+            if value is String { //空字符串
+                let value = value as! String
+                if value == "" {
+                    continue
+                }
+            }
+
+            if value is Bool { //false
+                let value = value as! Bool
+                if !value {
+                    continue
+                }
+            }
+
+            if value is Int {//0
+                let value = value as! Int
+                if value == 0 {
+                    continue
+                }
+            }
+
+            if value is NSNull {//NULL
+                continue
+            }
+
+            namedPaird.append("\"\(key)\":\"\(value)\"")
+        }
+        let access_token = "xxxxxxxxxx"
+        if !access_token.isEmpty {
+            namedPaird.append("\"access_token\":\"\(access_token)\"")
+        }
+        var returnString = namedPaird.joined(separator:",")
+        returnString = "{\(returnString)}"
+        let jsonStr = JSON(returnString).description.description
+        NXLLog(jsonStr)
+        return jsonStr
+    }
+    
+    // MARK: - 第二班步生成sign  strtoupper(md5(param.access_token))
+    private func getSign(jsonStr:String) -> String {
+        let sign = jsonStr.md5().uppercased()
+        NXLLog(sign)
+        return sign
+    }
+
+}

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

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

二進制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/navigaitionbar_back_white.png


二進制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/navigaitionbar_back_white@2x.png


二進制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navigaitionbar_back_white.imageset/navigaitionbar_back_white@3x.png


+ 1 - 1
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/icon.imageset/Contents.json

@@ -2,11 +2,11 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "icon.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
+      "filename" : "icon.png",
       "scale" : "2x"
     },
     {

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

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

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

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

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

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

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

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

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

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

+ 4 - 4
RainbowPlanet/RainbowPlanet/Tools/WKWebView/WebView.swift

@@ -126,7 +126,7 @@ class WebView: UIView {
     public func run_JavaScript(javaScript:String?) {
         if let javaScript = javaScript {
             webView.evaluateJavaScript(javaScript) { result,error in
-                print(error ?? "")
+                NXLLog(error ?? "" as! Error)
                 self.delegate?.webViewEvaluateJavaScript(result, error: error)
             }
         }
@@ -187,7 +187,7 @@ class WebView: UIView {
                 progressView.alpha = 0.0
                 progressView .setProgress(0.0, animated: false)
             }
-            print(webView.estimatedProgress)
+            NXLLog(webView.estimatedProgress)
         }
     }
 }
@@ -266,13 +266,13 @@ extension WebView: WKNavigationDelegate{
     //跳转失败的时候调用
     func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
         self.delegate?.webView(webView, didFail: navigation, withError: error)
-        print(error)
+        NXLLog(error)
     }
     // 内容加载失败时候调用
     func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
         self.delegate?.webView(webView, didFailProvisionalNavigation: navigation, withError: error)
         progressView.isHidden = true
-        print(error)
+        NXLLog(error)
     }
     
     // 打开新窗口委托