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