Compare commits
5 Commits
main
...
cbm-branch
| Author | SHA1 | Date |
|---|---|---|
|
|
f856e7abad | 1 year ago |
|
|
202e9a20b2 | 1 year ago |
|
|
4957a6437b | 1 year ago |
|
|
5d085306f1 | 1 year ago |
|
|
612123abc6 | 1 year ago |
@ -1 +0,0 @@
|
|||||||
111
|
|
||||||
Binary file not shown.
@ -0,0 +1,25 @@
|
|||||||
|
@Override
|
||||||
|
public void onSucess(String response) {
|
||||||
|
//执行登陆请求成功 解析返回json内容
|
||||||
|
System.out.println("response = " + response);
|
||||||
|
JSONObject object = JSON.parseObject(response);
|
||||||
|
Integer status = object.getInteger("status");
|
||||||
|
String msg = object.getString("msg");
|
||||||
|
String data = object.getString("data");
|
||||||
|
if (status == 200) {
|
||||||
|
/*Looper.prepare();
|
||||||
|
Toast.makeText(getApplicationContext(), "登录成功", Toast.LENGTH_SHORT).show();
|
||||||
|
Looper.loop();*/
|
||||||
|
System.out.println("登录成功");
|
||||||
|
//更新界面
|
||||||
|
User user = JSON.parseObject(data, User.class);
|
||||||
|
App.user = user;
|
||||||
|
startActivity(new Intent(getApplicationContext(), MainActivity.class));
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
Looper.prepare();
|
||||||
|
Toast.makeText(getApplicationContext(), "登录失败", Toast.LENGTH_SHORT).show();
|
||||||
|
Looper.loop();
|
||||||
|
System.out.println("登录失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 206 KiB |
Loading…
Reference in new issue