//returnValue从后台返回的数据
JSONArray jsonArray = new JSONArray(returnValue);
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject resultJsonObject = jsonArray.getJSONObject(i);
//该用户所有数据包括微信、qq等
UserBean userBean = new UserBean();
userBean.setName(resultJsonObject .getString("userid"));
userBean.setIdcard(resultJsonObject .getString("nickName"));
userBean.setFace(resultJsonObject .getString("icon"));
····
··
//list.add(userBean)
}
你点击跳转的时候获取你点击的数据传送到下个界面
Intent intent = new Intent(Main.this, Sec.class);
Bundle bundle = new Bundle();
bundle.putSerializable("UserBean ", userBean);
intent.putExtras(bundle);
startActivity(intent);
下个界面接收
Intent intent = this.getIntent();
UserBean userBean= (UserBean ) intent.getSerializableExtra("UserBean ");
$.ajax({
url: '....',
type: 'GET',
data: {'...': '...'},
dataType: 'json',
success: function (response) {
var result = response;
if (typeof response == 'string') {
//一般是返回json串
result = JSON.parse(response);
}
console.dir(result);
},
error: function (e) {
//...
}
});