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

接口联调

parent fb6308c6
......@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *telephone;
@property (nonatomic, copy) NSString *recordId;
@property (nonatomic, assign) BOOL hasPhone;
@property (nonatomic, assign) NSInteger leadPhoneRequestId;
@end
......
......@@ -19,6 +19,7 @@
@property (nonatomic, strong) UILabel *tipLabel;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, copy) NSString *recordId;
@property (nonatomic, assign) NSInteger leadPhoneRequestId;
@property (nonatomic, assign) BOOL isHadPhone;
......@@ -156,7 +157,7 @@
[GMBookReachStoreConsultView on_click_buttonWithButtonName:@"appointment"];
if (self.isHadPhone) {
__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;
NSDictionary *data = response.data;
// 跳转发私信
......@@ -192,6 +193,7 @@
popView.tipLabel.text = model.prompt;
popView.recordId = model.recordId;
popView.isHadPhone = model.hasPhone;
popView.leadPhoneRequestId = model.leadPhoneRequestId;
[[GMBaseTool getCurrentViewController].view addSubview:popView];
}
}
......
......@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface GMBookConsultViewModel : WMFetchDataViewModel
// 获取弹窗
+ (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
NS_ASSUME_NONNULL_END
......@@ -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];
[params setObject:SafeString(recordId) forKey:@"record_id"];
[params setObject:@(requestId) forKey:@"request_id"];
[params setObject:SafeString([PhobosUtil currentTime]) forKey:@"appointment_time"];
[GMNetworking requestOCWithApi:@"/api/sales_lead/consult_appointment" method:GMHTTPMethodPost parameters:params completion:^(GMResponseOC *responseObject) {
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