/** * 我的资料 * * @param string * @return */ public static Object getMyData(String string) { if (getResultInt(string) == 0) { try { JSONObject object = new JSONObject(string); JSONObject result = object.getJSONObject("result"); JSONObject data1 = result.getJSONObject("data"); LoginModel model = new LoginModel(); model.setHead_photo(data1.getString("head_photo")); model.setShop_name(data1.getString("shop_name")); model.setContact_person(data1.getString("contact_person")); model.setMobile(data1.getString("mobile")); model.setAreaframe(data1.getString("areaframe")); model.setShop_addr(data1.getString("shop_addr")); model.setShopuser_name(data1.getString("shopuser_name")); model.setRevenues_code(data1.getString("revenues_code")); model.setContact_tel(data1.getString("contact_tel")); model.setBusiness_encoding(data1.getString("business_encoding")); return model; } catch (JSONException e) { e.printStackTrace(); } return null; } else { return getErrorValue(string); } }