|
|
@@ -215,9 +215,14 @@ public class MainActivity extends BaseActivity {
|
|
|
submit.setVisibility(View.VISIBLE);
|
|
|
submit.setText("未登录");
|
|
|
submit.setOnClickListener(view -> {
|
|
|
- Bundle bundle = new Bundle();
|
|
|
- bundle.putString("from", "1");
|
|
|
- toActivity(RobotInfoActivity.class, bundle);
|
|
|
+ if("未登录".contentEquals(submit.getText())) {
|
|
|
+// checkToken(getMac(), getMac());
|
|
|
+ login();
|
|
|
+ }else{
|
|
|
+ Bundle bundle = new Bundle();
|
|
|
+ bundle.putString("from", "1");
|
|
|
+ toActivity(RobotInfoActivity.class, bundle);
|
|
|
+ }
|
|
|
});
|
|
|
submit.setOnLongClickListener(v -> {
|
|
|
toActivity(RobotInfoActivity.class);
|