MultipartEntity entity = new MultipartEntity();
try {
entity.addPart("source", new StringBody("6")); //固定传参//TODO
entity.addPart("linkMan", new StringBody(etCompanyLinkman.getText().toString(), Charset.forName("UTF-8")));
entity.addPart("companyName", new StringBody(etCompanyName.getText().toString(), Charset.forName("UTF-8")));
entity.addPart("cLicNum", new StringBody(etCompanyClicNum.getText().toString()));
entity.addPart("tel", new StringBody(SystemInfo.getInstance(getApplicationContext()).getPhone()));
entity.addPart("companyProvince", new StringBody(province, Charset.forName("UTF-8")));
entity.addPart("companyCity", new StringBody(city, Charset.forName("UTF-8")));
entity.addPart("companyArea", new StringBody(district, Charset.forName("UTF-8")));
if (uploadFiles != null && uploadFiles.size() > 0) {
int picIndex = 1;
for (int i = 0; i < uploadFiles.size(); i++) {
entity.addPart("pic" + picIndex, new FileBody(uploadFiles.get(i),"image/jpeg"));
picIndex++;
}
}
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
}