From 0d8f5fc8a516bfd07e425909e4a4432600572ee7 Mon Sep 17 00:00:00 2001 From: younger_times <841720330@qq.com> Date: 星期三, 05 七月 2023 21:21:35 +0800 Subject: [PATCH] 修复BUG --- OKProject/Class/Home/ViewModel/EnterpriseViewModel.swift | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OKProject/Class/Home/ViewModel/EnterpriseViewModel.swift b/OKProject/Class/Home/ViewModel/EnterpriseViewModel.swift index 4a6417c..90d39b2 100644 --- a/OKProject/Class/Home/ViewModel/EnterpriseViewModel.swift +++ b/OKProject/Class/Home/ViewModel/EnterpriseViewModel.swift @@ -11,8 +11,10 @@ import RxCocoa class EnterpriseViewModel:YYViewModel{ - func queryEnterpriseInfo(_ clouse:@escaping (ResponseStatus<EnterpriseInfoModel>)->Void){ - show() + func queryEnterpriseInfo(needShow:Bool = true,clouse:@escaping (ResponseStatus<EnterpriseInfoModel>)->Void){ + if needShow{ + show() + } APIManager.shared.provider.rx.request(.queryCompany).mapTravelThenValidate(EnterpriseInfoModel.self).subscribe { result in self.hidden() switch result { @@ -27,9 +29,9 @@ }.disposed(by: disposeBag) } - func submitEnterprise(id:Int? = nil,name:String,mailbox:String,legalName:String,legalPhone:String,identifier:String,contactAddress:String,businessLicense:String,clouse: @escaping (ResponseStatus<Nothing>)->Void){ + func submitEnterprise(id:Int? = nil,name:String,mailbox:String,legalName:String,legalPhone:String,identifier:String,contactAddress:String,businessLicense:String,pwd:String,clouse: @escaping (ResponseStatus<Nothing>)->Void){ show() - APIManager.shared.provider.rx.request(.submitCompany(name: name, mailbox: mailbox, legalName: legalName, legalPhone: legalPhone, identifier: identifier, contactAddress: contactAddress, businessLicense: businessLicense)).mapTravelThenValidate(Nothing.self).subscribe { result in + APIManager.shared.provider.rx.request(.submitCompany(name: name, mailbox: mailbox, legalName: legalName, legalPhone: legalPhone, identifier: identifier, contactAddress: contactAddress, businessLicense: businessLicense,pwd: pwd)).mapTravelThenValidate(Nothing.self).subscribe { result in self.hidden() switch result { case .success(_): -- Gitblit v1.7.1