Commit 62c33ec6 authored by 朱璇's avatar 朱璇

接口联调

parent fb6308c6
...@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *telephone; @property (nonatomic, copy) NSString *telephone;
@property (nonatomic, copy) NSString *recordId; @property (nonatomic, copy) NSString *recordId;
@property (nonatomic, assign) BOOL hasPhone; @property (nonatomic, assign) BOOL hasPhone;
@property (nonatomic, assign) NSInteger leadPhoneRequestId;
@end @end
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
@property (nonatomic, strong) UILabel *tipLabel; @property (nonatomic, strong) UILabel *tipLabel;
@property (nonatomic, strong) UILabel *titleLabel; @property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, copy) NSString *recordId; @property (nonatomic, copy) NSString *recordId;
@property (nonatomic, assign) NSInteger leadPhoneRequestId;
@property (nonatomic, assign) BOOL isHadPhone; @property (nonatomic, assign) BOOL isHadPhone;
...@@ -156,7 +157,7 @@ ...@@ -156,7 +157,7 @@
[GMBookReachStoreConsultView on_click_buttonWithButtonName:@"appointment"]; [GMBookReachStoreConsultView on_click_buttonWithButtonName:@"appointment"];
if (self.isHadPhone) { if (self.isHadPhone) {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[GMBookConsultViewModel bookConsultWithRecordId:SafeString(self.recordId) successBlock:^(id responseObject) { [GMBookConsultViewModel bookConsultWithRecordId:SafeString(self.recordId) requestId:_leadPhoneRequestId successBlock:^(id responseObject) {
GMResponseOC *response = (GMResponseOC *)responseObject; GMResponseOC *response = (GMResponseOC *)responseObject;
NSDictionary *data = response.data; NSDictionary *data = response.data;
// 跳转发私信 // 跳转发私信
...@@ -192,6 +193,7 @@ ...@@ -192,6 +193,7 @@
popView.tipLabel.text = model.prompt; popView.tipLabel.text = model.prompt;
popView.recordId = model.recordId; popView.recordId = model.recordId;
popView.isHadPhone = model.hasPhone; popView.isHadPhone = model.hasPhone;
popView.leadPhoneRequestId = model.leadPhoneRequestId;
[[GMBaseTool getCurrentViewController].view addSubview:popView]; [[GMBaseTool getCurrentViewController].view addSubview:popView];
} }
} }
......
...@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface GMBookConsultViewModel : WMFetchDataViewModel @interface GMBookConsultViewModel : WMFetchDataViewModel
// 获取弹窗 // 获取弹窗
+ (void)bookConsultInfoWithWithRecordId:(NSString *)recordId successBlock:(HttpSuccessBlock)successBlock failBlock:(HttpFailedBlock)failBlock; + (void)bookConsultInfoWithWithRecordId:(NSString *)recordId successBlock:(HttpSuccessBlock)successBlock failBlock:(HttpFailedBlock)failBlock;
+ (void)bookConsultWithRecordId:(NSString *)recordId successBlock:(HttpSuccessBlock)successBlock failBlock:(HttpFailedBlock)failBlock; + (void)bookConsultWithRecordId:(NSString *)recordId requestId:(NSInteger)requestId successBlock:(HttpSuccessBlock)successBlock failBlock:(HttpFailedBlock)failBlock;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -20,9 +20,10 @@ ...@@ -20,9 +20,10 @@
}]; }];
} }
+ (void)bookConsultWithRecordId:(NSString *)recordId successBlock:(HttpSuccessBlock)successBlock failBlock:(HttpFailedBlock)failBlock { + (void)bookConsultWithRecordId:(NSString *)recordId requestId:(NSInteger)requestId successBlock:(HttpSuccessBlock)successBlock failBlock:(HttpFailedBlock)failBlock {
NSMutableDictionary *params = [NSMutableDictionary dictionary]; NSMutableDictionary *params = [NSMutableDictionary dictionary];
[params setObject:SafeString(recordId) forKey:@"record_id"]; [params setObject:SafeString(recordId) forKey:@"record_id"];
[params setObject:@(requestId) forKey:@"request_id"];
[params setObject:SafeString([PhobosUtil currentTime]) forKey:@"appointment_time"]; [params setObject:SafeString([PhobosUtil currentTime]) forKey:@"appointment_time"];
[GMNetworking requestOCWithApi:@"/api/sales_lead/consult_appointment" method:GMHTTPMethodPost parameters:params completion:^(GMResponseOC *responseObject) { [GMNetworking requestOCWithApi:@"/api/sales_lead/consult_appointment" method:GMHTTPMethodPost parameters:params completion:^(GMResponseOC *responseObject) {
if (responseObject.isSuccess) { if (responseObject.isSuccess) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment