Browse Source

Merge branch 'develop' of http://git.caihongxingqiu.net/rainbow/platform-ios into develop

Chris 5 years ago
parent
commit
6a3eb18d89
37 changed files with 77 additions and 118 deletions
  1. 1 1
      RainbowPlanet/Podfile
  2. 1 5
      RainbowPlanet/Podfile.lock
  3. 4 0
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  4. 11 12
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift
  5. 1 0
      RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseLottieAnimateContentView.swift
  6. 33 0
      RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabBarItemContentView.swift
  7. 9 13
      RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift
  8. 1 1
      RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h
  9. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift
  10. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/MessageMainViewController.swift
  11. 3 3
      RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/ViewController/AccountSecurityViewController.swift
  12. 1 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCrop/View/AliyunCropViewBottomView.m
  13. 0 1
      RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishManager/PublishUploadManager.swift
  14. 2 1
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/BindPhoneNumber/ViewController/BindPhoneNumberViewController.swift
  15. 5 10
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/ViewController/RegisterLoginViewController.swift
  16. 3 2
      RainbowPlanet/RainbowPlanet/Router/RegisterLoginRouterModuleType.swift
  17. 0 22
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_download.imageset/Contents.json
  18. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_download.imageset/edit_pic_download@2x.png
  19. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_download.imageset/edit_pic_download@3x.png
  20. 0 22
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_moments.imageset/Contents.json
  21. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_moments.imageset/edit_pic_moments@2x.png
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_moments.imageset/edit_pic_moments@3x.png
  23. 0 22
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_wechat.imageset/Contents.json
  24. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_wechat.imageset/edit_pic_wechat@2x.png
  25. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_wechat.imageset/edit_pic_wechat@3x.png
  26. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_download.imageset/edit_pic_download@2x.png
  27. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_download.imageset/edit_pic_download@3x.png
  28. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_link.imageset/Contents.json
  29. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_link.imageset/edit_pic_link@2x.png
  30. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_link.imageset/edit_pic_link@3x.png
  31. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_moments.imageset/edit_pic_moments@2x.png
  32. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_moments.imageset/edit_pic_moments@3x.png
  33. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_sina.imageset/Contents.json
  34. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_sina.imageset/edit_pic_sina@2x.png
  35. 0 0
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_sina.imageset/edit_pic_sina@3x.png
  36. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_wechat.imageset/edit_pic_wechat@2x.png
  37. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_wechat.imageset/edit_pic_wechat@3x.png

+ 1 - 1
RainbowPlanet/Podfile

@@ -44,7 +44,7 @@ target 'RainbowPlanet' do
   # 小红点
   pod 'PPBadgeViewSwift'
   # 动画效果
-  pod 'pop'
+#  pod 'pop'
   # pop动画
   pod 'FWPopupView'
   # 存储数据Keychain

+ 1 - 5
RainbowPlanet/Podfile.lock

@@ -58,7 +58,6 @@ PODS:
     - Moya/Core
     - RxSwift (~> 4.0)
   - ObjectMapper (3.5.1)
-  - pop (1.0.12)
   - PPBadgeViewSwift (3.1.0)
   - QuCore-ThirdParty (3.10.0)
   - Result (4.1.0)
@@ -129,7 +128,6 @@ DEPENDENCIES:
   - MLeaksFinder
   - Moya/RxSwift
   - ObjectMapper
-  - pop
   - PPBadgeViewSwift
   - QuCore-ThirdParty
   - RxCocoa
@@ -184,7 +182,6 @@ SPEC REPOS:
     - MLeaksFinder
     - Moya
     - ObjectMapper
-    - pop
     - PPBadgeViewSwift
     - QuCore-ThirdParty
     - Result
@@ -237,7 +234,6 @@ SPEC CHECKSUMS:
   MLeaksFinder: 8c435bd2f6d070af18cff082b503b21adc130fc0
   Moya: f4a4b80ff2f8a4ffc208dfb31cd91636622fee6e
   ObjectMapper: 70187b8941977c62ccfb423caf6b50be405cabf0
-  pop: d582054913807fd11fd50bfe6a539d91c7e1a55a
   PPBadgeViewSwift: 18a219a9897f418342c22dd1a54f7b18ac56546b
   QuCore-ThirdParty: 60a6f08864631569569fa1e2c6208a7746698923
   Result: bd966fac789cc6c1563440b348ab2598cc24d5c7
