From 5a0fff8095cd5356f57c181b7e7b820e0f7efacf Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 20 一月 2022 16:00:14 +0800
Subject: [PATCH] 将项目拆分为两个子项目,监管和督察
---
app/src/main/java/cn/flightfeather/thirdappmodule/module/login/CardFragment.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/login/CardFragment.java b/app/src/main/java/cn/flightfeather/thirdappmodule/module/login/CardFragment.java
index cd4fa2d..db43ad9 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/login/CardFragment.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/login/CardFragment.java
@@ -1,6 +1,8 @@
package cn.flightfeather.thirdappmodule.module.login;
+import static android.graphics.PorterDuff.Mode.SRC_IN;
+
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -37,8 +39,6 @@
import retrofit2.http.Body;
import retrofit2.http.POST;
-import static android.graphics.PorterDuff.Mode.SRC_IN;
-
/**
* A simple {@link Fragment} subclass.
*/
@@ -46,10 +46,10 @@
private Button mbtn_login;
protected TextView mtv_name;
protected ImageView miv_photo;
- private static String USER_TYPE = "type";
+ protected static String USER_TYPE = "type";
private int type = 0;
private int position = 0;
- private static String POSITION = "position";
+ protected static String POSITION = "position";
protected String FFUSER = "椋炵窘鐜繚";
protected String ADMIN = "涓荤閮ㄩ棬";
protected String POLLUTION = "浼佷笟";
@@ -225,7 +225,7 @@
useinfoDao.insert(user);
LoginInitializer.INSTANCE.onLoginStatusCheck(getContext(), true, accountName);
Toast.makeText(application, "鐧诲綍鎴愬姛", Toast.LENGTH_SHORT).show();
- startActivity(new Intent(getActivity(), MainActivity.class));
+ loginSuccess();
getActivity().finish();
} else {
Toast.makeText(application, "鐧诲綍澶辫触", Toast.LENGTH_SHORT).show();
@@ -239,6 +239,10 @@
});
}
+ protected void loginSuccess() {
+ startActivity(new Intent(getActivity(), MainActivity.class));
+ }
+
//鐧诲綍鎸夐挳鐨勭偣鍑讳簨浠�
@Override
public void onClick(View v) {
--
Gitblit v1.9.3