iOS审核上架

iOS post传数组参数

2017-11-23  本文已影响76人  iOS菜鸟攻城狮

//拼接字符数组

NSMutableString *ids = [NSMutableString stringWithString:@"["];

for(ConsultationAppointmentDoctorDto *consulDoctor in self.consulAppointDto.doctors){

[ids appendFormat:@"'%@',",consulDoctor.doctor.id_a];

}

NSString *idStr = [NSString stringWithFormat:@"%@]",[ids   substringWithRange:NSMakeRange(0,[ids length]-1)]];

//核心代码

NSMutableDictionary *paramsDict=[[NSMutableDictionary alloc] init];

[paramsDict setObject:idStr forKey:@"doctorIds"];//将字符数组装入参数字典中

上一篇 下一篇

猜你喜欢

热点阅读