|
|
@ -47,8 +47,8 @@ public class MainActivity extends BaseActivity {
|
|
|
|
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
|
|
|
|
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
|
|
|
|
String loginName = SharedPreferencesUtils.getstring("loginName", "");
|
|
|
|
String loginName = SharedPreferencesUtils.getstring("loginName", "");
|
|
|
|
user = new User();
|
|
|
|
user = new User();
|
|
|
|
user.setUsername(loginName);
|
|
|
|
// user.setUsername(loginName);
|
|
|
|
user.setPassword("123456");
|
|
|
|
// user.setPassword("123456");
|
|
|
|
getSupportActionBar().hide(); // 隐藏原生标题栏
|
|
|
|
getSupportActionBar().hide(); // 隐藏原生标题栏
|
|
|
|
binding.setUser(user);
|
|
|
|
binding.setUser(user);
|
|
|
|
|
|
|
|
|
|
|
@ -76,7 +76,8 @@ public class MainActivity extends BaseActivity {
|
|
|
|
|
|
|
|
|
|
|
|
// 查询PDA Mac 地址列表
|
|
|
|
// 查询PDA Mac 地址列表
|
|
|
|
private void getPda() {
|
|
|
|
private void getPda() {
|
|
|
|
OkGo.<Result>get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).execute(new MyRecultCall(dialog, this) {
|
|
|
|
OkGo.<Result>get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
|
|
|
|
|
|
|
|
.execute(new MyRecultCall(dialog, this) {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onSuccess(Response<Result> response) {
|
|
|
|
public void onSuccess(Response<Result> response) {
|
|
|
|
super.onSuccess(response);
|
|
|
|
super.onSuccess(response);
|
|
|
@ -175,7 +176,7 @@ public class MainActivity extends BaseActivity {
|
|
|
|
Intent intent = new Intent(MainActivity.this, HomePageActivity.class);
|
|
|
|
Intent intent = new Intent(MainActivity.this, HomePageActivity.class);
|
|
|
|
intent.putExtra("role", loginBack.getRoles());
|
|
|
|
intent.putExtra("role", loginBack.getRoles());
|
|
|
|
intent.putExtra("info", body);
|
|
|
|
intent.putExtra("info", body);
|
|
|
|
SharedPreferencesUtils.putstring("loginName", user.username);
|
|
|
|
SharedPreferencesUtils.putstring("pdaName", user.username);
|
|
|
|
SharedPreferencesUtils.putstring("teamCode", user.getTeamCode());
|
|
|
|
SharedPreferencesUtils.putstring("teamCode", user.getTeamCode());
|
|
|
|
SharedPreferencesUtils.putstring("teamName", user.getTeamName());
|
|
|
|
SharedPreferencesUtils.putstring("teamName", user.getTeamName());
|
|
|
|
SharedPreferencesUtils.putstring("token", token);
|
|
|
|
SharedPreferencesUtils.putstring("token", token);
|
|
|
|