1:先看一看xutils3的提交代码
String account = editText1.getText().toString();
String password = editText2.getText().toString();
JSONObject js_request = new JSONObject();//服务器需要传参的json对象
try {
js_request.put("account", account);//添加相应键值对
js_request.put("password", password);
} catch (JSONException e) {
e.printStackTrace();
}
RequestParams requestParams = new RequestParams(LOGIN_URL);
requestParams.setAsJsonContent(true);
requestParams.setBodyContent(js_request.toString());
x.http().post(requestParams, new Callback.CommonCallback() {
@Override
public void onSuccess(String result) {
System.out.println("**ok"+result);
try {
JSONObject object = new JSONObject(result);
String code = object.getStrin