瀏覽代碼

no message

Chris 6 年之前
父節點
當前提交
44b97886cd

+ 0 - 5
RainbowPlanet/RainbowPlanet/Modules/MineModule/AddressManager/ViewController/AddressManagerViewController.swift

@@ -185,12 +185,7 @@ class AddressManagerViewController: BaseViewController {
     func setDeliveryMethodTypeAndReload(type: String, reloadType: Int) {
         SwiftMoyaNetWorkServiceUser.shared().userSetDeliverTypeApi(deliveryMethodType: type) {
             [weak self] (data) -> (Void) in
-            // 刷新列表
             self?.userSelfAndExpressAddressListApi(type:reloadType)
-            // 发送选中为自提の通知
-            if type == "1" {
-                NotificationCenter.default.post(name: NSNotification.Name("ChooseSelfAddressNoti"), object: nil)
-            }
         }
     }
 

+ 3 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/MainView/ShoppingMallView.swift

@@ -16,7 +16,9 @@ class ShoppingMallView: UIView {
     
     override init(frame: CGRect) {
         super.init(frame: frame)
-        addressPopView()
+        DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) {
+            self.addressPopView()
+        }
         self.cmsTemplateSetTemplateNameApi()
     }
 

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

@@ -22,17 +22,11 @@ class ShoppingMallViewController: BaseViewController {
         setupViews()
         setupLayouts()
         setupData()
-        
-        NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "ChooseSelfAddressNoti"), object: nil, queue: operationQueue) {
-            [weak self] (notification) in
-            
-        }
     }
     override func setupViews() {
         super.setupViews()
         navigationBar.addSubview(navigationBarView)
         view.addSubview(shoppingMallView)
-
     }
 
     override func setupLayouts() {
@@ -72,6 +66,7 @@ class ShoppingMallViewController: BaseViewController {
             let cmsRuleModel = notification.object as? CMSRuleModel
             self?.pushVCCMSRule(cmsRuleModel: cmsRuleModel, areaType: "floor")
         }
+        
         //搜索
         navigationBarView.searchBlock = {
             [weak self] in
@@ -115,7 +110,7 @@ class ShoppingMallViewController: BaseViewController {
             [weak self] in
             let model = DeliveryMethodTypeModel.shared().getModel()
             if model?.deliveryMethodType == "1" { //自提
-                
+                self?.shoppingMallView.addressPopView()
             }            
         }
         return navigationBarView