Commit 0e9edef2b0dd448ade4ac720c29438cef8302557
1 parent
2e560dbc
Exists in
yxb_dev
and in
2 other branches
no message
Showing
6 changed files
with
25 additions
and
5 deletions
Show diff stats
app/build.gradle
1 | 1 | apply plugin: 'com.android.application' |
2 | +apply plugin: 'org.greenrobot.greendao' // apply plugin | |
2 | 3 | |
3 | 4 | android { |
4 | 5 | signingConfigs { |
... | ... | @@ -43,4 +44,5 @@ dependencies { |
43 | 44 | implementation project(':mvpsdk') |
44 | 45 | implementation project(':roundedimageview-2.2.1') |
45 | 46 | implementation files('libs/AMap_Location_V3.8.0_20180201.jar') |
47 | + implementation 'org.greenrobot:greendao:3.2.2' // add library | |
46 | 48 | } | ... | ... |
app/proguard-rules.pro
... | ... | @@ -19,3 +19,10 @@ |
19 | 19 | # If you keep the line number information, uncomment this to |
20 | 20 | # hide the original source file name. |
21 | 21 | #-renamesourcefileattribute SourceFile |
22 | +-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao { | |
23 | +public static java.lang.String TABLENAME; | |
24 | +} | |
25 | +-keep class **$Properties | |
26 | + | |
27 | +# If you do not use SQLCipher: | |
28 | +-dontwarn org.greenrobot.greendao.database.** | ... | ... |
app/src/main/java/com/shunzhi/parent/bean/message/PHMessage.java
0 → 100644
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
... | ... | @@ -46,13 +46,12 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre |
46 | 46 | mRxManager.register(mIModel.getLoginResult(loginName, loginPwd).subscribe(new Consumer<JsonObject>() { |
47 | 47 | @Override |
48 | 48 | public void accept(JsonObject jsonObject) throws Exception { |
49 | - Timber.i("---=== loginResult :%s",jsonObject); | |
49 | + Timber.i("---=== loginResult :%s", jsonObject); | |
50 | 50 | try { |
51 | 51 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { |
52 | 52 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); |
53 | 53 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, loginName); |
54 | 54 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_PWD, loginPwd); |
55 | - AppConfig.ISLOGIN = true; | |
56 | 55 | RetrofitCreateHelper.getInstance().setAuthorization("Bearer " + jsonObject.get("access_token").getAsString()); |
57 | 56 | getUserInfo(loginName, 0, ""); |
58 | 57 | } else { |
... | ... | @@ -168,11 +167,14 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre |
168 | 167 | mRxManager.register(mIModel.nimLoginResult(account, password).subscribe(new Consumer<NIMLoginResultBean>() { |
169 | 168 | @Override |
170 | 169 | public void accept(NIMLoginResultBean bean) throws Exception { |
171 | - if (bean.isSuccess()) | |
170 | + if (bean.isSuccess()) { | |
171 | + AppConfig.ISLOGIN = true; | |
172 | 172 | mIView.getUserInfo(0); |
173 | + } | |
173 | 174 | } |
174 | 175 | })); |
175 | 176 | } |
177 | + | |
176 | 178 | public void reSetpassResult(final String adminName, String idCode, String password) { |
177 | 179 | mRxManager.register(mIModel.reSetpass(adminName, idCode, password).subscribe(new Consumer<JsonObject>() { |
178 | 180 | @Override | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
... | ... | @@ -59,7 +59,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
59 | 59 | |
60 | 60 | } |
61 | 61 | |
62 | - private void setPersonInfo() { | |
62 | + private void setPersonInfo() { | |
63 | 63 | if (AppConfig.ISLOGIN) { |
64 | 64 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
65 | 65 | ToastUtils.showToast(url); |
... | ... | @@ -103,7 +103,6 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
103 | 103 | default: |
104 | 104 | break; |
105 | 105 | } |
106 | - | |
107 | 106 | } |
108 | 107 | |
109 | 108 | @Override | ... | ... |
build.gradle
... | ... | @@ -5,9 +5,11 @@ buildscript { |
5 | 5 | repositories { |
6 | 6 | google() |
7 | 7 | jcenter() |
8 | + mavenCentral() // add repository | |
8 | 9 | } |
9 | 10 | dependencies { |
10 | 11 | classpath 'com.android.tools.build:gradle:3.0.1' |
12 | + classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin | |
11 | 13 | |
12 | 14 | |
13 | 15 | // NOTE: Do not place your application dependencies here; they belong | ... | ... |