Explorar o código

联系人处理

南鑫林 %!s(int64=5) %!d(string=hai) anos
pai
achega
3d14580de2

+ 3 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/EditSelfMentionContacts/View/EditSelfMentionContactsView.swift

@@ -21,7 +21,9 @@ class EditSelfMentionContactsView: BaseView {
     var selfMentionContactsModel: SelfMentionContactsModel? {
         didSet {
             if self.selfMentionContactsModel != nil {
-                 tableView.tableFooterView = editAddressFooterView
+                self.moblie = self.selfMentionContactsModel?.mobile ?? ""
+                self.name = self.selfMentionContactsModel?.name ?? ""
+                tableView.tableFooterView = editAddressFooterView
             }
             tableView.reloadData()
         }

+ 10 - 24
RainbowPlanet/RainbowPlanet/Modules/MineModule/EditSelfMentionContacts/ViewController/EditSelfMentionContactsViewController.swift

@@ -14,7 +14,6 @@ class EditSelfMentionContactsViewController: BaseViewController {
     var saveClosure : SaveClosure?
     
     var selfMentionContactsModel: SelfMentionContactsModel?
-    var selfMentionContactsModel1 = SelfMentionContactsModel()
     
     // 是否由支付订单页面进入
     var isFromOrderPay: Bool = false
@@ -50,13 +49,11 @@ class EditSelfMentionContactsViewController: BaseViewController {
         editSelfMentionContactsView.selfMentionContactsModel = selfMentionContactsModel
         editSelfMentionContactsView.selfMentionContactsClosure = { //赋值
             [weak self] (moblie,name) in
-            if self?.selfMentionContactsModel != nil {
-                self?.selfMentionContactsModel?.mobile = moblie
-                self?.selfMentionContactsModel?.name = name
-            }else {
-                self?.selfMentionContactsModel1.mobile = moblie
-                self?.selfMentionContactsModel1.name = name
+            if self?.selfMentionContactsModel == nil {
+                self?.selfMentionContactsModel = SelfMentionContactsModel()
             }
+            self?.selfMentionContactsModel?.mobile = moblie
+            self?.selfMentionContactsModel?.name = name
             
         }
         editSelfMentionContactsView.deleteClosure = { //删除
@@ -81,23 +78,12 @@ class EditSelfMentionContactsViewController: BaseViewController {
     /// 新增、编辑 自提地址收货人信息
     func userSaveExpreesContactsApi() {
         
-        if self.selfMentionContactsModel != nil {
-            SwiftMoyaNetWorkServiceUser.shared().userSaveExpreesContactsApi(id: self.selfMentionContactsModel?.id ?? 0 ,mobile: self.selfMentionContactsModel?.mobile ?? "", name: self.selfMentionContactsModel?.name ?? "") {
-                [weak self] (data) -> (Void) in
-                if self!.isFromOrderPay {
-                    self?.navigationController?.popViewController(animated: true)
-                } else {
-                    self?.popVC()
-                }
-            }
-        }else {
-            SwiftMoyaNetWorkServiceUser.shared().userSaveExpreesContactsApi(id: self.selfMentionContactsModel1.id ?? 0 ,mobile: self.selfMentionContactsModel1.mobile ?? "", name: self.selfMentionContactsModel1.name ?? "") {
-                [weak self] (data) -> (Void) in
-                if self!.isFromOrderPay {
-                    self?.navigationController?.popViewController(animated: true)
-                } else {
-                    self?.popVC()
-                }
+        SwiftMoyaNetWorkServiceUser.shared().userSaveExpreesContactsApi(id: self.selfMentionContactsModel?.id ?? 0 ,mobile: self.selfMentionContactsModel?.mobile ?? "", name: self.selfMentionContactsModel?.name ?? "") {
+            [weak self] (data) -> (Void) in
+            if self!.isFromOrderPay {
+                self?.navigationController?.popViewController(animated: true)
+            } else {
+                self?.popVC()
             }
         }
         

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

@@ -70,10 +70,6 @@ class OrderFinishPayController: BaseViewController {
             self?.productHotSaleApi(page: page)
         }
         
-        finishPayView.tableView.addFooterWithWithHeader(withAutomaticallyRefresh: false) { [weak self] (page) in
-            self?.productHotSaleApi(page: page)
-        }
-        
         navigationBar.onClickLeftButton = {
             [weak self] in
             

+ 1 - 2
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderPayOrder/View/AdressCell/OrderPaySelfPickInfoCell.swift

@@ -64,8 +64,7 @@ class OrderPaySelfPickInfoCell: UITableViewCell {
     private func setupLayouts() {
         nameLabel.snp.remakeConstraints { (make) in
             make.left.equalTo(14)
-            make.width.lessThanOrEqualTo(56)
-            make.height.equalTo(20)
+            make.width.lessThanOrEqualTo(100)
             make.top.equalToSuperview().offset(14)
             make.bottom.equalToSuperview().offset(-14)
         }

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderPayOrder/View/ShoppingCartPayOrderItemCell.swift

@@ -113,6 +113,8 @@ class ShoppingCartPayOrderItemCell: UITableViewCell {
     
     private lazy var iconImageView: UIImageView = {
         let iconImageView = UIImageView()
+        iconImageView.contentMode = .scaleAspectFill
+        iconImageView.clipsToBounds = true
         return iconImageView
     }()