@@ -258,6 +254,6 @@ SPEC CHECKSUMS:
   YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
   ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966
 
-PODFILE CHECKSUM: a3a9e9aac1a6f67c23d361f7e4e0de1b154b233f
+PODFILE CHECKSUM: 61302a018e8ab6f53eaeab9932dedca81a9bb160
 
 COCOAPODS: 1.7.4

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

@@ -425,6 +425,7 @@
 		A7DAB33522D8D3AC005B964E /* RegisterLoginRouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DAB33422D8D3AC005B964E /* RegisterLoginRouterModuleType.swift */; };
 		A7DAB33922DC2B83005B964E /* ShareRouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DAB33822DC2B83005B964E /* ShareRouterModuleType.swift */; };
 		A7DC467F22783A47001F3EFC /* EditExpressAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */; };
+		A7DC8EC122EF1C82004EEBE9 /* BaseTabBarItemContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DC8EC022EF1C82004EEBE9 /* BaseTabBarItemContentView.swift */; };
 		A7DF50D622A4E8B400998908 /* OrderDetailProductTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D522A4E8B400998908 /* OrderDetailProductTableViewCell.swift */; };
 		A7DF50D822A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */; };
 		A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */; };
@@ -1142,6 +1143,7 @@
 		A7DAB33422D8D3AC005B964E /* RegisterLoginRouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterLoginRouterModuleType.swift; sourceTree = "<group>"; };
 		A7DAB33822DC2B83005B964E /* ShareRouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareRouterModuleType.swift; sourceTree = "<group>"; };
 		A7DC467E22783A47001F3EFC /* EditExpressAddressTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditExpressAddressTableViewCell.swift; sourceTree = "<group>"; };
+		A7DC8EC022EF1C82004EEBE9 /* BaseTabBarItemContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTabBarItemContentView.swift; sourceTree = "<group>"; };
 		A7DF50D522A4E8B400998908 /* OrderDetailProductTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderDetailProductTableViewCell.swift; sourceTree = "<group>"; };
 		A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailEvaluationImageCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesViewController.swift; sourceTree = "<group>"; };
@@ -3144,6 +3146,7 @@
 			children = (
 				A77F2CC9223209F2001BD3F6 /* BaseTabbarViewController.swift */,
 				A78CEE0922E0864100C512A4 /* BaseLottieAnimateContentView.swift */,
+				A7DC8EC022EF1C82004EEBE9 /* BaseTabBarItemContentView.swift */,
 			);
 			path = BaseTabbarViewController;
 			sourceTree = "<group>";
@@ -6540,6 +6543,7 @@
 				A7D07CBF22B73EE600186014 /* UserPersonalCenterViewController.swift in Sources */,
 				BD27F0AD22CC5E4D00A6514D /* CommunityVideoListController.swift in Sources */,
 				A7CC753C2271C177003C4F38 /* AddressManagerSelfMentionTableViewCell.swift in Sources */,
+				A7DC8EC122EF1C82004EEBE9 /* BaseTabBarItemContentView.swift in Sources */,
 				A7FF1587228C851100A85748 /* OrderDetailInfoTableViewCell.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 11 - 12
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate+Window.swift

@@ -28,6 +28,15 @@ extension AppDelegate {
         DeliveryMethodTypeModel.shared().setModel(model: deliveryMethodTypeModel)
         //基础配置
         SwiftMoyaNetWorkServiceConfig.shared().configApi {(data) -> (Void) in}
+        //设置Tabbar
+        setTabbarController()
+        /// 引导页
+        setGuidePageView()
+    }
+    
+    /// 设置Tabbar
+    func setTabbarController() {
+        setTabbarViewBarNil()
         /// 判断初始化页面
         if (UserModel.shared().getModel()?.token) != nil { //是否已经登录
             SwiftMoyaNetWorkServiceUser.shared().userRefreshApi {
@@ -37,24 +46,14 @@ extension AppDelegate {
                 }else if (UserModel.shared().getModel()?.gender == 1 || UserModel.shared().getModel()?.gender == 2) && UserModel.shared().getModel()?.isFollowSuggestTopic == 0  { //设置话题
                     self?.setTopicViewController()
                 }else {// 进入首页
-                    self?.setTabbarController()
+                    self?.window?.rootViewController = BaseTabbarViewController.shared.tabBarViewController()
                     //获取消息的小红点
                     MessageModuleManager.shared.userMemberMessageIndexApi()
                 }
             }
-            
         }else {// 进入首页
-            setTabbarController()
+            self.window?.rootViewController = BaseTabbarViewController.shared.tabBarViewController()
         }
-        
-        /// 引导页
-        setGuidePageView()
-    }
-    
-    /// 设置Tabbar
-    func setTabbarController() {
-        setTabbarViewBarNil()
-        self.window?.rootViewController = BaseTabbarViewController.shared.tabBarViewController()
     }
     
     func setTabbarViewBarNil() {

+ 1 - 0
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseLottieAnimateContentView.swift

@@ -10,6 +10,7 @@ import UIKit
 import ESTabBarController_swift
 import Lottie
 
+
 class BaseLottieAnimateContentView: ESTabBarItemContentView {
     
     let animationView = AnimationView()

+ 33 - 0
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabBarItemContentView.swift

@@ -0,0 +1,33 @@
+//
+//  File.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/29.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import Foundation
+
+import UIKit
+import ESTabBarController_swift
+
+
+class BaseTabBarItemContentView: ESTabBarItemContentView {
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+    }
+    
+    init(jsonStr:String) {
+        self.init()
+        
+        textColor = k666666Color
+        highlightTextColor = k333333Color
+        
+    }
+    public required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    
+}

+ 9 - 13
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -122,10 +122,9 @@ class BaseTabbarViewController: NSObject {
         v3.tabBarItem.imageInsets =  UIEdgeInsets(top: 4, left: 0, bottom: -4, right: 0);
         
         if UserModel.isTokenNil() {
-            v4.tabBarItem = UITabBarItem(title: "消息", image: UIImage(named: "tabbar_massage")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage: UIImage(named: "tabbar_massage")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal))
-            setTabBarItem(tabBarItem: v4.tabBarItem)
-            v5.tabBarItem = UITabBarItem(title: "我的", image: UIImage(named: "tabbar_my")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal), selectedImage: UIImage(named: "tabbar_my")?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal))
-            setTabBarItem(tabBarItem: v5.tabBarItem)
+
+            v4.tabBarItem = ESTabBarItem.init(BaseTabBarItemContentView(), title: "消息", image: UIImage(named: "tabbar_massage"), selectedImage: nil)
+            v5.tabBarItem = ESTabBarItem.init(BaseTabBarItemContentView(), title: "我的", image: UIImage(named: "tabbar_my"), selectedImage: nil)
 
         }else {
             v4.tabBarItem = ESTabBarItem.init(lottieAnimateContentView4, title: "消息", image: UIImage(named: "tabbar_massage"), selectedImage: nil)
@@ -144,9 +143,12 @@ class BaseTabbarViewController: NSObject {
         setBadge()
         NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: OperationQueue.main, using: {
             [weak self] (notification) in
-            //获取消息的小红点
-            MessageModuleManager.shared.userMemberMessageIndexApi()
-            self?.setBadge()
+            if !UserModel.isTokenNil() {
+                //获取消息的小红点
+                MessageModuleManager.shared.userMemberMessageIndexApi()
+                self?.setBadge()
+            }
+
         })
         //监听消息
         NotificationCenter.default.addObserver(forName: NSNotification.Name("MessageMainViewController"), object: nil, queue: OperationQueue.main) {
@@ -223,10 +225,4 @@ class BaseTabbarViewController: NSObject {
         }
     }
     
-    //设置没有登录状态的tabbar
-    func setTabBarItem(tabBarItem:UITabBarItem) {
-        tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor:k666666Color], for: UIControl.State.normal)
-        tabBarItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor:k666666Color], for: UIControl.State.selected)
-
-    }
 }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Macro/RainbowPlanet-Bridging-Header.h

@@ -35,7 +35,7 @@
 #import "YYLabel.h"
 
 #import "FMDB.h"
-#import "POP.h"
+//#import "POP.h"
 
 //友盟
 #import <UMCommon/UMCommon.h>

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift

@@ -159,7 +159,7 @@ extension CommunityVideoListController: UICollectionViewDelegateFlowLayout,UICol
     }
     
     func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return videoItemList.count ?? 0
+        return videoItemList.count 
     }
     
     func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MessageModule/MessageMain/ViewController/MessageMainViewController.swift

@@ -84,7 +84,7 @@ extension MessageMainViewController {
             [weak self] (messageIndexModel) -> (Void) in
             self?.messageIndexModel = messageIndexModel as? MessageIndexModel
             self?.collectionView.reloadData()
-//            self?.setTabBarItemBadge()
+            self?.setTabBarItemBadge()
             MJRefreshManager.hiddenHeaderWithFooter(collectionView: self?.collectionView)
         }) {
             [weak self] loadingStauts in

+ 3 - 3
RainbowPlanet/RainbowPlanet/Modules/MineModule/AccountSecurity/ViewController/AccountSecurityViewController.swift

@@ -76,12 +76,12 @@ class AccountSecurityViewController: BaseViewController {
     /// - Parameter userModel: 用户
     func setMobile(userModel:UserModel?) {
         if userModel?.mobile == nil ||  userModel?.mobile == "" {
-            Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .accountSecurityBindMobile))
+            Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .accountSecurityBindMobile, userModel: UserModel.shared().getModel()!))
         }else {
             AlertSheetView.alert(title: "确认更换您的手机号", cancelTitle: "取消", sureTitle: "确认", cancelBlock: { (popupView, index, string) in
                 
             }) {(popupView, index, string) in
-                Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .accountSecurityBindMobile))
+                Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .accountSecurityBindMobile, userModel: UserModel.shared().getModel()!))
             }
         }
     }
@@ -111,7 +111,7 @@ class AccountSecurityViewController: BaseViewController {
     ///   - userModel: 用户
     func setPassword(userModel:UserModel?) {
         if userModel?.mobile == nil ||  userModel?.mobile == "" {
-            Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .accountSecuritySet))
+            Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .accountSecuritySet, userModel: UserModel.shared().getModel()!))
         }else {
             let vc = SetPasswordViewController()
             self.navigationController?.pushViewController(vc, animated: true)

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/AliyunVideo/AlivcShortVideo/ShortVideoFile/VideoCrop/View/AliyunCropViewBottomView.m

@@ -39,7 +39,7 @@
 
 - (void)setupSubViews {
     
-    CGFloat height = CGRectGetHeight(self.frame);
+//    CGFloat height = CGRectGetHeight(self.frame);
     CGFloat width = CGRectGetWidth(self.frame);
     self.backButton = [self buttonWithRect:(CGRectMake(5, 2, 40, 40)) image:[UIImage imageNamed:@"navbar_back_white"] action:@selector(backButtonAction)];
     [self addSubview:self.backButton];

+ 0 - 1
RainbowPlanet/RainbowPlanet/Modules/PublishModule/PublishManager/PublishUploadManager.swift

@@ -167,7 +167,6 @@ extension PublishUploadManager {
     func startUploadImage(_ authModel: CommunityImageAuthModel, _ totalTimes: Int) {
         self.curTimes = totalTimes
         
-        let info = AliyunUploadSVideoInfo()
         uploadManager = AlivcShortVideoUploadManager.shared()
         uploadManager?.setCoverImagePath(self.imageAssetUrlArr?[totalTimes], videoInfo: nil, videoPath: "")
         uploadManager?.managerDelegate = self

+ 2 - 1
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/BindPhoneNumber/ViewController/BindPhoneNumberViewController.swift

@@ -22,6 +22,7 @@ public enum BindPhoneNumberVCType {
 class BindPhoneNumberViewController: BaseViewController {
     
     var bindPhoneNumberVCType : BindPhoneNumberVCType?
+    var userModel : UserModel?
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -50,7 +51,7 @@ class BindPhoneNumberViewController: BaseViewController {
         }
         bindPhoneNumberView.loginBlock = {
             [weak self] (phoneNumber,sms,invitationCode) in
-            SwiftMoyaNetWorkServiceUser.shared().userBindMobileApi(mobile: phoneNumber, smsCode: sms, unionId: UserModel.shared().getModel()?.unionId ?? "", openId: UserModel.shared().getModel()?.openId ?? "", invitationCode: invitationCode, completion: { [weak self] (data) -> (Void) in
+            SwiftMoyaNetWorkServiceUser.shared().userBindMobileApi(mobile: phoneNumber, smsCode: sms, unionId: self?.userModel?.unionId ?? "", openId: self?.userModel?.openId ?? "", invitationCode: invitationCode, completion: { [weak self] (data) -> (Void) in
                 if self?.bindPhoneNumberVCType == .weixinlogin { //跳转性别
                     // 设置友盟别名
                     UMManager.shared.addAlias()

+ 5 - 10
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/ViewController/RegisterLoginViewController.swift

@@ -41,12 +41,13 @@ class RegisterLoginViewController: BaseViewController {
         registerLoginView.weiXinLoginBlock = { [weak self] in
             UMManager.shared.loginGetUserInfo(platformType: UMSocialPlatformType.wechatSession) { (userModel) -> (Void) in
                 let wxLoginModel = userModel
+
                 SwiftMoyaNetWorkServiceUser.shared().userWeiXinRegisterApi(open_id: wxLoginModel.open_id, union_id: wxLoginModel.union_id, avatar: wxLoginModel.avatar, username: wxLoginModel.username, gender: wxLoginModel.gender, completion: { (userModel) -> (Void) in
                     let userModel =  userModel as! UserModel
                     if (userModel.mobile != nil && userModel.mobile != "" ) {
-                        
+
                         UserModel.shared().setModel(model: userModel)
-                        
+
                         if(userModel.gender == nil || userModel.gender == 0) {//设置性别话题
                             self?.present(GenderSelectionViewController(), animated: true, completion: {
                             })
@@ -57,15 +58,9 @@ class RegisterLoginViewController: BaseViewController {
                             kAppDelegate.setTabbarController()
                         }
                     }else {
-                        let userModel1 = UserModel()
-                        userModel1.token = userModel.token
-                        userModel1.accessToken = userModel.accessToken
-                        userModel1.openId = userModel.openId
-                        userModel1.unionId = userModel.unionId
-                        UserModel.shared().setModel(model: userModel1)
-                        Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .weixinlogin))
+                        Mediator.push(RegisterLoginRouterModuleType.pushBindPhoneNumber(bindPhoneNumberVCType: .weixinlogin, userModel: userModel))
                     }
-                    
+
                 })
             }
         }

+ 3 - 2
RainbowPlanet/RainbowPlanet/Router/RegisterLoginRouterModuleType.swift

@@ -14,16 +14,17 @@ import SwiftyMediator
 ///
 /// - pushBindPhoneNumber: 绑定手机号
 public enum RegisterLoginRouterModuleType: MediatorTargetType {
-    case pushBindPhoneNumber(bindPhoneNumberVCType:BindPhoneNumberVCType)
+    case pushBindPhoneNumber(bindPhoneNumberVCType:BindPhoneNumberVCType,userModel:UserModel)
     case presentRegisterLogin
 }
 
 extension RegisterLoginRouterModuleType: MediatorSourceType {
     public var viewController: UIViewController? {
         switch self {
-        case .pushBindPhoneNumber(let bindPhoneNumberVCType):
+        case .pushBindPhoneNumber(let bindPhoneNumberVCType,let userModel):
             let vc = BindPhoneNumberViewController()
             vc.bindPhoneNumberVCType = bindPhoneNumberVCType
+            vc.userModel = userModel
             return vc
         case .presentRegisterLogin:
             let vc = RegisterLoginViewController()

+ 0 - 22
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_download.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_download.imageset/edit_pic_download@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_download.imageset/edit_pic_download@3x.png


+ 0 - 22
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_moments.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_moments.imageset/edit_pic_moments@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_moments.imageset/edit_pic_moments@3x.png


+ 0 - 22
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_wechat.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_wechat.imageset/edit_pic_wechat@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_wechat.imageset/edit_pic_wechat@3x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_download.imageset/edit_pic_download@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_download.imageset/edit_pic_download@3x.png


RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_link.imageset/Contents.json → RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_link.imageset/Contents.json


RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_link.imageset/edit_pic_link@2x.png → RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_link.imageset/edit_pic_link@2x.png


RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_link.imageset/edit_pic_link@3x.png → RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_link.imageset/edit_pic_link@3x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_moments.imageset/edit_pic_moments@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_moments.imageset/edit_pic_moments@3x.png


RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_sina.imageset/Contents.json → RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_sina.imageset/Contents.json


RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_sina.imageset/edit_pic_sina@2x.png → RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_sina.imageset/edit_pic_sina@2x.png


RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/CommonIcon/edit_pic_sina.imageset/edit_pic_sina@3x.png → RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_sina.imageset/edit_pic_sina@3x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_wechat.imageset/edit_pic_wechat@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/PublishModule.xcassets/edit_pic_wechat.imageset/edit_pic_wechat@3x.png